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

Hudson commented on HBASE-22453:
--------------------------------

Results for branch master
        [build #1101 on 
builds.a.o|https://builds.apache.org/job/HBase%20Nightly/job/master/1101/]: (x) 
*{color:red}-1 overall{color}*
----
details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://builds.apache.org/job/HBase%20Nightly/job/master/1101//General_Nightly_Build_Report/]




(/) {color:green}+1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2) 
report|https://builds.apache.org/job/HBase%20Nightly/job/master/1101//JDK8_Nightly_Build_Report_(Hadoop2)/]


(x) {color:red}-1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) 
report|https://builds.apache.org/job/HBase%20Nightly/job/master/1101//JDK8_Nightly_Build_Report_(Hadoop3)/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


(/) {color:green}+1 client integration test{color}


> A "NullPointerException" could be thrown; "tableDescriptor" is nullable
> -----------------------------------------------------------------------
>
>                 Key: HBASE-22453
>                 URL: https://issues.apache.org/jira/browse/HBASE-22453
>             Project: HBase
>          Issue Type: Bug
>          Components: backup&restore
>    Affects Versions: 2.0.0, 2.1.2, 2.1.4
>            Reporter: lixiaobao
>            Assignee: lixiaobao
>            Priority: Critical
>             Fix For: 3.0.0
>
>         Attachments: HBASE-22453.patch
>
>
> In hbase-backup model the class  
> "org.apache.hadoop.hbase.backup.util.RestoreTool"'s method 
> incrementalRestoreTable(),A "NullPointerException" could be thrown; 
> "tableDescriptor" is nullable here.
> {code:java}
> // adjust table schema
>   for (int i = 0; i < tableNames.length; i++) {
>     TableName tableName = tableNames[i];
>     TableDescriptor tableDescriptor = getTableDescriptor(fileSys, tableName, 
> incrBackupId);
>     LOG.debug("Found descriptor " + tableDescriptor + " through " + 
> incrBackupId);
>     TableName newTableName = newTableNames[i];
>     TableDescriptor newTableDescriptor = admin.getDescriptor(newTableName);
>     List<ColumnFamilyDescriptor> families = 
> Arrays.asList(tableDescriptor.getColumnFamilies());
>     List<ColumnFamilyDescriptor> existingFamilies =
>         Arrays.asList(newTableDescriptor.getColumnFamilies());
>     TableDescriptorBuilder builder = 
> TableDescriptorBuilder.newBuilder(newTableDescriptor);
>     boolean schemaChangeNeeded = false;
>     for (ColumnFamilyDescriptor family : families) {
>       if (!existingFamilies.contains(family)) {
>         builder.setColumnFamily(family);
>         schemaChangeNeeded = true;
>       }
>     }
>     for (ColumnFamilyDescriptor family : existingFamilies) {
>       if (!families.contains(family)) {
>         builder.removeColumnFamily(family.getName());
>         schemaChangeNeeded = true;
>       }
>     }
>     if (schemaChangeNeeded) {
>       modifyTableSync(conn, builder.build());
>       LOG.info("Changed " + newTableDescriptor.getTableName() + " to: " + 
> newTableDescriptor);
>     }
>   }
>   RestoreJob restoreService = BackupRestoreFactory.getRestoreJob(conf);
>   restoreService.run(logDirs, tableNames, newTableNames, false);
> }
> //代码占位符
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to