This section uses DBeaver 6.3.5 as an example to describe how to perform operations on HetuEngine.
Currently, DBeaver 5.x and 6.x are supported.
Method 1: Using ZooKeeper to access HetuEngine
Obtaining the JDBC file:
Obtain the hetu-jdbc-*.jar file from the FusionInsight_Cluster_Cluster ID_HetuEngine_ClientConfig\HetuEngine\xxx\ directory.
Note: xxx can be arm or x86.
The version 8.1.2.2 is used as an example. Replace it with the actual version number.
Modify the jaas-zk.conf file as follows. keyTab is the keytab file path of the user who accesses HetuEngine, and principal is Username for accessing HetuEngine@Domain name in uppercase.COM.
Client { com.sun.security.auth.module.Krb5LoginModule required useKeyTab=true keyTab="D:\\tmp\\user.keytab" principal="admintest@HADOOP.COM" useTicketCache=false storeKey=true debug=true; };
Host IP address Host name
Example: 192.168.23.221 192-168-23-221
The local hosts file in a Windows environment is stored in, for example, C:\Windows\System32\drivers\etc.
-VM C:\Program Files\Java\jdk1.8.0_131\bin
-Dsun.security.krb5.debug=true -Djava.security.auth.login.config=D:\tmp\jaas-zk.conf -Dzookeeper.sasl.clientconfig=Client -Dzookeeper.auth.type=kerberos -Djava.security.krb5.conf=D:\tmp\krb5.conf
URL format: jdbc:presto://IP address of node 1 where the ZooKeeper service resides:2181,IP address of node 2 where the ZooKeeper service resides:2181,IP address of node 3 where the ZooKeeper service resides:2181/hive/default?serviceDiscoveryMode=zooKeeper&zooKeeperNamespace=hsbroker&zooKeeperServerPrincipal=zookeeper/hadoop.hadoop.com
Example: jdbc:presto://192.168.8.37:2181,192.168.8.38:2181,192.168.8.39:2181/hive/default?serviceDiscoveryMode=zooKeeper&zooKeeperNamespace=hsbroker&zooKeeperServerPrincipal=zookeeper/hadoop.hadoop.com
Parameter |
Example Value |
---|---|
KerberosPrincipal |
zhangsan NOTE:
Human-machine user created in the cluster. For details, see Creating a HetuEngine User. |
KerberosKeytabPath |
D:\\user.keytab NOTE:
You need to configure this parameter when using the keytab mode for access. |
KerberosRemoteServiceName |
HTTP |
SSL |
true |
deploymentMode |
on_yarn |
tenant |
default NOTE:
The tenant to which the user belongs needs to be configured in the cluster. |
user |
zhangsan NOTE:
Human-machine user created in the cluster. For details, see Creating a HetuEngine User. |
password |
zhangsan@##65331853 NOTE:
|
KerberosConfigPath |
D:\\krb5.conf |
SSLTrustStorePath |
D:\\hetuserver.jks |
Figure 1 shows an example of the parameter settings.
If a message is displayed indicating that you do not have the permission to view the table, configure the permission by referring to Configuring Permissions for Tables, Columns, and Databases.
Method 2: Using HSBroker to access HetuEngine
Parameter |
Value |
Remarks |
---|---|---|
Class Name |
io.prestosql.jdbc.PrestoDriver |
/ |
URL Template |
URL of HetuEngine |
URL format: jdbc:presto://<HSBrokerIP1:port1>,<HSBrokerIP2:port2>,<HSBrokerIP3:port3>/hive/default?serviceDiscoveryMode=hsbroker |