Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-22952

HBCK2 replication command is incompatible with 2.0.x

    XMLWordPrintableJSON

Details

    Description

      HBCK2 does not have a valid version check for `replication` command on 2.0 releases.

      This command relies on ReplicationQueueStorage and ReplicationStorageFactory classes which were added in 2.1.0 so running HBCK2 replication on a 2.0 cluster causes runtime error.

      $ bin/hbase hbck -j hbase-hbck2-1.0.0-SNAPSHOT.jar replication
      17:36:16.362 [main] WARN  org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
      17:36:16.634 [main] INFO  org.apache.hadoop.hbase.zookeeper.ReadOnlyZKClient - Connect 0x201a4587 to localhost:2181 with session timeout=90000ms, retries 30, retry interval 1000ms, keepAlive=60000ms
      17:36:17.246 [main] INFO  org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper - Process identifier=HBCK2 connecting to ZooKeeper ensemble=localhost:2181
      17:36:17.253 [main] INFO  org.apache.hadoop.hbase.client.ConnectionImplementation - Closing master protocol: MasterService
      17:36:17.253 [main] INFO  org.apache.hadoop.hbase.zookeeper.ReadOnlyZKClient - Close zookeeper connection 0x201a4587 to localhost:2181
      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/replication/ReplicationStorageFactory
      	at org.apache.hbase.hbck1.ReplicationChecker.<init>(ReplicationChecker.java:59)
      	at org.apache.hbase.hbck1.HBaseFsck.checkAndFixReplication(HBaseFsck.java:3772)
      	at org.apache.hbase.ReplicationFsck.fsck(ReplicationFsck.java:65)
      	at org.apache.hbase.HBCK2.doCommandLine(HBCK2.java:571)
      	at org.apache.hbase.HBCK2.run(HBCK2.java:470)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
      	at org.apache.hbase.HBCK2.main(HBCK2.java:620)
      Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.replication.ReplicationStorageFactory
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	... 8 more
      

      Attachments

        Issue Links

          Activity

            People

              psomogyi Peter Somogyi
              psomogyi Peter Somogyi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: