Failed to Export HBase Data to HDFS Through Hue's Sqoop Task
This section applies only to MRS 1.9.2 clusters.
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
Symptom
The Sqoop task is executed successfully, but the CSV file in HDFS is empty.
Cause Analysis
The JAR package conflicts or is missing.
Procedure
- Use the grep command in the lib directory of Sqoop.
- Go to the lib directory of Sqoop and run the grep command.
- Go to the native Yarn page 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 lib directory of Sqoop and run the grep command.
- Use the grep command in the lib directory of HBase.
- Go to the lib directory of HBase and run the grep command.
- 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 the grep command.
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.