private void initialize(AtlasGraph graph) throws RepositoryException, IndexException {
  AtlasGraphManagement management=graph.getManagementSystem();
  try {
    if (management.containsPropertyKey(Constants.VERTEX_TYPE_PROPERTY_KEY)) {
      LOG.info("Global indexes already exist for graph");
      management.commit();
      return;
    }
    LOG.info("Indexes do not exist, Creating indexes for graph.");
    management.createVertexIndex(Constants.VERTEX_INDEX,Constants.BACKING_INDEX,Collections.<AtlasPropertyKey>emptyList());
    management.createEdgeIndex(Constants.EDGE_INDEX,Constants.BACKING_INDEX);
    createIndexes(management,Constants.GUID_PROPERTY_KEY,String.class,true,AtlasCardinality.SINGLE,true,true);
    createIndexes(management,Constants.TIMESTAMP_PROPERTY_KEY,Long.class,false,AtlasCardinality.SINGLE,true,true);
    createIndexes(management,Constants.STATE_PROPERTY_KEY,String.class,false,AtlasCardinality.SINGLE,false,false);
    createIndexes(management,Constants.MODIFICATION_TIMESTAMP_PROPERTY_KEY,Long.class,false,AtlasCardinality.SINGLE,false,false);
    createIndexes(management,Constants.ENTITY_TYPE_PROPERTY_KEY,String.class,false,AtlasCardinality.SINGLE,true,true);
    createIndexes(management,Constants.SUPER_TYPES_PROPERTY_KEY,String.class,false,AtlasCardinality.SET,true,true);
    createIndexes(management,Constants.TRAIT_NAMES_PROPERTY_KEY,String.class,false,AtlasCardinality.SET,true,true);
    createFullTextIndex(management);
    createTypeStoreIndexes(management);
    commit(management);
    LOG.info("Index creation for global keys complete.");
  }
 catch (  Throwable t) {
    rollback(management);
    throw new RepositoryException(t);
  }
}

private void initialize ( AtlasGraph graph ) throws RepositoryException , IndexException { AtlasGraphManagement management = graph . getManagementSystem ( ) ; try { if ( management . containsPropertyKey ( Constants . VERTEX_TYPE_PROPERTY_KEY ) ) { LOG . info ( "Global indexes already exist for graph" ) ; management . commit ( ) ; return ; } LOG . info ( "Indexes do not exist, Creating indexes for graph." ) ; management . createVertexIndex ( Constants . VERTEX_INDEX , Constants . BACKING_INDEX , Collections . < AtlasPropertyKey > emptyList ( ) ) ; management . createEdgeIndex ( Constants . EDGE_INDEX , Constants . BACKING_INDEX ) ; createIndexes ( management , Constants . GUID_PROPERTY_KEY , String . class , true , AtlasCardinality . SINGLE , true , true ) ; createIndexes ( management , Constants . TIMESTAMP_PROPERTY_KEY , Long . class , false , AtlasCardinality . SINGLE , true , true ) ; createIndexes ( management , Constants . STATE_PROPERTY_KEY , String . class , false , AtlasCardinality . SINGLE , false , false ) ; createIndexes ( management , Constants . MODIFICATION_TIMESTAMP_PROPERTY_KEY , Long . class , false , AtlasCardinality . SINGLE , false , false ) ; createIndexes ( management , Constants . ENTITY_TYPE_PROPERTY_KEY , String . class , false , AtlasCardinality . SINGLE , true , true ) ; createIndexes ( management , Constants . SUPER_TYPES_PROPERTY_KEY , String . class , false , AtlasCardinality . SET , true , true ) ; createIndexes ( management , Constants . TRAIT_NAMES_PROPERTY_KEY , String . class , false , AtlasCardinality . SET , true , true ) ; createFullTextIndex ( management ) ; createTypeStoreIndexes ( management ) ; commit ( management ) ; LOG . info ( "Index creation for global keys complete." ) ; } catch ( Throwable t ) { rollback ( management ) ; throw new RepositoryException ( t ) ; } }
initializes the indices for the graph - create indices for global atlasvertex keys
