Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-2288

NoClassDefFoundError Exception while running import-hive script when hbase table is created via Hive

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.1
    • 0.8.2, 1.0.0
    • None
    • None

    Description

      Import hive fails with NoClassDefFoundError when it try to hbase table created via hive.

      	CREATE TABLE 'hbase_table_1'( 'key' int COMMENT 'from deserializer', 'value' string COMMENT 'from deserializer') ROW FORMAT SERDE 'org.apache.hadoop.hive.hbase.HBaseSerDe' STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler WITH SERDEPROPERTIES ( 'hbase.columns.mapping'=':key,cf1:val', 'serialization.format'='1') TBLPROPERTIES ( 'hbase.table.name'='def', 'transient_lastDdlTime'='1483707502'); 

      
      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/util/Bytes 
      at org.apache.hadoop.hive.hbase.HBaseSerDe.parseColumnsMapping(HBaseSerDe.java:184) 
      at org.apache.hadoop.hive.hbase.HBaseSerDeParameters.<init>(HBaseSerDeParameters.java:73) 
      at org.apache.hadoop.hive.hbase.HBaseSerDe.initialize(HBaseSerDe.java:117) 
      at org.apache.hadoop.hive.serde2.AbstractSerDe.initialize(AbstractSerDe.java:54) 
      at org.apache.hadoop.hive.serde2.SerDeUtils.initializeSerDe(SerDeUtils.java:521) 
      at org.apache.hadoop.hive.metastore.MetaStoreUtils.getDeserializer(MetaStoreUtils.java:410) 
      at org.apache.hadoop.hive.metastore.MetaStoreUtils.getDeserializer(MetaStoreUtils.java:397) 
      at org.apache.hadoop.hive.ql.metadata.Table.getDeserializerFromMetaStore(Table.java:278) 
      at org.apache.hadoop.hive.ql.metadata.Table.getDeserializer(Table.java:260) 
      at org.apache.hadoop.hive.ql.metadata.Table.getColsInternal(Table.java:622) 
      at org.apache.hadoop.hive.ql.metadata.Table.getCols(Table.java:605) 
      at org.apache.atlas.hive.bridge.HiveMetaStoreBridge.createOrUpdateTableInstance(HiveMetaStoreBridge.java:488) 
      at org.apache.atlas.hive.bridge.HiveMetaStoreBridge.createTableInstance(HiveMetaStoreBridge.java:424) 
      at org.apache.atlas.hive.bridge.HiveMetaStoreBridge.registerTable(HiveMetaStoreBridge.java:505) 
      at org.apache.atlas.hive.bridge.HiveMetaStoreBridge.importTable(HiveMetaStoreBridge.java:289) 
      at org.apache.atlas.hive.bridge.HiveMetaStoreBridge.importTables(HiveMetaStoreBridge.java:272) 
      at org.apache.atlas.hive.bridge.HiveMetaStoreBridge.importDatabases(HiveMetaStoreBridge.java:143) 
      

      The fix for this issue is to copy hbase-common.jar file into Hive hook atlas-hive-plugin-impl/ directory.

      Attachments

        1. ATLAS-2284-branch-0.8.patch
          1 kB
          Nixon Rodrigues
        2. ATLAS-2284-master.patch
          1 kB
          Nixon Rodrigues

        Activity

          People

            nixon Nixon Rodrigues
            nixon Nixon Rodrigues
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: