Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-4895

NoClassDefFound when use IndexTool create async index

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 5.0.0
    • 5.1.0
    • None
    • HDP :3.0.0

      HBase :2.0.0

      Phoenix : 5.0.0

      Hadoop : 3.1.0

    • Important

    Description

      First I created a table:

      CREATE TABLE TMP_TEST(
      ID VARCHAR NOT NULL PRIMARY KEY,
      NAME VARCHAR,
      ADDR VARCHAR,
      AGE BIGINT DEFAULT 10
      );

      Then I created the asynchronous index table:

      CREATE INDEX ASYNC_IDX ON TMP_TEST (NAME, ADDR) INCLUDE (AGE) ASYNC;

      Finally, perform the MapReduce Task:

      ./hbase org.apache.phoenix.mapreduce.index.IndexTool --schema default --data-table TMP_TEST --index-table ASYNC_IDX --output-path ASYNC_IDX_HFILES

      But I received an error message:

      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli/DefaultParser
      at org.apache.phoenix.mapreduce.index.IndexTool.parseOptions(IndexTool.java:183)
      at org.apache.phoenix.mapreduce.index.IndexTool.run(IndexTool.java:522)
      at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
      at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
      at org.apache.phoenix.mapreduce.index.IndexTool.main(IndexTool.java:769)
      Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.DefaultParser
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 5 more

      Please give me some advice,Thanks!

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              MariaCarrie MariaCarrie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 24h
                  24h
                  Remaining:
                  Remaining Estimate - 24h
                  24h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified