HBase
  1. HBase
  2. HBASE-10937

How to run CsvBulkLoadTool of Phoenix 4.0

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: documentation
    • Labels:
      None

      Description

      There is known issue to run MR job for hbase0.96+ version. Details at section “Notice to Mapreduce users of HBase 0.96.1 and above” https://hbase.apache.org/book.html

      Basically we need to put hbase-protocol*.jar before hadoop loads protobuf-java jar. I updated our documentation on http://phoenix.incubator.apache.org/bulk_dataload.html on how to use CsvBulkLoadTool for Phoenix 4.0 as following:

      HADOOP_CLASSPATH=$(hbase mapredcp)::/path/to/hbase/conf hadoop jar phoenix-4.0.0-incubating-client.jar org.apache.phoenix.mapreduce.CsvBulkLoadTool --table EXAMPLE --input /data/example.csv
      

      OR

      HADOOP_CLASSPATH=/path/to/hbase-protocol.jar:/path/to/hbase/conf hadoop jar phoenix-4.0.0-incubating-client.jar org.apache.phoenix.mapreduce.CsvBulkLoadTool --table EXAMPLE --input /data/example.csv
      

      Thanks.

        Activity

        Jeffrey Zhong created issue -
        Jeffrey Zhong made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Arijit Banerjee added a comment -

        Having to set HADOOP_CLASSPATH variable creates additional problem when running the job from Oozie. Currently I don't see support to set an environment variable in Oozie Java action.

        Show
        Arijit Banerjee added a comment - Having to set HADOOP_CLASSPATH variable creates additional problem when running the job from Oozie. Currently I don't see support to set an environment variable in Oozie Java action.

          People

          • Assignee:
            Jeffrey Zhong
            Reporter:
            Jeffrey Zhong
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development