@Override public String toString() { return getClass().getSimpleName().toLowerCase() + ":" + getGraph().getConfiguration().getTableNamePrefix(); }
@Override public VertexiumBlueprintsGraph createGraph(Map config) { AccumuloGraph graph = createAccumuloGraph(config); VisibilityProvider visibilityProvider = createVisibilityProvider(graph, graph.getConfiguration()); AuthorizationsProvider authorizationProvider = createAuthorizationsProvider(graph, graph.getConfiguration()); return new AccumuloVertexiumBlueprintsGraph(graph, visibilityProvider, authorizationProvider); }
protected void _addMutations(BatchWriter writer, Mutation... mutations) { try { for (Mutation mutation : mutations) { writer.addMutation(mutation); } if (getConfiguration().isAutoFlush()) { flush(); } } catch (MutationsRejectedException ex) { throw new VertexiumException("Could not add mutation", ex); } }
protected void _addMutations(BatchWriter writer, Mutation... mutations) { try { for (Mutation mutation : mutations) { writer.addMutation(mutation); } if (getConfiguration().isAutoFlush()) { flush(); } } catch (MutationsRejectedException ex) { throw new VertexiumException("Could not add mutation", ex); } }
@Override public void traceOn(String description, Map<String, String> data) { if (!distributedTraceEnabled) { try { ClientConfiguration conf = getConfiguration().getClientConfiguration(); DistributedTrace.enable(null, AccumuloGraph.class.getSimpleName(), conf); distributedTraceEnabled = true; } catch (Exception e) { throw new VertexiumException("Could not enable DistributedTrace", e); } } if (Trace.isTracing()) { throw new VertexiumException("Trace already running"); } Span span = Trace.on(description); for (Map.Entry<String, String> dataEntry : data.entrySet()) { span.data(dataEntry.getKey(), dataEntry.getValue()); } LOGGER.info("Started trace '%s'", description); }
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; BatchWriterConfig writerConfig = getConfiguration().createBatchWriterConfig(); this.batchWriter = connector.createMultiTableBatchWriter(writerConfig);
@Override public void traceOn(String description, Map<String, String> data) { if (!distributedTraceEnabled) { try { ClientConfiguration conf = getConfiguration().getClientConfiguration(); DistributedTrace.enable(null, AccumuloGraph.class.getSimpleName(), conf); distributedTraceEnabled = true; } catch (Exception e) { throw new VertexiumException("Could not enable DistributedTrace", e); } } if (Trace.isTracing()) { throw new VertexiumException("Trace already running"); } Span span = Trace.on(description); for (Map.Entry<String, String> dataEntry : data.entrySet()) { span.data(dataEntry.getKey(), dataEntry.getValue()); } LOGGER.info("Started trace '%s'", description); }
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; BatchWriterConfig writerConfig = getConfiguration().createBatchWriterConfig(); this.batchWriter = connector.createMultiTableBatchWriter(writerConfig);
BatchWriter writer = graph.getConnector().createBatchWriter( graph.getDataTableName(), graph.getConfiguration().createBatchWriterConfig() ); String lastRowIdPrefix = null;
BatchWriter writer = graph.getConnector().createBatchWriter( graph.getDataTableName(), graph.getConfiguration().createBatchWriterConfig() ); String lastRowIdPrefix = null;