简体   繁体   English

如何在没有 mapr 客户端的情况下从 Java 程序连接到 MaprDB (Hbase)

[英]How to connect to MaprDB (Hbase) from Java program without mapr client

I know how to talk to MaprDB from Java program with Mapr client installed.我知道如何在安装了 Mapr 客户端的 Java 程序中与 MaprDB 交谈。 But, want to know how can I connect to MaprDB without Mapr client installed?但是,想知道如何在没有安装 Mapr 客户端的情况下连接到 MaprDB? Is there a pure Java API (ie without needing to install any other software, just using some jars) for my requirement?是否有纯 Java API (即无需安装任何其他软件,只需使用一些罐子)满足我的要求?

Please note - these are binary tables (and not JSON tables).请注意 - 这些是二进制表(而不是 JSON 表)。

There is an approach that you can use.您可以使用一种方法。

The so-called DAG (data access gateway) is a gRPC-based gateway that you can use.所谓的 DAG(数据访问网关)是一个基于 gRPC 的网关,你可以使用。 There is a pure Java client for this.为此有一个纯 Java 客户端。 Performance impact is significant, but not massive and the API is the same OJAI API as when you access the database using the thick client.性能影响是显着的,但不是很大,并且 API 与使用胖客户端访问数据库时的 OJAI API 相同。

See the following links for more information:有关更多信息,请参阅以下链接:

https://mapr.com/docs/61/MapROverview/MapRDataAccessGateway.html https://mapr.com/docs/61/AdvancedInstallation/InstallingDataAccessGateway.html https://mapr.com/docs/61/AdministratorGuide/AdminMapRDataAccessGateway.html https://mapr.com/docs/61/EcosystemRN/MapR_Data_Access_Gateway_2.0_release_notes.html https://mapr.com/docs/61/MapROverview/MapRDataAccessGateway.html https://mapr.com/docs/61/AdvancedInstallation/InstallingDataAccessGateway.html https://mapr.com/docs/61/AdministratorGuide/AdminMapRDataAccessGateway. html https://mapr.com/docs/61/EcosystemRN/MapR_Data_Access_Gateway_2.0_release_notes.ZFC35FDC70D5FC69D269883A822C7A

Depends upon your definition of "without needing to install any other software".取决于您对“无需安装任何其他软件”的定义。

You don't need to install the mapr-client package to access the MapR Cluster from a Java application - the MapR jars can be installed to your preferred location on the classpath or even shaded into an "uber" jar. You don't need to install the mapr-client package to access the MapR Cluster from a Java application - the MapR jars can be installed to your preferred location on the classpath or even shaded into an "uber" jar.

But you do need to be running on a supported client platform (Linux x86-64, MacOS x86-64, Windows i386 or x86-64), because the maprfs jar does contain JNI libraries packaged within it that it unpacks at initialisation time.但是您确实需要在受支持的客户端平台(Linux x86-64、MacOS x86-64、Windows i386 或 x86-64)上运行,因为maprfs jar确实包含打包在其中的 JNI 库,它会在初始化时解包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM