Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-4887

Upgrade tool throws exception on non-CDAP table

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.0
    • Component/s: CDAP
    • Labels:
      None
    • Release Notes:
      Fix UpgradeTool to not fail when encountering a non-CDAP table that simply follows CDAP naming convention.
    • Rank:
      1|hzz6dz:

      Description

      When running the upgrade tool with "upgrade_hbase" argument, it is throwing an error on a non-cdap table. Full log is attached.

      Failed to perform action 'UPGRADE_HBASE'. Reason: 'expected table name to contain '.': mytable'.
      java.lang.IllegalArgumentException: expected table name to contain '.': mytable
              at com.google.common.base.Preconditions.checkArgument(Preconditions.java:92)
              at co.cask.cdap.data2.util.hbase.HTableNameConverter.fromHBaseTableName(HTableNameConverter.java:110)
              at co.cask.cdap.data2.util.hbase.HTable10CDH550NameConverter.prefixedTableIdFromTableName(HTable10CDH550NameConverter.java:50)
              at co.cask.cdap.data2.util.hbase.HTable10CDH550NameConverter.from(HTable10CDH550NameConverter.java:36)
              at co.cask.cdap.data.tools.DatasetUpgrader.upgradeUserTable(DatasetUpgrader.java:106)
              at co.cask.cdap.data.tools.DatasetUpgrader.upgradeUserTables(DatasetUpgrader.java:98)
              at co.cask.cdap.data.tools.DatasetUpgrader.upgrade(DatasetUpgrader.java:80)
              at co.cask.cdap.data.tools.UpgradeTool.performCoprocessorUpgrade(UpgradeTool.java:401)
              at co.cask.cdap.data.tools.UpgradeTool.performHBaseUpgrade(UpgradeTool.java:395)
              at co.cask.cdap.data.tools.UpgradeTool.doMain(UpgradeTool.java:324)
              at co.cask.cdap.data.tools.UpgradeTool.main(UpgradeTool.java:413)
      

      Existing HBase tables

      hbase(main):001:0> list
      TABLE                                                                                                                                                                               
      cdap.system.stream.state.store                                                                                                                                                      
      cdap.user.activations.partitions.d                                                                                                                                                  
      cdap.user.activations.partitions.i                                                                                                                                                  
      cdap.user.columns.partitions.d                                                                                                                                                      
      cdap.user.columns.partitions.i                                                                                                                                                      
      cdap.user.contacts_hbase                                                                                                                                                            
      cdap.user.features                                                                                                                                                                  
      cdap.user.final.partitions.d                                                                                                                                                        
      cdap.user.final.partitions.i                                                                                                                                                        
      cdap.user.impressions.partitions.d                                                                                                                                                  
      cdap.user.impressions.partitions.i                                                                                                                                                  
      cdap.user.merchants.kv                                                                                                                                                              
      cdap.user.redemptions.partitions.d                                                                                                                                                  
      cdap.user.redemptions.partitions.i                                                                                                                                                  
      cdap.user.staging.partitions.d                                                                                                                                                      
      cdap.user.staging.partitions.i                                                                                                                                                      
      cdap.user.transactions.partitions.d                                                                                                                                                 
      cdap.user.transactions.partitions.i                                                                                                                                                 
      cdap.user.users.kv                                                                                                                                                                  
      cdap_system:app.meta                                                                                                                                                                
      cdap_system:artifact.meta                                                                                                                                                           
      cdap_system:business.metadata.metadata_index.d                                                                                                                                      
      cdap_system:business.metadata.metadata_index.i                                                                                                                                      
      cdap_system:cdap.services.instances                                                                                                                                                 
      cdap_system:config.store.table                                                                                                                                                      
      cdap_system:configuration                                                                                                                                                           
      cdap_system:datasets.instance                                                                                                                                                       
      cdap_system:datasets.type                                                                                                                                                           
      cdap_system:lineage.access_registry                                                                                                                                                 
      cdap_system:log.meta                                                                                                                                                                
      cdap_system:metrics.kafka.meta                                                                                                                                                      
      cdap_system:metrics.v2.entity                                                                                                                                                       
      cdap_system:metrics.v2.table.ts.1                                                                                                                                                   
      cdap_system:metrics.v2.table.ts.2147483647                                                                                                                                          
      cdap_system:metrics.v2.table.ts.3600                                                                                                                                                
      cdap_system:metrics.v2.table.ts.60                                                                                                                                                  
      cdap_system:schedulestore                                                                                                                                                           
      cdap_system:system.metadata.metadata_index.d                                                                                                                                        
      cdap_system:system.metadata.metadata_index.i                                                                                                                                        
      cdap_system:usage.registry                                                                                                                                                          
      cdap_system:workflow.stats                                                                                                                                                          
      mytable                                                                                                                                                                             
      42 row(s) in 0.2370 seconds
      
      

        Attachments

          Activity

            People

            • Assignee:
              ali.anwar Ali Anwar
              Reporter:
              derek Derek Wood
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: