Search in sources :

Example 1 with AtlasEntityStoreV1

use of org.apache.atlas.repository.store.graph.v1.AtlasEntityStoreV1 in project 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)

Example 2 with AtlasEntityStoreV1

use of org.apache.atlas.repository.store.graph.v1.AtlasEntityStoreV1 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)2 AtlasTypesDef (org.apache.atlas.model.typedef.AtlasTypesDef)2 AtlasEntityStoreV1 (org.apache.atlas.repository.store.graph.v1.AtlasEntityStoreV1)2 AtlasEntityStream (org.apache.atlas.repository.store.graph.v1.AtlasEntityStream)2 BeforeClass (org.testng.annotations.BeforeClass)2