An Error Is Reported When a Sqoop Task Is Created Using Hue to Import Data from HBase to HDFS
Issue
An error is reported when a Sqoop operation is performed on Hue to export data from HBase to HDFS.
Caused by: java.lang.ClassNotFoundException: org.apache.htrace.Trace
This section applies only to MRS 1.9.2 clusters.
Symptom
The Sqoop task is executed successfully, but the CSV file in HDFS is empty.
Cause Analysis
JAR packages conflict or related JAR packages are missing.
Procedure
- Go to the Sqoop installation directory and search for files.
- Go to the /opt/Bigdata/MRS_1.9.2/install/FusionInsight-Sqoop-1.99.7/FusionInsight-Sqoop-1.99.7/server/lib directory on the Sqoop node and run grep.
- Go to the native Yarn web UI and view the error information about the running task.
- Copy java.class.path and search for htrace-core.
- Copy the JAR package to the following directory:
cp /opt/Bigdata/MRS_1.9.2/install/FusionInsight-Sqoop-1.99.7/FusionInsight-Sqoop-1.99.7/server/lib/htrace-core-3.1.0-incubating.jar /opt/Bigdata/MRS_1.9.2/install/FusionInsight-Hadoop-2.8.3/hadoop/share/hadoop/common/lib/
- Change permissions.
chmod 777 htrace-core-3.1.0-incubating.jar (the copied JAR package)
chown omm:ficommon htrace-core-3.1.0-incubating.jar (the copied JAR package)
- View the hosts file and perform the same operations to copy the JAR package for all other nodes.
- Run the Sqoop task again. The following error information is displayed.
- Go to the /opt/Bigdata/MRS_1.9.2/install/FusionInsight-Sqoop-1.99.7/FusionInsight-Sqoop-1.99.7/server/lib directory on the Sqoop node and run grep.
- Go to the HBase installation directory and search for files.
- Go to the lib directory of HBase and run grep.
- Copy the JAR package.
cp /opt/Bigdata/MRS_1.9.2/install/FusionInsight-HBase-1.3.1/hbase/lib/metrics-core-2.2.0.jar /opt/Bigdata/MRS_1.9.2/install/FusionInsight-Hadoop-2.8.3/hadoop/share/hadoop/common/lib/
- Change permissions.
chmod 777 metrics-core-2.2.0.jar (the copied JAR package)
chown omm:ficommon metrics-core-2.2.0.jar (the copied JAR package)
- View the hosts file and perform the same operations to copy the JAR package for all other nodes.
- Run the Sqoop task.
- Go to the lib directory of HBase and run grep.
Conclusion
- Copy htrace-core-3.1.0-incubating.jar in the lib directory of Sqoop and metrics-core-2.2.0.jar in the lib directory of HBase to /opt/Bigdata/MRS_1.9.2/install/FusionInsight-Hadoop-2.8.3/hadoop/share/hadoop/common/lib/.
- Change the permissions for the JAR packages to 777 and omm:ficommon, respectively.
- Perform the preceding operations on all nodes and run the Sqoop task again.
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