final AtlasEntity.AtlasEntitiesWithExtInfo atlasEntities = new AtlasEntity.AtlasEntitiesWithExtInfo(createdEntities); final EntityMutationResponse mutationResponse = atlasClient.createEntities(atlasEntities); logger.debug("Created DataSet entities mutation response={}", mutationResponse); final AtlasEntity.AtlasEntitiesWithExtInfo atlasEntities = new AtlasEntity.AtlasEntitiesWithExtInfo(updatedEntities); final EntityMutationResponse mutationResponse = atlasClient.updateEntities(atlasEntities); logger.debug("Updated DataSet entities mutation response={}", mutationResponse);
final AtlasEntity.AtlasEntitiesWithExtInfo atlasEntities = new AtlasEntity.AtlasEntitiesWithExtInfo(createdEntities); final EntityMutationResponse mutationResponse = atlasClient.createEntities(atlasEntities); logger.debug("Created FlowPath entities mutation response={}", mutationResponse); final AtlasEntity.AtlasEntitiesWithExtInfo atlasEntities = new AtlasEntity.AtlasEntitiesWithExtInfo(updatedEntities); final EntityMutationResponse mutationResponse = atlasClient.updateEntities(atlasEntities); logger.debug("Updated FlowPath entities mutation response={}", mutationResponse);
final AtlasEntity.AtlasEntitiesWithExtInfo atlasEntities = new AtlasEntity.AtlasEntitiesWithExtInfo(entities); entities.add(flowEntity); try {
public AtlasEntityStream(AtlasEntityWithExtInfo entityWithExtInfo) { this(new AtlasEntitiesWithExtInfo(entityWithExtInfo)); }
public AtlasEntityStream(AtlasEntity entity) { this(new AtlasEntitiesWithExtInfo(entity)); }
public AtlasEntityStream(AtlasEntity entity) { this(new AtlasEntitiesWithExtInfo(entity)); }
private void createOrUpdateNamespaceInstance(HBaseOperationContext hbaseOperationContext) { AtlasEntity nameSpace = buildNameSpace(hbaseOperationContext); switch (hbaseOperationContext.getOperation()) { case CREATE_NAMESPACE: LOG.info("Create NameSpace {}", nameSpace.getAttribute(REFERENCEABLE_ATTRIBUTE_NAME)); hbaseOperationContext.addMessage(new EntityCreateRequestV2(hbaseOperationContext.getUser(), new AtlasEntitiesWithExtInfo(nameSpace))); break; case ALTER_NAMESPACE: LOG.info("Modify NameSpace {}", nameSpace.getAttribute(REFERENCEABLE_ATTRIBUTE_NAME)); hbaseOperationContext.addMessage(new EntityUpdateRequestV2(hbaseOperationContext.getUser(), new AtlasEntitiesWithExtInfo(nameSpace))); break; } }
public AtlasEntityStream(AtlasEntityWithExtInfo entityWithExtInfo) { this(new AtlasEntitiesWithExtInfo(entityWithExtInfo)); }
public void addEntity(AtlasEntity entity) { if (entities == null) { entities = new AtlasEntitiesWithExtInfo(); } entities.addEntity(entity); }
public AtlasEntitiesWithExtInfo toAtlasEntitiesWithExtInfo(List<String> guids, boolean isMinExtInfo) throws AtlasBaseException { AtlasEntitiesWithExtInfo ret = new AtlasEntitiesWithExtInfo(); for (String guid : guids) { AtlasVertex vertex = getEntityVertex(guid); AtlasEntity entity = mapVertexToAtlasEntity(vertex, ret, isMinExtInfo); ret.addEntity(entity); } ret.compact(); return ret; }
public AtlasEntityStream(AtlasEntityWithExtInfo entityWithExtInfo, EntityStream entityStream) { this.entitiesWithExtInfo = new AtlasEntitiesWithExtInfo(entityWithExtInfo); this.iterator = this.entitiesWithExtInfo.getEntities().iterator(); this.entityStream = entityStream; }
public AtlasEntityStream(AtlasEntity entity, EntityStream entityStream) { this.entitiesWithExtInfo = new AtlasEntitiesWithExtInfo(entity); this.iterator = this.entitiesWithExtInfo.getEntities().iterator(); this.entityStream = entityStream; }
public AtlasEntityStream(AtlasEntityWithExtInfo entityWithExtInfo, EntityStream entityStream) { this.entitiesWithExtInfo = new AtlasEntitiesWithExtInfo(entityWithExtInfo); this.iterator = this.entitiesWithExtInfo.getEntities().iterator(); this.entityStream = entityStream; }
public AtlasEntityStream(AtlasEntity entity, EntityStream entityStream) { this.entitiesWithExtInfo = new AtlasEntitiesWithExtInfo(entity); this.iterator = this.entitiesWithExtInfo.getEntities().iterator(); this.entityStream = entityStream; }
public void addReferredEntity(AtlasEntity entity) { if (entities == null) { entities = new AtlasEntitiesWithExtInfo(); } entities.addReferredEntity(entity); }
public void addReferredEntity(AtlasEntity entity) { if (entities == null) { entities = new AtlasEntitiesWithExtInfo(); } entities.addReferredEntity(entity); }
private void createOrUpdateNamespaceInstance(HBaseOperationContext hbaseOperationContext) { AtlasEntity nameSpace = buildNameSpace(hbaseOperationContext); switch (hbaseOperationContext.getOperation()) { case CREATE_NAMESPACE: LOG.info("Create NameSpace {}", nameSpace.getAttribute(REFERENCEABLE_ATTRIBUTE_NAME)); hbaseOperationContext.addMessage(new EntityCreateRequestV2(hbaseOperationContext.getUser(), new AtlasEntitiesWithExtInfo(nameSpace))); break; case ALTER_NAMESPACE: LOG.info("Modify NameSpace {}", nameSpace.getAttribute(REFERENCEABLE_ATTRIBUTE_NAME)); hbaseOperationContext.addMessage(new EntityUpdateRequestV2(hbaseOperationContext.getUser(), new AtlasEntitiesWithExtInfo(nameSpace))); break; } }
public void addEntity(AtlasEntity entity) { if (entities == null) { entities = new AtlasEntitiesWithExtInfo(); } entities.addEntity(entity); }
public AtlasEntitiesWithExtInfo toAtlasEntitiesWithExtInfo(List<String> guids, boolean isMinExtInfo) throws AtlasBaseException { AtlasEntitiesWithExtInfo ret = new AtlasEntitiesWithExtInfo(); for (String guid : guids) { AtlasVertex vertex = getEntityVertex(guid); AtlasEntity entity = mapVertexToAtlasEntity(vertex, ret, isMinExtInfo); ret.addEntity(entity); } ret.compact(); return ret; }
private AtlasEntity registerNiFiFlowEntity(final NiFiFlow nifiFlow) throws AtlasServiceException { final List<AtlasEntity> entities = new ArrayList<>(); final AtlasEntity.AtlasEntitiesWithExtInfo atlasEntities = new AtlasEntity.AtlasEntitiesWithExtInfo(entities); if (!nifiFlow.isMetadataUpdated()) { // Nothing has been changed, return existing entity. return nifiFlow.getExEntity(); } // Create parent flow entity using existing NiFiFlow entity if available, so that common properties are taken over. final AtlasEntity flowEntity = nifiFlow.getExEntity() != null ? new AtlasEntity(nifiFlow.getExEntity()) : new AtlasEntity(); flowEntity.setTypeName(TYPE_NIFI_FLOW); flowEntity.setVersion(1L); flowEntity.setAttribute(ATTR_NAME, nifiFlow.getFlowName()); flowEntity.setAttribute(ATTR_QUALIFIED_NAME, nifiFlow.toQualifiedName(nifiFlow.getRootProcessGroupId())); flowEntity.setAttribute(ATTR_URL, nifiFlow.getUrl()); flowEntity.setAttribute(ATTR_DESCRIPTION, nifiFlow.getDescription()); // If flowEntity is not persisted yet, then store nifi_flow entity to make nifiFlowId available for other entities. if (flowEntity.getGuid().startsWith("-")) { entities.add(flowEntity); final EntityMutationResponse mutationResponse = atlasClient.createEntities(atlasEntities); logger.debug("Registered a new nifi_flow entity, mutation response={}", mutationResponse); final String assignedNiFiFlowGuid = mutationResponse.getGuidAssignments().get(flowEntity.getGuid()); flowEntity.setGuid(assignedNiFiFlowGuid); nifiFlow.setAtlasGuid(assignedNiFiFlowGuid); } return flowEntity; }