[
https://issues.apache.org/jira/browse/ATLAS-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15209413#comment-15209413
]
Suma Shivaprasad edited comment on ATLAS-588 at 3/23/16 11:32 PM:
------------------------------------------------------------------
When the bridge tries to import partitions for a specific table, the hive calls
to getPartitions is returning results even though the table is not partitioned
in the first place.
Eg : See table_1 in autoquerygen database which failed during the import.
List<Partition> tableParts = hiveClient.getPartitions(table); should not return
any results but this seems to be the case and this is causing hive import to
fail.
"show partitions table_1" fails with the error
0: jdbc:hive2://localhost:10000> show partitions table_1;
Error: Error while processing statement: FAILED: Execution Error, return code 1
from org.apache.hadoop.hive.ql.exec.DDLTask. Table table_1 is not a partitioned
table (state=08S01,code=1)
was (Author: suma.shivaprasad):
"show partitions table_1" fails with the error
0: jdbc:hive2://localhost:10000> show partitions table_1;
Error: Error while processing statement: FAILED: Execution Error, return code 1
from org.apache.hadoop.hive.ql.exec.DDLTask. Table table_1 is not a partitioned
table (state=08S01,code=1)
> import-hive.sh fails while importing partitions for a non-partitioned table
> ---------------------------------------------------------------------------
>
> Key: ATLAS-588
> URL: https://issues.apache.org/jira/browse/ATLAS-588
> Project: Atlas
> Issue Type: Bug
> Affects Versions: 0.7-incubating
> Reporter: Suma Shivaprasad
> Assignee: Suma Shivaprasad
> Fix For: 0.7-incubating
>
>
> {noformat}
> [root@sneethiraj-ambari-atlas-job-160323-0215-1 atlas-server]# export
> HIVE_CONF_DIR=/etc/hive/conf
> [root@sneethiraj-ambari-atlas-job-160323-0215-1 atlas-server]#
> bin/import-hive.sh
> Using Hive configuration directory [/etc/hive/conf]
> Log file for import is /var/log/atlas/import-hive.log
> Exception in thread "main" org.codehaus.jettison.json.JSONException:
> JSONArray[0] not found.
> at org.codehaus.jettison.json.JSONArray.get(JSONArray.java:193)
> at org.codehaus.jettison.json.JSONArray.getString(JSONArray.java:316)
> at
> org.apache.atlas.hive.bridge.HiveMetaStoreBridge.registerInstance(HiveMetaStoreBridge.java:191)
> at
> org.apache.atlas.hive.bridge.HiveMetaStoreBridge.registerPartition(HiveMetaStoreBridge.java:452)
> at
> org.apache.atlas.hive.bridge.HiveMetaStoreBridge.registerPartitions(HiveMetaStoreBridge.java:438)
> at
> org.apache.atlas.hive.bridge.HiveMetaStoreBridge.importTables(HiveMetaStoreBridge.java:256)
> at
> org.apache.atlas.hive.bridge.HiveMetaStoreBridge.importDatabases(HiveMetaStoreBridge.java:122)
> at
> org.apache.atlas.hive.bridge.HiveMetaStoreBridge.importHiveMetadata(HiveMetaStoreBridge.java:114)
> at
> org.apache.atlas.hive.bridge.HiveMetaStoreBridge.main(HiveMetaStoreBridge.java:608)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)