Updated on 2022-11-18 GMT+08:00

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.

Do not restart HDFS service while MapReduce application is in running status, otherwise the application will fail.

Running MapReduce Statistics Sample Project

  1. Ensure that all JAR packages on which the sample project depends have been obtained.
  2. In the IntelliJ IDEA development environment, select the LocalRunner.java project. Right-click the project and choose Run MultiComponentLocalRunner.main() from the shortcut menu to run the project. Click to run the related application project.

Running Sample Applications About Multi-Components

  1. Save the hive-site.xml, hbase-site.xml, and hiveclient.properties files to the conf directory of the project.
  2. Ensure that all Hive and HBase JAR packages on which the sample project depends have been obtained.
  3. In the MultiComponentLocalRunner.java code, System.setProperty("HADOOP_USER_NAME", "root"); specifies that user root is used. Ensure that user root is used for uploading data, or change user root in the code to the username used for uploading data.
  4. 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.