[ 
https://issues.apache.org/jira/browse/HBASE-16655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15504765#comment-15504765
 ] 

Ted Yu commented on HBASE-16655:
--------------------------------

Addendum 6 would result in retrieving progress for null backup Id if there is 
no backup Id specified on the command line:
{code}
"main" #1 prio=5 os_prio=31 tid=0x00007fe493006800 nid=0x1703 waiting on 
condition [0x0000700000217000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(Native Method)
        at java.lang.Thread.sleep(Thread.java:340)
        at java.util.concurrent.TimeUnit.sleep(TimeUnit.java:386)
        at 
org.apache.hadoop.hbase.util.RetryCounter.sleepUntilNextRetry(RetryCounter.java:158)
        at 
org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.getData(RecoverableZooKeeper.java:373)
        at org.apache.hadoop.hbase.zookeeper.ZKUtil.getData(ZKUtil.java:620)
        at 
org.apache.hadoop.hbase.zookeeper.MetaTableLocator.getMetaRegionState(MetaTableLocator.java:479)
        at 
org.apache.hadoop.hbase.zookeeper.MetaTableLocator.getMetaRegionLocation(MetaTableLocator.java:165)
        at 
org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:596)
        at 
org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:577)
        at 
org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:556)
        at 
org.apache.hadoop.hbase.client.ZooKeeperRegistry.getMetaRegionLocation(ZooKeeperRegistry.java:58)
        at 
org.apache.hadoop.hbase.client.ConnectionImplementation.locateMeta(ConnectionImplementation.java:765)
        - locked <0x000000078a5e7d48> (a java.lang.Object)
        at 
org.apache.hadoop.hbase.client.ConnectionImplementation.locateRegion(ConnectionImplementation.java:732)
        at 
org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:298)
        at 
org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:156)
        at 
org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:60)
        at 
org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithoutRetries(RpcRetryingCallerImpl.java:185)
        at 
org.apache.hadoop.hbase.client.ClientSmallReversedScanner.loadCache(ClientSmallReversedScanner.java:212)
        at 
org.apache.hadoop.hbase.client.ClientSmallReversedScanner.next(ClientSmallReversedScanner.java:186)
        at 
org.apache.hadoop.hbase.client.ConnectionImplementation.locateRegionInMeta(ConnectionImplementation.java:829)
        at 
org.apache.hadoop.hbase.client.ConnectionImplementation.locateRegion(ConnectionImplementation.java:735)
        at 
org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:298)
        at 
org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:156)
        at 
org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:60)
        at 
org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithoutRetries(RpcRetryingCallerImpl.java:185)
        at 
org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:311)
        at 
org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:286)
        at 
org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:162)
        at 
org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:155)
        at 
org.apache.hadoop.hbase.client.ClientSimpleScanner.<init>(ClientSimpleScanner.java:40)
        at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:381)
        at 
org.apache.hadoop.hbase.backup.impl.BackupSystemTable.getBackupContexts(BackupSystemTable.java:355)
        at 
org.apache.hadoop.hbase.client.HBaseBackupAdmin.getProgress(HBaseBackupAdmin.java:88)
        at 
org.apache.hadoop.hbase.backup.impl.BackupCommands$ProgressCommand.execute(BackupCommands.java:367)
        at 
org.apache.hadoop.hbase.backup.BackupDriver.parseAndRun(BackupDriver.java:114)
        at 
org.apache.hadoop.hbase.backup.BackupDriver.doWork(BackupDriver.java:135)
        at 
org.apache.hadoop.hbase.backup.BackupDriver.run(BackupDriver.java:171)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at 
org.apache.hadoop.hbase.backup.TestBackupCommandLineTool.testBackupDriverProgressHelp(TestBackupCommandLineTool.java:176)
{code}
Let me make a patch that combines addendum 6 and my patch.

> hbase backup describe with incorrect backup id results in NPE
> -------------------------------------------------------------
>
>                 Key: HBASE-16655
>                 URL: https://issues.apache.org/jira/browse/HBASE-16655
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>              Labels: backup
>         Attachments: 16655.v2.txt
>
>
> If the user supplies backup Id which is non-existent, we would get 
> NullPointerException :
> {code}
> 2016-09-19 10:26:50,771 ERROR [main] backup.BackupDriver(173): Error running 
> command-line tool
> java.lang.NullPointerException
>   at 
> org.apache.hadoop.hbase.backup.impl.BackupCommands$DescribeCommand.execute(BackupCommands.java:329)
>   at 
> org.apache.hadoop.hbase.backup.BackupDriver.parseAndRun(BackupDriver.java:114)
>   at org.apache.hadoop.hbase.backup.BackupDriver.doWork(BackupDriver.java:135)
>   at org.apache.hadoop.hbase.backup.BackupDriver.run(BackupDriver.java:171)
>   at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
>   at 
> org.apache.hadoop.hbase.backup.TestBackupDescribe.testBackupDescribe(TestBackupDescribe.java:67)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to