Updated on 2022-08-16 GMT+08:00

Compiling and Running Applications

Scenario

After the code development is complete using Java APIs, you can run applications in the Windows development environment. If the local and cluster service planes can communicate with each other, you can perform the commissioning on the local host.

Procedure

  • The HTTPS SSL certificate is required for running applications in Windows.
    1. Log in to any node in the cluster and go to the following directory to download the ca.crt file.

      cd ${BIGDATA_HOME}/om-agent_8.1.0.1/nodeagent/security/cert/subcert/certFile/

    2. Download the ca.crt file to a local directory and open the CLI as the administrator.

      Run the following command:

      keytool -import -v -trustcacerts -alias ca -file "D:\xx\ca.crt" -storepass changeit -keystore "%JAVA_HOME%\jre\lib\security\cacerts"

      In the preceding command, D:\xx\ca.crt is the path for storing the ca.crt file. %JAVA_HOME % indicates the JDK installation path.

    1. In the development environment (such as IDEA), right-click OozieRestApiMain.java, and choose Run 'OozieRestApiMain.main()' to run the application project.
  • Run the following command on the Oozie client:

    oozie job -oozie https://Oozie service IP:21003/oozie -config job.properties -run

    You need to copy the job.properties file in the src\main\resources directory of the sample project to the directory where the Oozie client is located in advance.