mirror of https://github.com/apache/nifi.git
NIFI-6945: Use minExtInfo=true to reduce the amount of data queried from Atlas
This closes #3970
This commit is contained in:
parent
fc2e6b3471
commit
b8ffb54612
|
@ -493,12 +493,12 @@ public class NiFiAtlasClient {
|
||||||
public AtlasEntity.AtlasEntityWithExtInfo searchEntityDef(AtlasObjectId id) throws AtlasServiceException {
|
public AtlasEntity.AtlasEntityWithExtInfo searchEntityDef(AtlasObjectId id) throws AtlasServiceException {
|
||||||
final String guid = id.getGuid();
|
final String guid = id.getGuid();
|
||||||
if (!StringUtils.isEmpty(guid)) {
|
if (!StringUtils.isEmpty(guid)) {
|
||||||
return atlasClient.getEntityByGuid(guid);
|
return atlasClient.getEntityByGuid(guid, true, false);
|
||||||
}
|
}
|
||||||
final Map<String, String> attributes = new HashMap<>();
|
final Map<String, String> attributes = new HashMap<>();
|
||||||
id.getUniqueAttributes().entrySet().stream().filter(entry -> entry.getValue() != null)
|
id.getUniqueAttributes().entrySet().stream().filter(entry -> entry.getValue() != null)
|
||||||
.forEach(entry -> attributes.put(entry.getKey(), entry.getValue().toString()));
|
.forEach(entry -> attributes.put(entry.getKey(), entry.getValue().toString()));
|
||||||
return atlasClient.getEntityByAttribute(id.getTypeName(), attributes);
|
return atlasClient.getEntityByAttribute(id.getTypeName(), attributes, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue