public AtlasEntity.AtlasEntityWithExtInfo searchEntityDef(AtlasObjectId id) throws AtlasServiceException { final String guid = id.getGuid(); if (!StringUtils.isEmpty(guid)) { return atlasClient.getEntityByGuid(guid); } 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); }
private AtlasEntityWithExtInfo findEntityInAtlas(String typeName, String qualifiedName) throws Exception { Map<String, String> attributes = Collections.singletonMap(QUALIFIED_NAME, qualifiedName); return atlasClientV2.getEntityByAttribute(typeName, attributes); }
private AtlasEntityWithExtInfo findEntityInAtlas(String typeName, String qualifiedName) throws Exception { Map<String, String> attributes = Collections.singletonMap(QUALIFIED_NAME, qualifiedName); return atlasClientV2.getEntityByAttribute(typeName, attributes); }
@VisibleForTesting AtlasEntityWithExtInfo findEntityInAtlas(String typeName, String qualifiedName) throws Exception { Map<String, String> attributes = Collections.singletonMap(ATTRIBUTE_QUALIFIED_NAME, qualifiedName); return atlasClientV2.getEntityByAttribute(typeName, attributes); }
private String getTableId(String tableName) throws AtlasServiceException { Map<String, String> attributes = new HashMap<>(); attributes.put(AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME, tableName); AtlasEntity tableEntity = atlasClientV2.getEntityByAttribute(TABLE_TYPE, attributes).getEntity(); return tableEntity.getGuid(); } }
public AtlasEntity.AtlasEntityWithExtInfo searchEntityDef(AtlasObjectId id) throws AtlasServiceException { final String guid = id.getGuid(); if (!StringUtils.isEmpty(guid)) { return atlasClient.getEntityByGuid(guid); } 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); }