This section describes how to add a Hive data source on HSConsole.
Currently, HetuEngine supports data sources of the following traditional data formats: AVRO, TEXT, RCTEXT, Binary, ORC, Parquet, and SequenceFile.
<property> <name>fs.trash.interval</name> <value>2880</value> </property>
<property> <name>dfs.client.failover.proxy.provider.hacluster</name> <value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value> </property>
If the Hive data source to be interconnected is in the same Hadoop cluster with HetuEngine, you can log in to the HDFS client and run the following commands to obtain the hdfs-site.xml and core-site.xml configuration files. For details, see Using the HDFS Client.
hdfs dfs -get /user/hetuserver/fiber/restcatalog/hive/core-site.xml
hdfs dfs -get /user/hetuserver/fiber/restcatalog/hive/hdfs-site.xml
The proxy user of the Hive data source must be associated with at least the hive user group.
Parameter |
Description |
Example Value |
---|---|---|
Name |
Name of the data source to be connected. The value can contain only letters, digits, and underscores (_) and must start with a letter. |
hive_1 |
Data Source Type |
Type of the data source to be connected. Select Hive. |
Hive |
Mode |
Mode of the current cluster. The default value is Security Mode. |
- |
Description |
Description of the data source. The value can contain only letters, digits, commas (,), periods (.), underscores (_), spaces, and line breaks. |
- |
Parameter |
Description |
Example Value |
---|---|---|
Driver |
The default value is fi-hive-hadoop. |
fi-hive-hadoop |
hdfs-site File |
Select the hdfs-site.xml configuration file obtained in 1. The file name is fixed. |
- |
core-site File |
Select the core-site.xml configuration file obtained in 1. The file name is fixed. |
- |
krb5 File |
Configure this parameter when the security mode is enabled. It is the configuration file used for Kerberos authentication. Select the krb5.conf file obtained in 2. |
krb5.conf |
Enable Data Source Authentication |
Whether to use the permission policy of the Hive data source for authentication. If Ranger is disabled for the HetuEngine service, select Yes. If Ranger is enabled, select No. |
No |
Parameter |
Description |
Example Value |
---|---|---|
Metastore URL |
URL of the MetaStore of the data source. For details, see 3. |
thrift://10.92.8.42:21088,thrift://10.92.8.43:21088,thrift://10.92.8.44:21088 |
Security Authentication Mechanism |
After the security mode is enabled, the default value is KERBEROS. |
KERBEROS |
Server Principal |
Configure this parameter when the security mode is enabled. It specifies the username with domain name used by meta to access MetaStore. For details, see 3. |
hive/hadoop.hadoop.com@HADOOP.COM |
Client Principal |
Configure this parameter when the security mode is enabled. The parameter format is as follows: Username for accessing MetaStore@domain name (uppercase).COM. Username for accessing MetaStore is the user to which the user.keytab file obtained in 2 belongs. |
admintest@HADOOP.COM |
Keytab File |
Configure this parameter when the security mode is enabled. It specifies the keytab credential file of the MetaStore user name. The file name is fixed. Select the user.keytab file obtained in 2. |
user.keytab |
Parameter |
Description |
Example Value |
---|---|---|
Data Source User |
Data source user information. The value can contain only letters, digits, underscores (_), hyphens (-), and periods (.), and must start with a letter or underscore (_). The minimum length is 2 characters and the maximum length is 100 characters. |
If the data source user is set to hiveuser1, a HetuEngine user mapped to hiveuser1 must exist. For example, create hetuuser1 and map it to hiveuser1. |
Keytab File |
Obtain the authentication credential of the user corresponding to the data source. |
hiveuser1.keytab |
Parameter |
Description |
Example Value |
---|---|---|
HetuEngine User |
HetuEngine user information. The value can contain only letters, digits, underscores (_), hyphens (-), and periods (.), and must start with a letter or underscore (_). The minimum length is 2 characters and the maximum length is 100 characters. |
hetuuser1 |
Data Source User |
Data source user information. The value can contain only letters, digits, underscores (_), hyphens (-), and periods (.), and must start with a letter or underscore (_). The minimum length is 2 characters and the maximum length is 100 characters. |
hiveuser1 (data source user configured in Table 5) |
Parameter |
Description |
Example Value |
---|---|---|
hive.metastore.connection.pool.maxTotal |
Maximum number of connections in the connection pool. |
50 (Value range: 0-200) |
hive.metastore.connection.pool.maxIdle |
Maximum number of idle threads in the connection pool. When the number of idle threads reaches the maximum number, new threads are not released. Default value: 10. |
10 (The value ranges from 0 to 200 and cannot exceed the maximum number of connections.) |
hive.metastore.connection.pool.minIdle |
Minimum number of idle threads in the connection pool. When the number of idle threads reaches the minimum number, the thread pool does not create new threads. Default value: 10. |
10 (The value ranges from 0 to 200 and cannot exceed the value of hive.metastore.connection.pool.maxIdle.) |
cd /opt/client
source bigdata_env
kinit User performing HetuEngine operations (If the cluster is in normal mode, skip this step.)
hetu-cli --catalog Data source name --schema default
For example, run the following command:
hetu-cli --catalog hive_1 --schema default
Table --------- hivetb (1 rows) Query 20210730_084524_00023_u3sri@default@HetuEngine, FINISHED, 3 nodes Splits: 36 total, 36 done (100.00%) 0:00 [2 rows, 47B] [7 rows/s, 167B/s]