Apache HBase
The connector for Apache HBase connects to Apache HBase via the HBase REST (Stargate) server.
Set the Port and Server properties to connect to Apache HBase.
The Server property will typically be the host name or IP address of the server hosting Apache HBase. If there are multiple nodes, you will use the host name or IP address of the machine running the REST (Stargate) server.
1.1 Starting the Server
Different Hadoop distributions contain different interfaces and means of starting and stopping the HBase REST server, along with different default port settings.
In most distributions, the HBase REST server can be started in the foreground by running the following command: "hbase rest start -p <port>". Please consult your Hadoop distribution's documentation for further information regarding the HBase REST server.
1.2 Authenticating to Apache HBase
The connector for Apache HBase supports authentication over Basic and Negotiate.
1.2.1 No Authentication
By default, no authentication (or anonymous auth) is used. Set AuthScheme to None to explicitly enforce no authentication.
1.2.2 Authenticating with Basic
Basic authentication may be used by setting AuthScheme to Basic. In addition, set the following:
User: The Apache HBase user;
Password: The Apache HBase password;
1.2.3 Authenticating with Kerberos
To authenticate with Kerberos, set AuthScheme to NEGOTIATE and set the User and Password.
To authenticate to Apache HBase using Kerberos, set the following properties:
AuthScheme: Set this to KERBEROS
KerberosKDC: Set this to the host name or IP Address of your Kerberos KDC machine.
KerberosSPN: Set this to the service and host of the Apache HBase Kerberos Principal. This will be the value prior to the '@' symbol (for instance, hbase/MyHost) of the hbase.regionserver.kerberos.principal of the hbase-site.xml file (for instance, hbase/MyHost@EXAMPLE.COM).
1.2.3.1 Retrieve the Kerberos Ticket
You can use one of the following options to retrieve the required Kerberos ticket.
1.2.3.2 MIT Kerberos Credential Cache File
This option enables you to use the MIT Kerberos Ticket Manager or kinit command to get tickets. Note that you won't need to set the User or Password connection properties with this option.
Ensure that you have an environment variable created called KRB5CCNAME.
Set the KRB5CCNAME environment variable to a path pointing to your credential cache file (for instance, C:\krb_cache\krb5cc_0 or /tmp/krb5cc_0). This file will be created when generating your ticket with MIT Kerberos Ticket Manager.
To obtain a ticket, open the MIT Kerberos Ticket Manager application, click Get Ticket, enter your principal name and password, then click OK. If successful, ticket information will appear in Kerberos Ticket Manager and will now be stored in the credential cache file.
Now that the credential cache file has been created, the provider will use the cache file to obtain the kerberos ticket to connect to Apache HBase.
As an alternative to setting the KRB5CCNAME environment variable, you can directly set the file path using the KerberosTicketCache property. When set, the provider will use the specified cache file to obtain the kerberos ticket to connect to Apache HBase.
1.2.3.3 Keytab File
If the KRB5CCNAME environment variable has not been set, you can retrieve a Kerberos ticket using a Keytab File. To do this, set the User property to the desired username and set the KerberosKeytabFile property to a file path pointing to the keytab file associated with the user.
1.2.3.4 User and Password
If both the KRB5CCNAME environment variable and the KerberosKeytabFile property have not been set, you can retrieve a ticket using a User and Password combination. To do this, set the User and Password properties to the user/password combo that you use to authenticate with Apache HBase.
1.2.3.5 Cross-Realm Authentication
More complex Kerberos environments may require cross-realm authentication where multiple realms and KDC servers are used (e.g. where one realm/KDC is used for user authentication and another realm/KDC used for obtaining the service ticket).
In such an environment, the KerberosRealm and KerberosKDC properties can be set to the values required for user authentication. The KerberosServiceRealm and KerberosServiceKDC properties can be set to the values required to obtain the service ticket.
The following are the connection properties for Apache HBase. Not all properties are required. Enter only property values pertaining to your installation. Several properties will be automatically initialized with the appRules defaults.
Last updated