Help Center/ MapReduce Service/ User Guide (ME-Abu Dhabi Region)/ Troubleshooting/ Using Sqoop/ Failed to Export HBase Data to HDFS Through Hue's Sqoop Task
Updated on 2022-12-08 GMT+08:00

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

  1. Use the grep command in the lib directory of Sqoop.

    1. Go to the lib directory of Sqoop and run the grep command.

    2. Go to the native Yarn page and view the error information about the running task.

    3. Copy java.class.path and search for htrace-core.

    4. 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/

    5. 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)

    6. View the hosts file and perform the same operations to copy the JAR package for all other nodes.

    7. Run the Sqoop task again. The following error information is displayed.

  2. Use the grep command in the lib directory of HBase.

    1. Go to the lib directory of HBase and run the grep command.

    2. 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/

    3. 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)

    4. View the hosts file and perform the same operations to copy the JAR package for all other nodes.
    5. Run the Sqoop task.

Conclusion

  1. 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/.
  2. Change the permissions for the JAR packages to 777 and omm:ficommon, respectively.
  3. Perform the preceding operations on all nodes and run the Sqoop task again.