Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

can we import one database or one table in Atlas via /usr/hdp/2.6.1.0-129/atlas/hook-bin/import-hive.sh

Guru

Team,

Can we import one database or one table in Atlas via /usr/hdp/2.6.1.0-129/atlas/hook-bin/import-hive.sh ?

Because when we ran /usr/hdp/2.6.1.0-129/atlas/hook-bin/import-hive.sh it try to import all dbs and tables from hive. But sometime we just need to import few dbs or table so is there any way to do this.

4 REPLIES 4

Expert Contributor
@Saurabh

Currently the import-hive.sh script doesn't accept any restriction/option on import of databases or tables into Atlas. It uses hiveClient to get all databases and imports each database and tables associated with them.

Guru

Thanks @Sarath Subramanian. Is it planned in coming future ?

Also I have noticed that this command getting failed after 30 mins so any idea how to prevent it ?

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:630)

at org.apache.hadoop.hive.ql.metadata.Table.getCols(Table.java:613)

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)

at org.apache.atlas.hive.bridge.HiveMetaStoreBridge.importHiveMetadata(HiveMetaStoreBridge.java:134)

at org.apache.atlas.hive.bridge.HiveMetaStoreBridge.main(HiveMetaStoreBridge.java:647)

Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.util.Bytes

Super Mentor

@Saurabh

Your following error seems to be related to : https://issues.apache.org/jira/browse/HIVE-17115

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.atlas.hive.bridge.HiveMetaStoreBridge.main(HiveMetaStoreBridge.java:647)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.util.Bytes

.

Guru

Thanks @Jay SenSharma. I will open a case and will work to apply patch if required.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.