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.
- 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/
- 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.
- In the development environment (such as IDEA), right-click OozieRestApiMain.java, and choose Run 'OozieRestApiMain.main()' to run the application project.
- Log in to any node in the cluster and go to the following directory to download the ca.crt file.
- 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot