NIFI-6945: Use minExtInfo=true to reduce the amount of data queried from Atlas

This closes #3970
This commit is contained in:
Peter Turcsanyi 2019-12-20 16:14:12 +01:00 committed by Matt Gilman
parent fc2e6b3471
commit b8ffb54612
No known key found for this signature in database
GPG Key ID: DF61EC19432AEE37
1 changed files with 2 additions and 2 deletions

View File

@ -493,12 +493,12 @@ public class NiFiAtlasClient {
public AtlasEntity.AtlasEntityWithExtInfo searchEntityDef(AtlasObjectId id) throws AtlasServiceException {
final String guid = id.getGuid();
if (!StringUtils.isEmpty(guid)) {
return atlasClient.getEntityByGuid(guid);
return atlasClient.getEntityByGuid(guid, true, false);
}
final Map<String, String> attributes = new HashMap<>();
id.getUniqueAttributes().entrySet().stream().filter(entry -> entry.getValue() != null)
.forEach(entry -> attributes.put(entry.getKey(), entry.getValue().toString()));
return atlasClient.getEntityByAttribute(id.getTypeName(), attributes);
return atlasClient.getEntityByAttribute(id.getTypeName(), attributes, true, false);
}
}