Skip to content

Commit

Permalink
HBASE-22453 A NullPointerException could be thrown (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiaobao authored and saintstack committed Jun 6, 2019
1 parent 13c5af3 commit 2e9087b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ public void incrementalRestoreTable(Connection conn, Path tableBackupPath, Path[
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];
Expand Down Expand Up @@ -456,7 +459,7 @@ byte[][] generateBoundaryKeys(ArrayList<Path> regionDirList) throws IOException

/**
* 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
Expand Down

0 comments on commit 2e9087b

Please sign in to comment.