Search in sources :

Example 6 with GraphBackedSearchIndexer

use of org.apache.atlas.repository.graph.GraphBackedSearchIndexer in project incubator-atlas by apache.

the class BaseRepositoryTest method setUp.

protected void setUp() throws Exception {
    // force graph initialization / built in type registration
    TestUtils.getGraph();
    setUpDefaultTypes();
    setUpTypes();
    TestUtils.getGraph().commit();
    new GraphBackedSearchIndexer(new AtlasTypeRegistry());
    TestUtils.resetRequestContext();
    setupInstances();
    TestUtils.getGraph().commit();
    TestUtils.dumpGraph(TestUtils.getGraph());
}
Also used : GraphBackedSearchIndexer(org.apache.atlas.repository.graph.GraphBackedSearchIndexer) AtlasTypeRegistry(org.apache.atlas.type.AtlasTypeRegistry)

Example 7 with GraphBackedSearchIndexer

use of org.apache.atlas.repository.graph.GraphBackedSearchIndexer in project incubator-atlas by apache.

the class AtlasEntityStoreV1Test method setUp.

@BeforeClass
public void setUp() throws Exception {
    metadataService = TestUtils.addSessionCleanupWrapper(metadataService);
    new GraphBackedSearchIndexer(typeRegistry);
    AtlasTypesDef[] testTypesDefs = new AtlasTypesDef[] { TestUtilsV2.defineDeptEmployeeTypes(), TestUtilsV2.defineHiveTypes() };
    for (AtlasTypesDef typesDef : testTypesDefs) {
        AtlasTypesDef typesToCreate = AtlasTypeDefStoreInitializer.getTypesToCreate(typesDef, typeRegistry);
        if (!typesToCreate.isEmpty()) {
            typeDefStore.createTypesDef(typesToCreate);
        }
    }
    deptEntity = TestUtilsV2.createDeptEg2();
    dbEntity = TestUtilsV2.createDBEntityV2();
    tblEntity = TestUtilsV2.createTableEntityV2(dbEntity.getEntity());
    AtlasTypesDef typesDef11 = new AtlasTypesDef();
    List primitiveEntityDef = new ArrayList<AtlasEntityDef>();
    primitiveEntityDef.add(TestUtilsV2.createPrimitiveEntityDef());
    typesDef11.setEntityDefs(primitiveEntityDef);
    typeDefStore.createTypesDef(typesDef11);
    primitiveEntity = TestUtilsV2.createprimitiveEntityV2();
}
Also used : GraphBackedSearchIndexer(org.apache.atlas.repository.graph.GraphBackedSearchIndexer) ArrayList(java.util.ArrayList) List(java.util.List) ArrayList(java.util.ArrayList) AtlasTypesDef(org.apache.atlas.model.typedef.AtlasTypesDef) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

GraphBackedSearchIndexer (org.apache.atlas.repository.graph.GraphBackedSearchIndexer)7 AtlasTypesDef (org.apache.atlas.model.typedef.AtlasTypesDef)4 BeforeClass (org.testng.annotations.BeforeClass)4 AtlasTypeRegistry (org.apache.atlas.type.AtlasTypeRegistry)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 AtlasEntitiesWithExtInfo (org.apache.atlas.model.instance.AtlasEntity.AtlasEntitiesWithExtInfo)2 AtlasEntityHeader (org.apache.atlas.model.instance.AtlasEntityHeader)2 EntityMutationResponse (org.apache.atlas.model.instance.EntityMutationResponse)2 AtlasException (org.apache.atlas.AtlasException)1 EntityChangeListener (org.apache.atlas.listener.EntityChangeListener)1 TypesChangeListener (org.apache.atlas.listener.TypesChangeListener)1 InMemoryEntityAuditRepository (org.apache.atlas.repository.audit.InMemoryEntityAuditRepository)1 GraphBackedTypeStore (org.apache.atlas.repository.typestore.GraphBackedTypeStore)1 ITypeStore (org.apache.atlas.repository.typestore.ITypeStore)1 DefaultMetadataService (org.apache.atlas.services.DefaultMetadataService)1 IDataType (org.apache.atlas.typesystem.types.IDataType)1 DefaultTypeCache (org.apache.atlas.typesystem.types.cache.DefaultTypeCache)1 TypeCache (org.apache.atlas.typesystem.types.cache.TypeCache)1 AtlasRepositoryConfiguration (org.apache.atlas.util.AtlasRepositoryConfiguration)1