Commit cea851c5 by nixonrodrigues

ATLAS-3844 - Ignore relationship attributes while fetching entities in Import Hive bridge.

Change-Id: I1d0eeb478286e896af733b51fe4f7fc62c594899
parent 3d559d01
......@@ -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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment