@Override public String toString() { return getClass().getSimpleName().toLowerCase() + ":" + getGraph().getConfiguration().getTableNamePrefix(); }
public static AccumuloGraph create(AccumuloGraphConfiguration config) { if (config == null) { throw new IllegalArgumentException("config cannot be null"); } Connector connector = config.createConnector(); if (config.isHistoryInSeparateTable()) { ensureTableExists(connector, getVerticesTableName(config.getTableNamePrefix()), 1, config.getHdfsContextClasspath(), config.isCreateTables()); ensureTableExists(connector, getEdgesTableName(config.getTableNamePrefix()), 1, config.getHdfsContextClasspath(), config.isCreateTables()); ensureTableExists(connector, getHistoryVerticesTableName(config.getTableNamePrefix()), config.getMaxVersions(), config.getHdfsContextClasspath(), config.isCreateTables()); ensureTableExists(connector, getHistoryEdgesTableName(config.getTableNamePrefix()), config.getMaxVersions(), config.getHdfsContextClasspath(), config.isCreateTables()); ensureRowDeletingIteratorIsAttached(connector, getHistoryVerticesTableName(config.getTableNamePrefix())); ensureRowDeletingIteratorIsAttached(connector, getHistoryEdgesTableName(config.getTableNamePrefix())); } else { ensureTableExists(connector, getVerticesTableName(config.getTableNamePrefix()), config.getMaxVersions(), config.getHdfsContextClasspath(), config.isCreateTables()); ensureTableExists(connector, getEdgesTableName(config.getTableNamePrefix()), config.getMaxVersions(), config.getHdfsContextClasspath(), config.isCreateTables()); } ensureTableExists(connector, getExtendedDataTableName(config.getTableNamePrefix()), config.getExtendedDataMaxVersions(), config.getHdfsContextClasspath(), config.isCreateTables()); ensureTableExists(connector, getDataTableName(config.getTableNamePrefix()), 1, config.getHdfsContextClasspath(), config.isCreateTables()); ensureTableExists(connector, getMetadataTableName(config.getTableNamePrefix()), 1, config.getHdfsContextClasspath(), config.isCreateTables()); ensureRowDeletingIteratorIsAttached(connector, getVerticesTableName(config.getTableNamePrefix())); ensureRowDeletingIteratorIsAttached(connector, getEdgesTableName(config.getTableNamePrefix())); ensureRowDeletingIteratorIsAttached(connector, getDataTableName(config.getTableNamePrefix())); AccumuloGraph graph = new AccumuloGraph(config, connector); graph.setup(); return graph; }
public static AccumuloGraph create(AccumuloGraphConfiguration config) { if (config == null) { throw new IllegalArgumentException("config cannot be null"); } Connector connector = config.createConnector(); if (config.isHistoryInSeparateTable()) { ensureTableExists(connector, getVerticesTableName(config.getTableNamePrefix()), 1, config.getHdfsContextClasspath(), config.isCreateTables()); ensureTableExists(connector, getEdgesTableName(config.getTableNamePrefix()), 1, config.getHdfsContextClasspath(), config.isCreateTables()); ensureTableExists(connector, getHistoryVerticesTableName(config.getTableNamePrefix()), config.getMaxVersions(), config.getHdfsContextClasspath(), config.isCreateTables()); ensureTableExists(connector, getHistoryEdgesTableName(config.getTableNamePrefix()), config.getMaxVersions(), config.getHdfsContextClasspath(), config.isCreateTables()); ensureRowDeletingIteratorIsAttached(connector, getHistoryVerticesTableName(config.getTableNamePrefix())); ensureRowDeletingIteratorIsAttached(connector, getHistoryEdgesTableName(config.getTableNamePrefix())); } else { ensureTableExists(connector, getVerticesTableName(config.getTableNamePrefix()), config.getMaxVersions(), config.getHdfsContextClasspath(), config.isCreateTables()); ensureTableExists(connector, getEdgesTableName(config.getTableNamePrefix()), config.getMaxVersions(), config.getHdfsContextClasspath(), config.isCreateTables()); } ensureTableExists(connector, getExtendedDataTableName(config.getTableNamePrefix()), config.getExtendedDataMaxVersions(), config.getHdfsContextClasspath(), config.isCreateTables()); ensureTableExists(connector, getDataTableName(config.getTableNamePrefix()), 1, config.getHdfsContextClasspath(), config.isCreateTables()); ensureTableExists(connector, getMetadataTableName(config.getTableNamePrefix()), 1, config.getHdfsContextClasspath(), config.isCreateTables()); ensureRowDeletingIteratorIsAttached(connector, getVerticesTableName(config.getTableNamePrefix())); ensureRowDeletingIteratorIsAttached(connector, getEdgesTableName(config.getTableNamePrefix())); ensureRowDeletingIteratorIsAttached(connector, getDataTableName(config.getTableNamePrefix())); AccumuloGraph graph = new AccumuloGraph(config, connector); graph.setup(); return graph; }
String configPrefix = context.getConfiguration().get(GRAPH_CONFIG_PREFIX, ""); AccumuloGraphConfiguration accumuloGraphConfiguration = new AccumuloGraphConfiguration(context.getConfiguration(), configPrefix); String tableNamePrefix = accumuloGraphConfiguration.getTableNamePrefix(); final Text edgesTableName = new Text(AccumuloGraph.getEdgesTableName(tableNamePrefix)); final Text dataTableName = new Text(AccumuloGraph.getDataTableName(tableNamePrefix));
String configPrefix = context.getConfiguration().get(GRAPH_CONFIG_PREFIX, ""); AccumuloGraphConfiguration accumuloGraphConfiguration = new AccumuloGraphConfiguration(context.getConfiguration(), configPrefix); String tableNamePrefix = accumuloGraphConfiguration.getTableNamePrefix(); final Text edgesTableName = new Text(AccumuloGraph.getEdgesTableName(tableNamePrefix)); final Text dataTableName = new Text(AccumuloGraph.getDataTableName(tableNamePrefix));
String zkPath = config.getZookeeperMetadataSyncPath(); this.graphMetadataStore = new AccumuloGraphMetadataStore(curatorFramework, zkPath); this.verticesTableName = getVerticesTableName(getConfiguration().getTableNamePrefix()); this.edgesTableName = getEdgesTableName(getConfiguration().getTableNamePrefix()); this.extendedDataTableName = getExtendedDataTableName(getConfiguration().getTableNamePrefix()); this.dataTableName = getDataTableName(getConfiguration().getTableNamePrefix()); this.metadataTableName = getMetadataTableName(getConfiguration().getTableNamePrefix()); this.numberOfQueryThreads = getConfiguration().getNumberOfQueryThreads(); this.historyInSeparateTable = getConfiguration().isHistoryInSeparateTable(); this.historyVerticesTableName = getHistoryVerticesTableName(getConfiguration().getTableNamePrefix()); this.historyEdgesTableName = getHistoryEdgesTableName(getConfiguration().getTableNamePrefix()); } else { this.historyVerticesTableName = null;
String zkPath = config.getZookeeperMetadataSyncPath(); this.graphMetadataStore = new AccumuloGraphMetadataStore(curatorFramework, zkPath); this.verticesTableName = getVerticesTableName(getConfiguration().getTableNamePrefix()); this.edgesTableName = getEdgesTableName(getConfiguration().getTableNamePrefix()); this.extendedDataTableName = getExtendedDataTableName(getConfiguration().getTableNamePrefix()); this.dataTableName = getDataTableName(getConfiguration().getTableNamePrefix()); this.metadataTableName = getMetadataTableName(getConfiguration().getTableNamePrefix()); this.numberOfQueryThreads = getConfiguration().getNumberOfQueryThreads(); this.historyInSeparateTable = getConfiguration().isHistoryInSeparateTable(); this.historyVerticesTableName = getHistoryVerticesTableName(getConfiguration().getTableNamePrefix()); this.historyEdgesTableName = getHistoryEdgesTableName(getConfiguration().getTableNamePrefix()); } else { this.historyVerticesTableName = null;