Rate This Document
Findability
Accuracy
Completeness
Readability

Configuring the HAF Application Service

On an offload node, run the following command to configure the HAF application service:

/home/omm/haf-install/haf-target/tools/haf-tool service -j <jar_file> -f <main_func> -x <jvm_config> --timeout <timeout_value> --classpath <classpath_dir>

  • For the first configuration, use --start. In the OmniData scenario, the configuration has been performed and the service has been restarted during the deployment and installation. For details, see Installing OmniData.
  • It is recommended that the jar_file&classpath_dir directory be in run/haf_user. If the directory is not in run/haf_user, ensure that the haf_user user has the read and execute permissions on related files.
  • After the configuration is complete, run /home/omm/haf-install/haf-target/tools/haf-tool service --restart for the configuration to take effect.
Table 1 Parameter description

Option

Description

Mandatory

-j Executor file/--jar=Executor file

Path of the application service execution file and name of the main JAR package of the service.

Yes (Mandatory for the first use)

-f Main function

Name of the main function in the application service package. The default value is null.

No

-x JVM extra options

JVM configuration of the application service. The default value is null.

NOTE:

Set this parameter based on the JVM usage. If this parameter is not set, the default JVM configuration is used. For example, JVM error logs are generated in the run directory by default.

No

--timeout=Channel timeout

Timeout interval of the communication channel between the application service and the active node. The default value is 120.

No

--classpath=Class path

Path of the class file on which the application service depends.

No

Take OmniData as an example. The command is as follows:

/home/omm/haf-install/haf-target/tools/haf-tool service -j /home/omm/haf-install/haf-target/run/haf_user/omnidata/lib/boostkit-omnidata-server-1.3.0-aarch64.jar -f com.huawei.boostkit.omnidata.server.OmniDataServerMain.serverMain -x "-DomnidataConfig=/home/omm/haf-install/haf-target/run/haf_user/omnidata/etc/config.properties -Dconfig=/home/omm/haf-install/haf-target/run/haf_user/omnidata/etc/airliftconfig.properties -Dlogback.configurationFile=/home/omm/haf-install/haf-target/run/haf_user/omnidata/etc/logback.xml" --classpath /home/omm/haf-install/haf-target/run/haf_user/omnidata/lib/

  1. Select Command Execution and click Add a Task.
  2. Edit the task content and click Save.

    Parameter

    Description

    Task Name

    Configuring the application service

    Task Description

    Configuring the application service

    Run Directory

    /

    Run Command

    /home/omm/haf-install/haf-target/tools/haf-tool service -j main_jar -f main_func -x jvm_config --tag service_name --classpath classpath