When adding a secondary index to an existing table, it will cause NPE during 
re-indexing. 
------------------------------------------------------------------------------------------

                 Key: HBASE-1912
                 URL: https://issues.apache.org/jira/browse/HBASE-1912
             Project: Hadoop HBase
          Issue Type: Bug
          Components: contrib
    Affects Versions: 0.20.1, 0.20.0
            Reporter: Mingjui Ray Liao
            Priority: Minor


When adding a secondary index to an existing table, an IndexSpecification must 
be constructed.
If we construct a simple index using the following constructor: 
IndexSpecification(String indexId, byte[] indexedColumn), then the program will 
cause NPE during re-indexing. 
    
Exception in thread "main" java.lang.NullPointerException
        at 
org.apache.hadoop.hbase.regionserver.tableindexed.IndexMaintenanceUtils.createIndexUpdate(IndexMaintenanceUtils.java:57)
        at 
org.apache.hadoop.hbase.client.tableindexed.IndexedTableAdmin.reIndexTable(IndexedTableAdmin.java:144)
        at 
org.apache.hadoop.hbase.client.tableindexed.IndexedTableAdmin.addIndex(IndexedTableAdmin.java:132)
        at 
MyIndexedTable.addSecondaryIndexToExistingTable(MyIndexedTable.java:256)
        at MyIndexedTable.main(MyIndexedTable.java:276)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to