This is an automated email from the ASF dual-hosted git repository.
nixon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new cea851c ATLAS-3844 - Ignore relationship attributes while fetching
entities in Import Hive bridge.
cea851c is described below
commit cea851c5513cede054bc7704ac24c04cc498cd32
Author: nixonrodrigues <[email protected]>
AuthorDate: Wed Jun 17 15:11:28 2020 +0530
ATLAS-3844 - Ignore relationship attributes while fetching entities in
Import Hive bridge.
Change-Id: I1d0eeb478286e896af733b51fe4f7fc62c594899
---
.../org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git
a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
index eb691dc..e88c225 100755
---
a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
+++
b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
@@ -768,7 +768,7 @@ public class HiveMetaStoreBridge {
String typeName = HiveDataTypes.HIVE_DB.getName();
- return findEntity(typeName, getDBQualifiedName(metadataNamespace,
databaseName));
+ return findEntity(typeName, getDBQualifiedName(metadataNamespace,
databaseName), true, true);
}
/**
@@ -786,7 +786,7 @@ public class HiveMetaStoreBridge {
String typeName = HiveDataTypes.HIVE_TABLE.getName();
String tblQualifiedName =
getTableQualifiedName(getMetadataNamespace(), hiveTable.getDbName(),
hiveTable.getTableName());
- return findEntity(typeName, tblQualifiedName);
+ return findEntity(typeName, tblQualifiedName, true, true);
}
private AtlasEntityWithExtInfo findProcessEntity(String qualifiedName)
throws Exception{
@@ -796,14 +796,14 @@ public class HiveMetaStoreBridge {
String typeName = HiveDataTypes.HIVE_PROCESS.getName();
- return findEntity(typeName, qualifiedName);
+ return findEntity(typeName, qualifiedName , true , true);
}
- private AtlasEntityWithExtInfo findEntity(final String typeName, final
String qualifiedName) throws AtlasServiceException {
+ private AtlasEntityWithExtInfo findEntity(final String typeName, final
String qualifiedName , boolean minExtInfo, boolean ignoreRelationship) throws
AtlasServiceException {
AtlasEntityWithExtInfo ret = null;
try {
- ret = atlasClientV2.getEntityByAttribute(typeName,
Collections.singletonMap(ATTRIBUTE_QUALIFIED_NAME, qualifiedName));
+ ret = atlasClientV2.getEntityByAttribute(typeName,
Collections.singletonMap(ATTRIBUTE_QUALIFIED_NAME, qualifiedName), minExtInfo,
ignoreRelationship);
} catch (AtlasServiceException e) {
if(e.getStatus() == ClientResponse.Status.NOT_FOUND) {
return null;
@@ -812,8 +812,6 @@ public class HiveMetaStoreBridge {
throw e;
}
- clearRelationshipAttributes(ret);
-
return ret;
}
@@ -971,4 +969,4 @@ public class HiveMetaStoreBridge {
}
return ret;
}
-}
\ No newline at end of file
+}