entities.addEntity(columnLineage);
AtlasEntity process = getHiveProcessEntity(inputs, outputs); ret.addEntity(process);
b3.setAttribute(NAME, TestUtilsV2.randomString()); AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); atlasEntitiesWithExtInfo.addEntity(a1); atlasEntitiesWithExtInfo.addEntity(b1); atlasEntitiesWithExtInfo.addEntity(b2); atlasEntitiesWithExtInfo.addEntity(b3); AtlasEntityStream entityStream = new AtlasEntityStream(atlasEntitiesWithExtInfo); EntityMutationResponse response = entityStore.createOrUpdate(entityStream , false);
b3.setAttribute(NAME, TestUtilsV2.randomString()); AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); atlasEntitiesWithExtInfo.addEntity(a1); atlasEntitiesWithExtInfo.addEntity(b1); atlasEntitiesWithExtInfo.addEntity(b2); atlasEntitiesWithExtInfo.addEntity(b3); AtlasEntityStream entityStream = new AtlasEntityStream(atlasEntitiesWithExtInfo); EntityMutationResponse response = entityStore.createOrUpdate(entityStream , false);
atlasEntitiesWithExtInfo.addEntity(a1); atlasEntitiesWithExtInfo.addEntity(a2); atlasEntitiesWithExtInfo.addEntity(a3); atlasEntitiesWithExtInfo.addEntity(b); AtlasEntityStream entityStream = new AtlasEntityStream(atlasEntitiesWithExtInfo); EntityMutationResponse response = entityStore.createOrUpdate(entityStream , false);
b2.setAttribute(NAME, TestUtilsV2.randomString()); AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); atlasEntitiesWithExtInfo.addEntity(a1); atlasEntitiesWithExtInfo.addEntity(a2); atlasEntitiesWithExtInfo.addEntity(a3); atlasEntitiesWithExtInfo.addEntity(b1); atlasEntitiesWithExtInfo.addEntity(b2); AtlasEntityStream entityStream = new AtlasEntityStream(atlasEntitiesWithExtInfo); EntityMutationResponse response = entityStore.createOrUpdate(entityStream , false);
b2.setAttribute(NAME, TestUtilsV2.randomString()); AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); atlasEntitiesWithExtInfo.addEntity(a1); atlasEntitiesWithExtInfo.addEntity(a2); atlasEntitiesWithExtInfo.addEntity(a3); atlasEntitiesWithExtInfo.addEntity(b1); atlasEntitiesWithExtInfo.addEntity(b2); AtlasEntityStream entityStream = new AtlasEntityStream(atlasEntitiesWithExtInfo); EntityMutationResponse response = entityStore.createOrUpdate(entityStream , false);
protected AtlasEntity toReferencedHBaseTable(Table table, AtlasEntitiesWithExtInfo entities) { AtlasEntity ret = null; HBaseTableInfo hBaseTableInfo = new HBaseTableInfo(table); String hbaseNameSpace = hBaseTableInfo.getHbaseNameSpace(); String hbaseTableName = hBaseTableInfo.getHbaseTableName(); if (hbaseTableName != null) { AtlasEntity nsEntity = new AtlasEntity(HBASE_TYPE_NAMESPACE); nsEntity.setAttribute(ATTRIBUTE_NAME, hbaseNameSpace); nsEntity.setAttribute(ATTRIBUTE_CLUSTER_NAME, getClusterName()); nsEntity.setAttribute(ATTRIBUTE_QUALIFIED_NAME, getHBaseNameSpaceQualifiedName(getClusterName(), hbaseNameSpace)); ret = new AtlasEntity(HBASE_TYPE_TABLE); ret.setAttribute(ATTRIBUTE_NAME, hbaseTableName); ret.setAttribute(ATTRIBUTE_URI, hbaseTableName); ret.setAttribute(ATTRIBUTE_NAMESPACE, getObjectId(nsEntity)); ret.setAttribute(ATTRIBUTE_QUALIFIED_NAME, getHBaseTableQualifiedName(getClusterName(), hbaseNameSpace, hbaseTableName)); entities.addReferredEntity(nsEntity); entities.addEntity(ret); } return ret; }
public AtlasEntitiesWithExtInfo getEntities() throws Exception { AtlasEntitiesWithExtInfo ret = new AtlasEntitiesWithExtInfo(); for (Entity entity : getHiveContext().getOutputs()) { if (entity.getType() == Entity.Type.DATABASE) { Database db = entity.getDatabase(); if (db != null) { db = getHive().getDatabase(db.getName()); } if (db != null) { AtlasEntity dbEntity = toDbEntity(db); ret.addEntity(dbEntity); } else { LOG.error("CreateDatabase.getEntities(): failed to retrieve db"); } } } addProcessedEntities(ret); return ret; } }
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; }
protected AtlasEntity toTableEntity(Table table, AtlasEntitiesWithExtInfo entities) throws Exception { AtlasEntity ret = toTableEntity(table, (AtlasEntityExtInfo) entities); if (ret != null) { entities.addEntity(ret); } return ret; }
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 void addEntity(AtlasEntity entity) { if (entities == null) { entities = new AtlasEntitiesWithExtInfo(); } entities.addEntity(entity); }