use of org.apache.accumulo.core.trace.Span in project vertexium by visallo.
the class AccumuloGraph method getExtendedDataInRange.
public Iterable<ExtendedDataRow> getExtendedDataInRange(Range extendedDataRowKeyRange, Authorizations authorizations) {
Span trace = Trace.start("getExtendedDataInRange");
trace.data("rangeInclusiveStart", extendedDataRowKeyRange.getInclusiveStart());
trace.data("rangeExclusiveStart", extendedDataRowKeyRange.getExclusiveEnd());
org.apache.accumulo.core.data.Range range = vertexiumRangeToAccumuloRange(extendedDataRowKeyRange);
return getExtendedDataRowsInRange(trace, Collections.singletonList(range), FetchHints.ALL, authorizations);
}
use of org.apache.accumulo.core.trace.Span in project vertexium by visallo.
the class AccumuloGraph method getVerticesInRange.
@Override
public Iterable<Vertex> getVerticesInRange(Range idRange, FetchHints fetchHints, Long endTime, Authorizations authorizations) {
Span trace = Trace.start("getVerticesInRange");
trace.data("rangeInclusiveStart", idRange.getInclusiveStart());
trace.data("rangeExclusiveStart", idRange.getExclusiveEnd());
traceDataFetchHints(trace, fetchHints);
org.apache.accumulo.core.data.Range range = vertexiumRangeToAccumuloRange(idRange);
return getVerticesInRange(trace, range, fetchHints, endTime, authorizations);
}
use of org.apache.accumulo.core.trace.Span in project vertexium by visallo.
the class AccumuloGraph method getVerticesWithPrefix.
@Override
public Iterable<Vertex> getVerticesWithPrefix(String vertexIdPrefix, FetchHints fetchHints, Long endTime, Authorizations authorizations) {
Span trace = Trace.start("getVerticesWithPrefix");
trace.data("vertexIdPrefix", vertexIdPrefix);
traceDataFetchHints(trace, fetchHints);
org.apache.accumulo.core.data.Range range = org.apache.accumulo.core.data.Range.prefix(vertexIdPrefix);
return getVerticesInRange(trace, range, fetchHints, endTime, authorizations);
}
use of org.apache.accumulo.core.trace.Span in project vertexium by visallo.
the class AccumuloGraph method deleteVertex.
@Override
public void deleteVertex(Vertex vertex, Authorizations authorizations) {
checkNotNull(vertex, "vertex cannot be null");
Span trace = Trace.start("deleteVertex");
trace.data("vertexId", vertex.getId());
try {
getSearchIndex().deleteElement(this, vertex, authorizations);
// Delete all edges that this vertex participates.
for (Edge edge : vertex.getEdges(Direction.BOTH, authorizations)) {
deleteEdge(edge, authorizations);
}
deleteAllExtendedDataForElement(vertex, authorizations);
addMutations(VertexiumObjectType.VERTEX, getDeleteRowMutation(vertex.getId()));
if (hasEventListeners()) {
queueEvent(new DeleteVertexEvent(this, vertex));
}
} finally {
trace.stop();
}
}
use of org.apache.accumulo.core.trace.Span in project vertexium by visallo.
the class AccumuloGraph method getEdge.
@Override
public Edge getEdge(String edgeId, FetchHints fetchHints, Long endTime, Authorizations authorizations) {
Span trace = Trace.start("getEdge");
trace.data("edgeId", edgeId);
try {
return singleOrDefault(getEdgesInRange(trace, edgeId, edgeId, fetchHints, endTime, authorizations), null);
} catch (IllegalStateException ex) {
throw new VertexiumException("Failed to find edge with id: " + edgeId, ex);
} catch (RuntimeException ex) {
if (ex.getCause() instanceof AccumuloSecurityException) {
throw new SecurityVertexiumException("Could not get edge " + edgeId + " with authorizations: " + authorizations, authorizations, ex.getCause());
}
throw ex;
}
}
Aggregations