Deploying the HAF Application Service
On offload nodes, 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> -s <service_name>
It is recommended that the jar_file&classpath_dir directory be in the service_name directory under run/haf_user. If the directory is not in the service_name directory, ensure that the haf_user user has the read and execute permissions on related files.
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 |
-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 |
-s Service Name |
Service name of the application service. |
Yes |
Take example.jar as an example. Place it in the /home/omm/haf-install directory. For details about the development process of example.jar, see Operator Pushdown Mode.
Change the owner group of the JAR package to omm, run the following commands, and retain the default values for other parameters:
chmod omm:omm /home/omm/haf-install/example.jar
/home/omm/haf-install/haf-target/tools/haf-tool service -j /home/omm/haf-install/example.jar -s example
- Select Command Execution and click Add a Task.
- 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 --classpath classpath -s service_name
