HBase engine usage documentation

This article mainly introduces the installation, use and configuration of the hbase engine plugin in Linkis.

It is strongly recommended that you check these environment variables for the executing user before executing hbase tasks. The specific way is

  1. sudo su - ${username}
  2. echo ${JAVA_HOME}

Compile the engine plug-in separately (requires a maven environment)

  1. # compile
  2. cd ${linkis_code_dir}/linkis-engineconn-plugins/hbase/
  3. mvn clean install -DskipTests -Dhbase.profile=1.2|1.4|2.2|2.5
  4. # hbase.profile 1.2|1.4|2.2|2.5, The corresponding HBase version is: 1.2.0, 1.4.3, 2.2.6, 2.5.3
  5. # default hbase.profile=2.5, Compile plug-ins for different HBase versions on demand
  6. # The compiled engine plug-in package is located in the following directory
  7. ${linkis_code_dir}/linkis-engineconn-plugins/hbase/target/out/

EngineConnPlugin engine plugin installation

Upload the engine plug-in package in 2.1 to the engine directory of the server

  1. ${LINKIS_HOME}/lib/linkis-engineplugins

The directory structure after uploading is as follows

  1. linkis-engineconn-plugins/
  2. ├── hbase
  3. ├── dist
  4. └── 2.5.3
  5. ├── conf
  6. └── lib
  7. └── plugin
  8. └── 2.5.3

Refresh the engine by restarting the linkis-cg-linkismanager service

  1. cd ${LINKIS_HOME}/sbin
  2. sh linkis-daemon.sh restart cg-linkismanager

You can check whether the last_update_time of this table in the linkis_engine_conn_plugin_bml_resources in the database is the time when the refresh is triggered.

  1. #Login to the linkis database
  2. select * from linkis_cg_engine_conn_plugin_bml_resources;

The HBase engine of Linkis runs a Jruby environment in the background to execute instructions in hbase-shell, and is fully compatible with hbase-shell instructions.

  1. sh bin/linkis-cli -engineType hbase-2.5.3 -code "list" \
  2. -codeType shell -runtimeMap linkis.hbase.zookeeper.quorum=zk1,zk2,zk3

More Linkis-Cli command parameter reference: Linkis-Cli usage

HBase engine supports connection parameters:

Configuration nameRemarks and default valueIs it necessary
linkis.hbase.zookeeper.quorumZooKeeper address for connecting to HBase, e.g. zk1,zk2,zk3, default value: localhostRequired
linkis.hbase.zookeeper.property.clientPortZooKeeper port for connecting to HBase, default value: 2181Optional, usually the default value
linkis.zookeeper.znode.parentZooKeeper znode path for connecting to HBase, default value: /hbaseOptional, usually the default value
linkis.hbase.rootdirHDFS root directory for the HBase cluster, default value: /hbaseOptional, usually the default value
linkis.hbase.security.authenticationAuthentication method for connecting to the HBase cluster: simple or kerberos, default value: simpleOptional, depending on the cluster configuration
linkis.hbase.kerberos.principalHBase Kerberos authentication principal, e.g. hbase@HADOOP.LINKIS.COMRequired for Kerberos authentication
linkis.hbase.keytab.filePath to the keytab file required for HBase Kerberos authentication, e.g. /tmp/hbase.keytabRequired for Kerberos authentication
linkis.hbase.kerberos.proxy.userKerberos proxy user, ensure that the Kerberos authenticated user has the privilege to proxy as a regular userOptional, can be omitted
linkis.hbase.regionserver.kerberos.principalHBase RegionServer’s Kerberos authentication principal, e.g. hbase/_HOST@HADOOP.LINKIS.COM (obtain from the cluster configuration file)Required for Kerberos authentication
linkis.hbase.master.kerberos.principalHBase Master’s Kerberos authentication principal, e.g. hbase/_HOST@HADOOP.LINKIS.COM (obtain from the cluster configuration file)Required for Kerberos authentication