Search in sources :

Example 1 with EntityStream

use of org.apache.atlas.repository.store.graph.v1.EntityStream in project incubator-atlas by apache.

the class ExportServiceTest method setupSampleData.

@BeforeClass
public void setupSampleData() throws AtlasBaseException {
    entityStore = new AtlasEntityStoreV1(deleteHandler, typeRegistry, mockChangeNotifier, graphMapper);
    ;
    AtlasTypesDef sampleTypes = TestUtilsV2.defineDeptEmployeeTypes();
    AtlasTypesDef typesToCreate = AtlasTypeDefStoreInitializer.getTypesToCreate(sampleTypes, typeRegistry);
    if (!typesToCreate.isEmpty()) {
        typeDefStore.createTypesDef(typesToCreate);
    }
    AtlasEntity.AtlasEntitiesWithExtInfo hrDept = TestUtilsV2.createDeptEg2();
    AtlasEntityStream entityStream = new AtlasEntityStream(hrDept);
    entityStore.createOrUpdate(entityStream, false);
    LOG.debug("==> setupSampleData: ", AtlasEntity.dumpObjects(hrDept.getEntities(), null).toString());
}
Also used : AtlasEntity(org.apache.atlas.model.instance.AtlasEntity) AtlasEntityStream(org.apache.atlas.repository.store.graph.v1.AtlasEntityStream) AtlasEntityStoreV1(org.apache.atlas.repository.store.graph.v1.AtlasEntityStoreV1) AtlasTypesDef(org.apache.atlas.model.typedef.AtlasTypesDef) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

AtlasEntity (org.apache.atlas.model.instance.AtlasEntity)1 AtlasTypesDef (org.apache.atlas.model.typedef.AtlasTypesDef)1 AtlasEntityStoreV1 (org.apache.atlas.repository.store.graph.v1.AtlasEntityStoreV1)1 AtlasEntityStream (org.apache.atlas.repository.store.graph.v1.AtlasEntityStream)1 BeforeClass (org.testng.annotations.BeforeClass)1