You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2019/06/06 22:52:44 UTC
[hbase] branch master updated: HBASE-22453 A NullPointerException
could be thrown (#272)
This is an automated email from the ASF dual-hosted git repository.
stack pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new 2e9087b HBASE-22453 A NullPointerException could be thrown (#272)
2e9087b is described below
commit 2e9087bfb737c4a1a028afff13a6e15fc9c88dc6
Author: lixiaobao <li...@mininglamp.com>
AuthorDate: Fri Jun 7 06:52:39 2019 +0800
HBASE-22453 A NullPointerException could be thrown (#272)
---
.../main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java
index 13b183d..8de7118 100644
--- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java
+++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java
@@ -169,6 +169,9 @@ public class RestoreTool {
for (int i = 0; i < tableNames.length; i++) {
TableName tableName = tableNames[i];
TableDescriptor tableDescriptor = getTableDescriptor(fileSys, tableName, incrBackupId);
+ if (tableDescriptor == null) {
+ throw new IOException("Can't find " + tableName + "'s descriptor.");
+ }
LOG.debug("Found descriptor " + tableDescriptor + " through " + incrBackupId);
TableName newTableName = newTableNames[i];
@@ -456,7 +459,7 @@ public class RestoreTool {
/**
* Prepare the table for bulkload, most codes copied from
- * {@link LoadIncrementalHFiles#createTable(TableName, String, Admin)}
+ * {@link LoadIncrementalHFiles#createTable(TableName, Path, Admin)}
* @param conn connection
* @param tableBackupPath path
* @param tableName table name