Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

On this page

Commissioning Applications on Linux

Updated on 2022-11-18 GMT+08:00

Scenario

After the code is developed, you can compile the code into a JAR file and upload it to a Linux environment for application function commissioning.

NOTE:

Before commissioning applications on Linux, you need to pre-install a client on the Linux node.

Procedure

  1. Change the path for storing the KeyTab file in the jaas-zk.conf file in the Linux environment as required. for example, /opt/client/conf/user.keytab.
  2. Modify the configuration file path of the sample code, as shown in the following example:

    private final static String PATH_TO_KRB5_CONF = "/opt/client/krb5.conf"

  3. In the Windows development environment IntelliJ IDEA, choose Maven Projects > Example project name > Lifecycle and perform the clean and package operations. After the compilation is complete, the hetu-examples-XXX.jar file is generated in the target directory.
  4. Upload the hetu-examples-XXX.jar file to the /opt/client directory in the Linux environment.
  5. Download and decompress the client file FusionInsight_Cluster_Cluster ID_HetuEngine_Client.tar by referring to Preparing Development Environment, obtain the JDBC drive package, and upload it to the /opt//client directory in the Linux environment.

    NOTE:

    The JDBC driver package hetu-jdbc-*.jar can be obtained from the FusionInsight_Cluster_1_Services_ClientConfig\HetuEngine\XXX\ directory where the cluster client software package is decompressed. In the directory, XXX indicates ARM or x86.

  6. Upload the jaas-zk.conf, user.keytab, and krb5.conf files obtained in Preparing for Security Authentication to the /opt/client directory in the Linux environment.
  7. Run the following command to go to the client installation directory:

    cd /opt/client

  8. Run the following command to configure environment variables:

    source bigdata_env

  9. Run the following command to debug the development program:

    java -classpath hetu-examples-*.jar:hetu-jdbc-*.jar com.huawei.hetu.className

    NOTE:
    • Replace the JDBC driver package name and class name with the actual ones, for example, java -classpath hetu-examples-*.jar:hetu-jdbc-*.jar com.huawei.hetu.JDBCExampleBroker.
    • If SSL authentication of ZooKeeper is enabled for the interconnected cluster, you need to add the following JVM configuration

      -Dzookeeper.clientCnxnSocket=org.apache.zookeeper.ClientCnxnSocketNetty -Dzookeeper.client.secure=true.

      Using JDBCExampleZK as an example, the corresponding debugging command is as follows: java -cp hetu-examples-*.jar:hetu-jdbc-*.jar -Dzookeeper.clientCnxnSocket=org.apache.zookeeper.ClientCnxnSocketNetty -Dzookeeper.client.secure=true com.huawei.hetu.JDBCExampleZK.

  10. Check whether the command output is normal.

    Jul 01, 2021 8:41:23 PM io.prestosql.jdbc.$internal.airlift.log.Logger info
    INFO: hsbroker finalUri is https://192.168.1.150:29860
    Jul 01, 2021 8:41:24 PM io.prestosql.jdbc.$internal.airlift.log.Logger info
    INFO: The final connection url is: presto://192.168.1.189:29896/hive/default
    Jul 01, 2021 8:41:24 PM io.prestosql.jdbc.$internal.airlift.log.Logger info
    INFO: coordinator uri is presto://192.168.1.189:29896/hive/default
    user_info	
    user_info2	

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback