Compiling and Running the Application
Scenario
After the code development is complete, you can run an application in the Windows development environment. If the network between the local and the cluster service plane is normal, you can perform the commissioning on the local host.
- If IBM JDK is used in the Windows environment, the application cannot be run in the Windows environment.
- Do not restart HDFS service while MapReduce application is in running status, otherwise the application will fail.
Running MapReduce Statistics Sample Project
- Ensure that all JAR packages on which the sample project depends have been obtained.
- In the IntelliJ IDEA development environment, select the LocalRunner.java project.
Right-click the project and choose
from the shortcut menu to run the project. Click to run the related application project.
Running MapReduce Accessing Multi-Component Example Project
- Save the user.keytab, hive-site.xml, hbase-site.xml, and hiveclient.properties files to the conf directory of the project.
Create the jaas_mr.conf file in the conf directory and add the following content (test is the user corresponding to user.keytab):
Client { com.sun.security.auth.module.Krb5LoginModule required useKeyTab=true keyTab="user.keytab" principal="test@<system domain name>" useTicketCache=false storeKey=true debug=true; };
- Ensure that all Hive and HBase JAR packages on which the sample project depends have been obtained.
- In the IntelliJ IDEA development environment, click MultiComponentLocalRunner.java to run the application project. You can also right-click the project and choose Run MultiComponentLocalRunner.main() from the shortcut menu to run the project.
If ZooKeeper SSL is enabled for the cluster, add the -Dzookeeper.client.secure=true -Dzookeeper.clientCnxnSocket=org.apache.zookeeper.ClientCnxnSocketNetty parameter to the position shown in the following figure before running this example.
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