2 Commits
TP3 ... master

Author SHA1 Message Date
Ryan Webb
f3f8115c91 Merge pull request #129 from gmlewis/master
Upgrade Apache Commons Collections to v3.2.2
2016-03-12 17:10:08 -08:00
Glenn Lewis
91623277fb Upgrade Apache Commons Collections to v3.2.2 2016-03-09 14:08:08 -08:00
24 changed files with 348 additions and 615 deletions

11
pom.xml
View File

@@ -36,17 +36,12 @@
</developers>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-core</artifactId>
<version>3.0.0-incubating</version>
</dependency>
<dependency>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-core</artifactId>
@@ -70,7 +65,7 @@
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>

View File

@@ -235,16 +235,16 @@ public final class AccumuloBulkIngester {
copy.setCreate(false).setClear(false);
AccumuloGraph g = (AccumuloGraph) GraphFactory.open(copy.getConfiguration());
// for (String key : g.getIndexedKeys(Vertex.class)) {
// g.dropKeyIndex(key, Vertex.class);
// g.createKeyIndex(key, Vertex.class);
// }
//
// for (String key : g.getIndexedKeys(Edge.class)) {
// g.dropKeyIndex(key, Edge.class);
// g.createKeyIndex(key, Edge.class);
// }
g.close();
for (String key : g.getIndexedKeys(Vertex.class)) {
g.dropKeyIndex(key, Vertex.class);
g.createKeyIndex(key, Vertex.class);
}
for (String key : g.getIndexedKeys(Edge.class)) {
g.dropKeyIndex(key, Edge.class);
g.createKeyIndex(key, Edge.class);
}
g.shutdown();
// TODO ... other house cleaning/verification?

View File

@@ -14,21 +14,15 @@
*/
package edu.jhuapl.tinkerpop;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.log4j.Logger;
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Property;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
import com.tinkerpop.blueprints.Direction;
import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Vertex;
import com.tinkerpop.blueprints.util.StringFactory;
/**
* TODO
@@ -54,7 +48,10 @@ public class AccumuloEdge extends AccumuloElement implements Edge {
}
@Override
public Iterator<Vertex> vertices(Direction direction) {
public Vertex getVertex(Direction direction) throws IllegalArgumentException {
if (!Direction.IN.equals(direction) && !Direction.OUT.equals(direction)) {
throw new IllegalArgumentException("Invalid direction: "+direction);
}
// The vertex information needs to be loaded.
if (inVertex == null || outVertex == null || label == null) {
@@ -62,17 +59,17 @@ public class AccumuloEdge extends AccumuloElement implements Edge {
globals.getEdgeWrapper().loadEndpointsAndLabel(this);
}
List<Vertex> verts = new ArrayList<Vertex>(2);
if(Direction.IN.equals(direction) || Direction.BOTH.equals(direction)){
verts.add(inVertex);
}
if(Direction.OUT.equals(direction) || Direction.BOTH.equals(direction)){
verts.add(outVertex);
}
return verts.iterator();
return Direction.IN.equals(direction) ? inVertex : outVertex;
}
@Override
public String getLabel() {
// TODO less special treatment for "LABEL" property...
if (label != null) {
return label;
}
return getProperty(StringFactory.LABEL);
}
@Override
public void remove() {
@@ -115,24 +112,6 @@ public class AccumuloEdge extends AccumuloElement implements Edge {
@Override
public String toString() {
return StringFactory.edgeString(this);
return "[" + getId() + ":" + inVertex + " -> " + label + " -> " + outVertex + "]";
}
@Override
public String label() {
// TODO less special treatment for "LABEL" property...
if (label != null) {
return label;
}return "";
// return getProperty(StringFactory.LABEL);
}
@Override
public <V> Iterator<Property<V>> properties(String... propertyKeys) {
// TODO Auto-generated method stub
return null;
}
}

View File

@@ -14,13 +14,9 @@
*/
package edu.jhuapl.tinkerpop;
import java.util.Collections;
import java.util.Set;
import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Property;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.Index;
import com.tinkerpop.blueprints.util.StringFactory;
@@ -62,33 +58,33 @@ public abstract class AccumuloElement implements Element {
}
}
// @Override
// public <T> T property(String key) {
// makeCache();
//
// // Get from property cache.
// T value = propertyCache.get(key);
//
// // If not cached, get it from the backing table.
// if (value == null) {
// value = globals.getElementWrapper(type).readProperty(this, key);
// }
//
// // Cache the new value.
// if (value != null) {
// propertyCache.put(key, value);
// }
//
// return value;
// }
@Override
public Set<String> keys() {
return Collections.unmodifiableSet(globals.getElementWrapper(type).readPropertyKeys(this));
public <T> T getProperty(String key) {
makeCache();
// Get from property cache.
T value = propertyCache.get(key);
// If not cached, get it from the backing table.
if (value == null) {
value = globals.getElementWrapper(type).readProperty(this, key);
}
// Cache the new value.
if (value != null) {
propertyCache.put(key, value);
}
return value;
}
@Override
public <V> Property<V> property(String key, V value) {
public Set<String> getPropertyKeys() {
return globals.getElementWrapper(type).readPropertyKeys(this);
}
@Override
public void setProperty(String key, Object value) {
makeCache();
globals.getKeyIndexTableWrapper(type).setPropertyForIndex(this, key, value);
// MDL 31 Dec 2014: The above calls getProperty, so this
@@ -96,7 +92,6 @@ public abstract class AccumuloElement implements Element {
globals.getElementWrapper(type).writeProperty(this, key, value);
globals.checkedFlush();
setPropertyInMemory(key, value);
return new AccumuloProperty<V>(this, key, value);
}
/**
@@ -110,7 +105,7 @@ public abstract class AccumuloElement implements Element {
propertyCache.put(key, value);
}
@Override
public <T> T removeProperty(String key) {
if (StringFactory.LABEL.equals(key) ||
Constants.LABEL.equals(key)) {
@@ -118,7 +113,7 @@ public abstract class AccumuloElement implements Element {
}
makeCache();
T value = (T) property(key).value();
T value = getProperty(key);
if (value != null) {
globals.getElementWrapper(type).clearProperty(this, key);
globals.checkedFlush();
@@ -169,14 +164,9 @@ public abstract class AccumuloElement implements Element {
makeCache();
return propertyCache.get(key);
}
@Override
public Graph graph() {
return globals.getGraph();
}
@Override
public Object id() {
public Object getId() {
return id;
}

View File

@@ -14,141 +14,49 @@
*/
package edu.jhuapl.tinkerpop;
import java.util.UUID;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.VertexProperty;
import org.apache.tinkerpop.gremlin.structure.Graph.Features;
import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgeFeatures;
import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures;
import org.apache.tinkerpop.gremlin.structure.Graph.Features.ElementFeatures;
import org.apache.tinkerpop.gremlin.structure.Graph.Features.FeatureSet;
import org.apache.tinkerpop.gremlin.structure.Graph.Features.GraphFeatures;
import org.apache.tinkerpop.gremlin.structure.Graph.Features.PropertyFeatures;
import org.apache.tinkerpop.gremlin.structure.Graph.Features.VariableFeatures;
import org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexFeatures;
import org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexPropertyFeatures;
import org.apache.tinkerpop.gremlin.structure.util.FeatureDescriptor;
import com.tinkerpop.blueprints.Features;
/**
* {@link Features} creator.
*/
public class AccumuloFeatures implements Features {
public GraphFeatures graph() {
return new AccumuloGraphFeatures();
}
public class AccumuloFeatures {
public static Features get() {
Features f = new Features();
public VertexFeatures vertex() {
return new AccumuloVertexFeatures() {};
}
// For simplicity, I accept all property types. They are handled in not the
// best way. To be fixed later.
f.ignoresSuppliedIds = true;
f.isPersistent = true;
f.isWrapper = false;
f.supportsBooleanProperty = true;
f.supportsDoubleProperty = true;
f.supportsDuplicateEdges = true;
f.supportsEdgeIndex = true;
f.supportsEdgeIteration = true;
f.supportsEdgeRetrieval = true;
f.supportsEdgeKeyIndex = true;
f.supportsEdgeProperties = true;
f.supportsFloatProperty = true;
f.supportsIndices = true;
f.supportsIntegerProperty = true;
f.supportsKeyIndices = true;
f.supportsLongProperty = true;
f.supportsMapProperty = true;
f.supportsMixedListProperty = true;
f.supportsPrimitiveArrayProperty = true;
f.supportsSelfLoops = true;
f.supportsSerializableObjectProperty = true;
f.supportsStringProperty = true;
f.supportsThreadedTransactions = false;
f.supportsTransactions = false;
f.supportsUniformListProperty = true;
f.supportsVertexIndex = true;
f.supportsVertexIteration = true;
f.supportsVertexKeyIndex = true;
f.supportsVertexProperties = true;
f.supportsThreadIsolatedTransactions = false;
public EdgeFeatures edge() {
return new AccumuloEdgeFeatures() {};
return f;
}
}
class AccumuloGraphFeatures implements GraphFeatures {
@FeatureDescriptor(name = FEATURE_COMPUTER)
public boolean supportsComputer() {
return false;
}
@FeatureDescriptor(name = FEATURE_PERSISTENCE)
public boolean supportsPersistence() {
return false;
}
@FeatureDescriptor(name = FEATURE_TRANSACTIONS)
public boolean supportsTransactions() {
return false;
}
@FeatureDescriptor(name = FEATURE_THREADED_TRANSACTIONS)
public boolean supportsThreadedTransactions() {
return false;
}
public VariableFeatures variables() {
return new VariableFeatures(){};
}
}
class AccumuloEdgeFeatures extends AccumuloElementFeatures implements EdgeFeatures {
public EdgePropertyFeatures properties() {
return new EdgePropertyFeatures() {
};
}
}
class AccumuloElementFeatures implements ElementFeatures {
}
class AccumuloVertexFeatures extends AccumuloElementFeatures implements VertexFeatures{
public VertexProperty.Cardinality getCardinality(final String key) {
return VertexProperty.Cardinality.single;
}
@FeatureDescriptor(name = FEATURE_MULTI_PROPERTIES)
public boolean supportsMultiProperties() {
return false;
}
@FeatureDescriptor(name = FEATURE_META_PROPERTIES)
public boolean supportsMetaProperties() {
return false;
}
public VertexPropertyFeatures properties() {
return new AccumuloVertexPropertyFeatures();
}
}
class AccumuloVertexPropertyFeatures implements VertexPropertyFeatures {
}
//
// public static Features get() {
// Features f = new Features();
//
// // For simplicity, I accept all property types. They are handled in not the
// // best way. To be fixed later.
// f.ignoresSuppliedIds = true;
// f.isPersistent = true;
// f.isWrapper = false;
// f.supportsBooleanProperty = true;
// f.supportsDoubleProperty = true;
// f.supportsDuplicateEdges = true;
// f.supportsEdgeIndex = true;
// f.supportsEdgeIteration = true;
// f.supportsEdgeRetrieval = true;
// f.supportsEdgeKeyIndex = true;
// f.supportsEdgeProperties = true;
// f.supportsFloatProperty = true;
// f.supportsIndices = true;
// f.supportsIntegerProperty = true;
// f.supportsKeyIndices = true;
// f.supportsLongProperty = true;
// f.supportsMapProperty = true;
// f.supportsMixedListProperty = true;
// f.supportsPrimitiveArrayProperty = true;
// f.supportsSelfLoops = true;
// f.supportsSerializableObjectProperty = true;
// f.supportsStringProperty = true;
// f.supportsThreadedTransactions = false;
// f.supportsTransactions = false;
// f.supportsUniformListProperty = true;
// f.supportsVertexIndex = true;
// f.supportsVertexIteration = true;
// f.supportsVertexKeyIndex = true;
// f.supportsVertexProperties = true;
// f.supportsThreadIsolatedTransactions = false;
//
// return f;
// }
// }

View File

@@ -14,25 +14,32 @@
*/
package edu.jhuapl.tinkerpop;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.SortedSet;
import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.BatchDeleter;
import org.apache.accumulo.core.client.MutationsRejectedException;
import org.apache.accumulo.core.client.admin.TableOperations;
import org.apache.accumulo.core.data.Range;
import org.apache.commons.configuration.Configuration;
import org.apache.hadoop.io.Text;
import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Transaction;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.util.GraphFactory;
import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.Features;
import com.tinkerpop.blueprints.Graph;
import com.tinkerpop.blueprints.GraphFactory;
import com.tinkerpop.blueprints.GraphQuery;
import com.tinkerpop.blueprints.Index;
import com.tinkerpop.blueprints.IndexableGraph;
import com.tinkerpop.blueprints.KeyIndexableGraph;
import com.tinkerpop.blueprints.Parameter;
import com.tinkerpop.blueprints.Vertex;
import com.tinkerpop.blueprints.util.DefaultGraphQuery;
import com.tinkerpop.blueprints.util.ExceptionFactory;
import edu.jhuapl.tinkerpop.cache.ElementCaches;
@@ -52,7 +59,7 @@ import edu.jhuapl.tinkerpop.cache.ElementCaches;
* <li>Hadoop integration</li>
* </ol>
*/
public class AccumuloGraph implements Graph {
public class AccumuloGraph implements Graph, KeyIndexableGraph, IndexableGraph {
private final GlobalInstances globals;
@@ -84,7 +91,7 @@ public class AccumuloGraph implements Graph {
try {
globals = new GlobalInstances(config, config.getConnector()
.createMultiTableBatchWriter(config.getBatchWriterConfig()),
new ElementCaches(config), this);
new ElementCaches(config));
} catch (Exception e) {
throw new AccumuloGraphException(e);
}
@@ -99,9 +106,12 @@ public class AccumuloGraph implements Graph {
return globals;
}
@Override
public Features getFeatures() {
return AccumuloFeatures.get();
}
// @Override
@Override
public Vertex addVertex(Object id) {
if (id == null) {
id = AccumuloGraphUtils.generateId();
@@ -127,7 +137,13 @@ public class AccumuloGraph implements Graph {
return vert;
}
/**
*
* @return an immutable copy of the configuration running this graph
*/
public Configuration getConfiguration(){
return globals.getConfig().getConfiguration();
}
/**
* Flushes the backing writers so the data is persisted.
@@ -138,7 +154,7 @@ public class AccumuloGraph implements Graph {
}
// @Override
@Override
public Vertex getVertex(Object id) {
if (id == null) {
throw ExceptionFactory.vertexIdCanNotBeNull();
@@ -176,12 +192,12 @@ public class AccumuloGraph implements Graph {
return vertex;
}
// @Override
@Override
public void removeVertex(Vertex vertex) {
vertex.remove();
}
// @Override
@Override
public Iterable<Vertex> getVertices() {
return globals.getVertexWrapper().getVertices();
}
@@ -200,36 +216,23 @@ public class AccumuloGraph implements Graph {
public Iterable<Vertex> getVerticesInRange(Object fromId, Object toId) {
return globals.getVertexWrapper().getVerticesInRange(fromId, toId);
}
@Override
public Iterator<Vertex> vertices(Object... vertexIds) {
if(vertexIds.length==0){
return globals.getVertexWrapper().getVertices().iterator();
}else{
List<Vertex> edges = new ArrayList<Vertex>(vertexIds.length);
for(Object id : vertexIds){
edges.add(getVertex(id));
}
return edges.iterator();
public Iterable<Vertex> getVertices(String key, Object value) {
AccumuloGraphUtils.validateProperty(key, value);
if (globals.getConfig().getAutoIndex() || getIndexedKeys(Vertex.class).contains(key)) {
return globals.getVertexKeyIndexWrapper().getVertices(key, value);
} else {
return globals.getVertexWrapper().getVertices(key, value);
}
}
//@Override
public Iterable<Vertex> getVertices(String key, Object value) {
AccumuloGraphUtils.validateProperty(key, value);
// if (globals.getConfig().getAutoIndex() || getIndexedKeys(Vertex.class).contains(key)) {
// return globals.getVertexKeyIndexWrapper().getVertices(key, value);
// } else {
return globals.getVertexWrapper().getVertices(key, value);
// }
}
// @Override
@Override
public Edge addEdge(Object id, Vertex outVertex, Vertex inVertex, String label) {
return ((AccumuloVertex) outVertex).addEdge(id, label, inVertex);
}
//@Override
@Override
public Edge getEdge(Object id) {
if (id == null) {
throw ExceptionFactory.edgeIdCanNotBeNull();
@@ -270,41 +273,38 @@ public class AccumuloGraph implements Graph {
return edge;
}
// @Override
@Override
public void removeEdge(Edge edge) {
edge.remove();
}
@Override
public Iterator<Edge> edges(Object... ids) {
if(ids.length==0){
return globals.getEdgeWrapper().getEdges().iterator();
}else{
List<Edge> edges = new ArrayList<Edge>(ids.length);
for(Object id : ids){
edges.add(getEdge(id));
}
return edges.iterator();
public Iterable<Edge> getEdges() {
return globals.getEdgeWrapper().getEdges();
}
@Override
public Iterable<Edge> getEdges(String key, Object value) {
AccumuloGraphUtils.nullCheckProperty(key, value);
if (key.equalsIgnoreCase("label")) {
key = Constants.LABEL;
}
if (globals.getConfig().getAutoIndex() || getIndexedKeys(Edge.class).contains(key)) {
return globals.getEdgeKeyIndexWrapper().getEdges(key, value);
} else {
return globals.getEdgeWrapper().getEdges(key, value);
}
}
// @Override
// public Iterable<Edge> getEdges(String key, Object value) {
// AccumuloGraphUtils.nullCheckProperty(key, value);
// if (key.equalsIgnoreCase("label")) {
// key = Constants.LABEL;
// }
//
// if (globals.getConfig().getAutoIndex() || getIndexedKeys(Edge.class).contains(key)) {
// return globals.getEdgeKeyIndexWrapper().getEdges(key, value);
// } else {
// return globals.getEdgeWrapper().getEdges(key, value);
// }
// }
// TODO Eventually
@Override
public GraphQuery query() {
return new DefaultGraphQuery(this);
}
@Override
public void close() {
public void shutdown() {
try {
globals.getMtbw().close();
globals.getVertexWrapper().close();
@@ -321,136 +321,136 @@ public class AccumuloGraph implements Graph {
return AccumuloGraphConfiguration.ACCUMULO_GRAPH_CLASS.getSimpleName().toLowerCase();
}
// @SuppressWarnings("rawtypes")
// @Override
// public <T extends Element> Index<T> createIndex(String indexName,
// Class<T> indexClass, Parameter... indexParameters) {
// if (indexClass == null) {
// throw ExceptionFactory.classForElementCannotBeNull();
// }
// else if (globals.getConfig().getIndexableGraphDisabled()) {
// throw new UnsupportedOperationException("IndexableGraph is disabled via the configuration");
// }
//
// for (Index<?> index : globals.getIndexMetadataWrapper().getIndices()) {
// if (index.getIndexName().equals(indexName)) {
// throw ExceptionFactory.indexAlreadyExists(indexName);
// }
// }
//
// return globals.getIndexMetadataWrapper().createIndex(indexName, indexClass);
// }
//
// @Override
// public <T extends Element> Index<T> getIndex(String indexName, Class<T> indexClass) {
// if (indexClass == null) {
// throw ExceptionFactory.classForElementCannotBeNull();
// }
// else if (globals.getConfig().getIndexableGraphDisabled()) {
// throw new UnsupportedOperationException("IndexableGraph is disabled via the configuration");
// }
//
// return globals.getIndexMetadataWrapper().getIndex(indexName, indexClass);
// }
//
// @Override
// public Iterable<Index<? extends Element>> getIndices() {
// if (globals.getConfig().getIndexableGraphDisabled()) {
// throw new UnsupportedOperationException("IndexableGraph is disabled via the configuration");
// }
// return globals.getIndexMetadataWrapper().getIndices();
// }
@SuppressWarnings("rawtypes")
@Override
public <T extends Element> Index<T> createIndex(String indexName,
Class<T> indexClass, Parameter... indexParameters) {
if (indexClass == null) {
throw ExceptionFactory.classForElementCannotBeNull();
}
else if (globals.getConfig().getIndexableGraphDisabled()) {
throw new UnsupportedOperationException("IndexableGraph is disabled via the configuration");
}
// @Override
// public void dropIndex(String indexName) {
// if (globals.getConfig().getIndexableGraphDisabled())
// throw new UnsupportedOperationException("IndexableGraph is disabled via the configuration");
//
// for (Index<? extends Element> index : getIndices()) {
// if (index.getIndexName().equals(indexName)) {
// globals.getIndexMetadataWrapper().clearIndexNameEntry(indexName, index.getIndexClass());
//
// try {
// globals.getConfig().getConnector().tableOperations().delete(globals.getConfig()
// .getNamedIndexTableName(indexName));
// } catch (Exception e) {
// throw new AccumuloGraphException(e);
// }
//
// return;
// }
// }
//
// throw new AccumuloGraphException("Index does not exist: "+indexName);
// }
for (Index<?> index : globals.getIndexMetadataWrapper().getIndices()) {
if (index.getIndexName().equals(indexName)) {
throw ExceptionFactory.indexAlreadyExists(indexName);
}
}
// @Override
// public <T extends Element> void dropKeyIndex(String key, Class<T> elementClass) {
// // TODO Move below to somewhere appropriate.
// if (elementClass == null) {
// throw ExceptionFactory.classForElementCannotBeNull();
// }
//
// globals.getIndexMetadataWrapper().clearKeyMetadataEntry(key, elementClass);
//
// String table = null;
// if (elementClass.equals(Vertex.class)) {
// table = globals.getConfig().getVertexKeyIndexTableName();
// } else {
// table = globals.getConfig().getEdgeKeyIndexTableName();
// }
// BatchDeleter bd = null;
// try {
// bd = globals.getConfig().getConnector().createBatchDeleter(table, globals.getConfig().getAuthorizations(), globals.getConfig().getMaxWriteThreads(), globals.getConfig().getBatchWriterConfig());
// bd.setRanges(Collections.singleton(new Range()));
// bd.fetchColumnFamily(new Text(key));
// bd.delete();
// } catch (Exception e) {
// throw new AccumuloGraphException(e);
// } finally {
// if (bd != null)
// bd.close();
// }
// globals.checkedFlush();
// }
return globals.getIndexMetadataWrapper().createIndex(indexName, indexClass);
}
// @SuppressWarnings("rawtypes")
// @Override
// public <T extends Element> void createKeyIndex(String key,
// Class<T> elementClass, Parameter... indexParameters) {
// // TODO Move below to somewhere appropriate.
// if (elementClass == null) {
// throw ExceptionFactory.classForElementCannotBeNull();
// }
//
// // Add key to indexed keys list.
// globals.getIndexMetadataWrapper().writeKeyMetadataEntry(key, elementClass);
// globals.checkedFlush();
//
// // Reindex graph.
// globals.getKeyIndexTableWrapper(elementClass).rebuildIndex(key, elementClass);
// globals.getVertexKeyIndexWrapper().dump();
// globals.checkedFlush();
// }
@Override
public <T extends Element> Index<T> getIndex(String indexName, Class<T> indexClass) {
if (indexClass == null) {
throw ExceptionFactory.classForElementCannotBeNull();
}
else if (globals.getConfig().getIndexableGraphDisabled()) {
throw new UnsupportedOperationException("IndexableGraph is disabled via the configuration");
}
// @Override
// public <T extends Element> Set<String> getIndexedKeys(Class<T> elementClass) {
// return globals.getIndexMetadataWrapper().getIndexedKeys(elementClass);
// }
return globals.getIndexMetadataWrapper().getIndex(indexName, indexClass);
}
@Override
public Iterable<Index<? extends Element>> getIndices() {
if (globals.getConfig().getIndexableGraphDisabled()) {
throw new UnsupportedOperationException("IndexableGraph is disabled via the configuration");
}
return globals.getIndexMetadataWrapper().getIndices();
}
@Override
public void dropIndex(String indexName) {
if (globals.getConfig().getIndexableGraphDisabled())
throw new UnsupportedOperationException("IndexableGraph is disabled via the configuration");
for (Index<? extends Element> index : getIndices()) {
if (index.getIndexName().equals(indexName)) {
globals.getIndexMetadataWrapper().clearIndexNameEntry(indexName, index.getIndexClass());
try {
globals.getConfig().getConnector().tableOperations().delete(globals.getConfig()
.getNamedIndexTableName(indexName));
} catch (Exception e) {
throw new AccumuloGraphException(e);
}
return;
}
}
throw new AccumuloGraphException("Index does not exist: "+indexName);
}
@Override
public <T extends Element> void dropKeyIndex(String key, Class<T> elementClass) {
// TODO Move below to somewhere appropriate.
if (elementClass == null) {
throw ExceptionFactory.classForElementCannotBeNull();
}
globals.getIndexMetadataWrapper().clearKeyMetadataEntry(key, elementClass);
String table = null;
if (elementClass.equals(Vertex.class)) {
table = globals.getConfig().getVertexKeyIndexTableName();
} else {
table = globals.getConfig().getEdgeKeyIndexTableName();
}
BatchDeleter bd = null;
try {
bd = globals.getConfig().getConnector().createBatchDeleter(table, globals.getConfig().getAuthorizations(), globals.getConfig().getMaxWriteThreads(), globals.getConfig().getBatchWriterConfig());
bd.setRanges(Collections.singleton(new Range()));
bd.fetchColumnFamily(new Text(key));
bd.delete();
} catch (Exception e) {
throw new AccumuloGraphException(e);
} finally {
if (bd != null)
bd.close();
}
globals.checkedFlush();
}
@SuppressWarnings("rawtypes")
@Override
public <T extends Element> void createKeyIndex(String key,
Class<T> elementClass, Parameter... indexParameters) {
// TODO Move below to somewhere appropriate.
if (elementClass == null) {
throw ExceptionFactory.classForElementCannotBeNull();
}
// Add key to indexed keys list.
globals.getIndexMetadataWrapper().writeKeyMetadataEntry(key, elementClass);
globals.checkedFlush();
// Reindex graph.
globals.getKeyIndexTableWrapper(elementClass).rebuildIndex(key, elementClass);
globals.getVertexKeyIndexWrapper().dump();
globals.checkedFlush();
}
@Override
public <T extends Element> Set<String> getIndexedKeys(Class<T> elementClass) {
return globals.getIndexMetadataWrapper().getIndexedKeys(elementClass);
}
/**
* Clear out this graph. This drops and recreates the backing tables.
*/
public void clear() {
close();
shutdown();
try {
TableOperations tableOps = globals.getConfig()
.getConnector().tableOperations();
// for (Index<? extends Element> index : getIndices()) {
// tableOps.delete(((AccumuloIndex<? extends Element>)
// index).getTableName());
// }
for (Index<? extends Element> index : getIndices()) {
tableOps.delete(((AccumuloIndex<? extends Element>)
index).getTableName());
}
for (String table : globals.getConfig().getTableNames()) {
if (tableOps.exists(table)) {
@@ -483,46 +483,4 @@ public class AccumuloGraph implements Graph {
throw new AccumuloGraphException(e);
}
}
@Override
public Vertex addVertex(Object... keyValues) {
// TODO Auto-generated method stub
return null;
}
@Override
public <C extends GraphComputer> C compute(Class<C> graphComputerClass) throws IllegalArgumentException {
// TODO Auto-generated method stub
return null;
}
@Override
public GraphComputer compute() throws IllegalArgumentException {
// TODO Auto-generated method stub
return null;
}
@Override
public Transaction tx() {
// TODO Auto-generated method stub
return null;
}
@Override
public Variables variables() {
// TODO Auto-generated method stub
return null;
}
@Override
public Configuration configuration() {
return globals.getConfig().getConfiguration();
}
}

View File

@@ -48,8 +48,8 @@ import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.configuration.event.ConfigurationEvent;
import org.apache.commons.configuration.event.ConfigurationListener;
import org.apache.hadoop.io.Text;
import org.apache.tinkerpop.gremlin.structure.Graph;
import com.tinkerpop.blueprints.Graph;
import com.tinkerpop.blueprints.IndexableGraph;
import com.tinkerpop.blueprints.KeyIndexableGraph;

View File

@@ -1,45 +0,0 @@
package edu.jhuapl.tinkerpop;
import java.util.NoSuchElementException;
import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.Property;
public class AccumuloProperty<V> implements Property<V>{
final AccumuloElement element;
final String key;
final V value;
public AccumuloProperty(AccumuloElement ele, String key, V value){
this.element=ele;
this.key=key;
this.value=value;
}
@Override
public String key() {
return key;
}
@Override
public V value() throws NoSuchElementException {
return value;
}
@Override
public boolean isPresent() {
return value!=null;
}
@Override
public Element element() {
return element;
}
@Override
public void remove() {
element.removeProperty(key);
}
}

View File

@@ -14,21 +14,17 @@
*/
package edu.jhuapl.tinkerpop;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Property;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.VertexProperty;
import org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality;
import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
import com.tinkerpop.blueprints.CloseableIterable;
import com.tinkerpop.blueprints.Direction;
import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Vertex;
import com.tinkerpop.blueprints.VertexQuery;
import com.tinkerpop.blueprints.util.DefaultVertexQuery;
import com.tinkerpop.blueprints.util.ExceptionFactory;
/**
* TODO
*/
@@ -38,14 +34,22 @@ public class AccumuloVertex extends AccumuloElement implements Vertex {
super(globals, id, Vertex.class);
}
//TODO
public <V> VertexProperty<V> property(String key, V value){
return null;
@Override
public Iterable<Edge> getEdges(Direction direction, String... labels) {
return globals.getVertexWrapper().getEdges(this, direction, labels);
}
@Override
public Iterable<Vertex> getVertices(Direction direction, String... labels) {
return globals.getVertexWrapper().getVertices(this, direction, labels);
}
@Override
public VertexQuery query() {
return new DefaultVertexQuery(this);
}
// @Override
@Override
public Edge addEdge(String label, Vertex inVertex) {
return addEdge(null, label, inVertex);
}
@@ -85,13 +89,13 @@ public class AccumuloVertex extends AccumuloElement implements Vertex {
@Override
public void remove() {
globals.getCaches().remove(id(), Vertex.class);
globals.getCaches().remove(getId(), Vertex.class);
super.removeElementFromNamedIndexes();
// Throw exception if the element does not exist.
if (!globals.getVertexWrapper().elementExists(id)) {
throw ExceptionFactory.vertexWithIdDoesNotExist(id());
throw ExceptionFactory.vertexWithIdDoesNotExist(getId());
}
// Remove properties from key/value indexes.
@@ -104,11 +108,11 @@ public class AccumuloVertex extends AccumuloElement implements Vertex {
}
// Remove edges incident to this vertex.
Iterator<Edge> iter = edges(Direction.BOTH);
while (iter.hasNext()) {
iter.next().remove();
CloseableIterable<Edge> iter = (CloseableIterable<Edge>)getEdges(Direction.BOTH);
for (Edge edge : iter) {
edge.remove();
}
//iter.close();
iter.close();
globals.checkedFlush();
@@ -119,43 +123,7 @@ public class AccumuloVertex extends AccumuloElement implements Vertex {
@Override
public String toString() {
return StringFactory.vertexString(this);
}
@Override
public String label() {
// TODO Auto-generated method stub
return null;
}
@Override
public Edge addEdge(String label, Vertex inVertex, Object... keyValues) {
// TODO Auto-generated method stub
return null;
}
@Override
public <V> VertexProperty<V> property(Cardinality cardinality, String key, V value, Object... keyValues) {
// TODO Auto-generated method stub
return null;
}
@Override
public Iterator<Edge> edges(Direction direction, String... edgeLabels) {
return globals.getVertexWrapper().getEdges(this, direction, edgeLabels).iterator();
}
@Override
public Iterator<Vertex> vertices(Direction direction, String... edgeLabels) {
return globals.getVertexWrapper().getVertices(this, direction, edgeLabels).iterator();
}
@Override
public <V> Iterator<VertexProperty<V>> properties(String... propertyKeys) {
// TODO Auto-generated method stub
return null;
return "[" + getId() + "]";
}
}

View File

@@ -17,12 +17,9 @@ package edu.jhuapl.tinkerpop;
import org.apache.accumulo.core.client.MultiTableBatchWriter;
import org.apache.accumulo.core.client.MutationsRejectedException;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.Vertex;
import edu.jhuapl.tinkerpop.cache.ElementCaches;
import edu.jhuapl.tinkerpop.tables.core.EdgeTableWrapper;
@@ -42,21 +39,14 @@ public class GlobalInstances {
private final AccumuloGraphConfiguration config;
private final MultiTableBatchWriter mtbw;
private final ElementCaches caches;
private final Graph graph;
public GlobalInstances(AccumuloGraphConfiguration config,
MultiTableBatchWriter mtbw, ElementCaches caches, AccumuloGraph g) {
MultiTableBatchWriter mtbw, ElementCaches caches) {
this.config = config;
this.mtbw = mtbw;
this.caches = caches;
graph=g;
}
public Graph getGraph(){
return graph;
}
public AccumuloGraphConfiguration getConfig() {
return config;
}

View File

@@ -21,10 +21,9 @@ import org.apache.accumulo.core.client.ScannerBase;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.util.PeekingIterator;
import org.apache.tinkerpop.gremlin.structure.Element;
import com.tinkerpop.blueprints.CloseableIterable;
import com.tinkerpop.blueprints.Element;
/**
* TODO

View File

@@ -16,10 +16,9 @@ package edu.jhuapl.tinkerpop.cache;
import java.util.concurrent.TimeUnit;
import org.apache.tinkerpop.gremlin.structure.Element;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.tinkerpop.blueprints.Element;
/**
* Simple cache for retrieved graph elements,
@@ -37,7 +36,7 @@ public class ElementCache<T extends Element> {
}
public void cache(T element) {
cache.put(element.id(), element);
cache.put(element.getId(), element);
}
public T retrieve(Object id) {

View File

@@ -14,11 +14,9 @@
*/
package edu.jhuapl.tinkerpop.cache;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.Vertex;
import edu.jhuapl.tinkerpop.AccumuloGraphConfiguration;
import edu.jhuapl.tinkerpop.AccumuloGraphException;

View File

@@ -14,7 +14,8 @@
*/
package edu.jhuapl.tinkerpop.mutator.edge;
import org.apache.tinkerpop.gremlin.structure.Edge;
import com.tinkerpop.blueprints.Direction;
import com.tinkerpop.blueprints.Edge;
import edu.jhuapl.tinkerpop.mutator.Mutator;
@@ -26,10 +27,10 @@ public abstract class BaseEdgeMutator implements Mutator {
protected final String label;
public BaseEdgeMutator(Edge edge) {
this(edge.id().toString(),
edge.outVertex().id().toString(),
edge.inVertex().id().toString(),
edge.label());
this(edge.getId().toString(),
edge.getVertex(Direction.OUT).getId().toString(),
edge.getVertex(Direction.IN).getId().toString(),
edge.getLabel());
}
public BaseEdgeMutator(String id, String outVertexId, String inVertexId, String label) {
this.id = id;

View File

@@ -15,9 +15,9 @@
package edu.jhuapl.tinkerpop.mutator.edge;
import org.apache.accumulo.core.data.Mutation;
import org.apache.tinkerpop.gremlin.structure.Edge;
import com.google.common.collect.Lists;
import com.tinkerpop.blueprints.Edge;
import edu.jhuapl.tinkerpop.Constants;

View File

@@ -15,9 +15,9 @@
package edu.jhuapl.tinkerpop.mutator.edge;
import org.apache.accumulo.core.data.Mutation;
import org.apache.tinkerpop.gremlin.structure.Edge;
import com.google.common.collect.Lists;
import com.tinkerpop.blueprints.Edge;
import edu.jhuapl.tinkerpop.AccumuloByteSerializer;
import edu.jhuapl.tinkerpop.Constants;

View File

@@ -15,9 +15,9 @@
package edu.jhuapl.tinkerpop.mutator.index;
import org.apache.accumulo.core.data.Mutation;
import org.apache.tinkerpop.gremlin.structure.Element;
import com.google.common.collect.Lists;
import com.tinkerpop.blueprints.Element;
import edu.jhuapl.tinkerpop.Constants;
import edu.jhuapl.tinkerpop.Constants.IndexMetadataEntryType;

View File

@@ -14,8 +14,7 @@
*/
package edu.jhuapl.tinkerpop.parser;
import org.apache.tinkerpop.gremlin.structure.Element;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.IndexableGraph;
import com.tinkerpop.blueprints.KeyIndexableGraph;

View File

@@ -20,12 +20,12 @@ import java.util.Map.Entry;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.IndexableGraph;
import com.tinkerpop.blueprints.KeyIndexableGraph;
import com.tinkerpop.blueprints.Vertex;
import edu.jhuapl.tinkerpop.AccumuloGraphException;

View File

@@ -30,10 +30,8 @@ import org.apache.accumulo.core.iterators.user.RegExFilter;
import org.apache.accumulo.core.util.PeekingIterator;
import org.apache.hadoop.io.Text;
import org.apache.tinkerpop.gremlin.structure.Edge;
import com.tinkerpop.blueprints.CloseableIterable;
import com.tinkerpop.blueprints.Edge;
import edu.jhuapl.tinkerpop.AccumuloByteSerializer;
import edu.jhuapl.tinkerpop.AccumuloEdge;

View File

@@ -17,8 +17,8 @@ package edu.jhuapl.tinkerpop.tables.core;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.Map.Entry;
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.IteratorSetting;
@@ -28,16 +28,16 @@ import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.user.RegExFilter;
import org.apache.hadoop.io.Text;
import org.apache.tinkerpop.gremlin.structure.Element;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.util.StringFactory;
import edu.jhuapl.tinkerpop.AccumuloByteSerializer;
import edu.jhuapl.tinkerpop.Constants;
import edu.jhuapl.tinkerpop.GlobalInstances;
import edu.jhuapl.tinkerpop.mutator.Mutators;
import edu.jhuapl.tinkerpop.mutator.property.ClearPropertyMutator;
import edu.jhuapl.tinkerpop.mutator.property.WritePropertyMutator;
import edu.jhuapl.tinkerpop.mutator.Mutators;
import edu.jhuapl.tinkerpop.parser.PropertyParser;
import edu.jhuapl.tinkerpop.tables.BaseTableWrapper;
@@ -72,7 +72,7 @@ public abstract class ElementTableWrapper extends BaseTableWrapper {
public <V> V readProperty(Element element, String key) {
Scanner s = getScanner();
s.setRange(new Range(element.id().toString()));
s.setRange(new Range(element.getId().toString()));
Text colf = StringFactory.LABEL.equals(key)
? new Text(Constants.LABEL) : new Text(key);
@@ -112,7 +112,7 @@ public abstract class ElementTableWrapper extends BaseTableWrapper {
*/
public Map<String, Object> readProperties(Element element, String[] propertyKeys) {
Scanner s = getScanner();
s.setRange(Range.exact((String) element.id()));
s.setRange(Range.exact((String) element.getId()));
// If propertyKeys is null, we read everything.
// Otherwise, limit to the given attributes.
@@ -158,7 +158,7 @@ public abstract class ElementTableWrapper extends BaseTableWrapper {
public Set<String> readPropertyKeys(Element element) {
Scanner s = getScanner();
s.setRange(new Range(element.id().toString()));
s.setRange(new Range(element.getId().toString()));
Set<String> keys = new HashSet<String>();
@@ -184,7 +184,7 @@ public abstract class ElementTableWrapper extends BaseTableWrapper {
*/
public void clearProperty(Element element, String key) {
Mutators.apply(getWriter(),
new ClearPropertyMutator(element.id().toString(), key));
new ClearPropertyMutator(element.getId().toString(), key));
globals.checkedFlush();
}
@@ -196,7 +196,7 @@ public abstract class ElementTableWrapper extends BaseTableWrapper {
*/
public void writeProperty(Element element, String key, Object value) {
Mutators.apply(getWriter(),
new WritePropertyMutator(element.id().toString(),
new WritePropertyMutator(element.getId().toString(),
key, value));
globals.checkedFlush();
}

View File

@@ -30,15 +30,11 @@ import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.user.RegExFilter;
import org.apache.accumulo.core.util.PeekingIterator;
import org.apache.hadoop.io.Text;
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import com.tinkerpop.blueprints.CloseableIterable;
import com.tinkerpop.blueprints.Direction;
import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Vertex;
import edu.jhuapl.tinkerpop.AccumuloByteSerializer;
import edu.jhuapl.tinkerpop.AccumuloEdge;
@@ -71,7 +67,7 @@ public class VertexTableWrapper extends ElementTableWrapper {
* @param vertex
*/
public void writeVertex(Vertex vertex) {
Mutators.apply(getWriter(), new AddVertexMutator(vertex.id().toString()));
Mutators.apply(getWriter(), new AddVertexMutator(vertex.getId().toString()));
globals.checkedFlush();
}
@@ -86,7 +82,7 @@ public class VertexTableWrapper extends ElementTableWrapper {
try {
deleter = getDeleter();
deleter.setRanges(Arrays.asList(Range.exact((String) vertex.id())));
deleter.setRanges(Arrays.asList(Range.exact((String) vertex.getId())));
deleter.delete();
} catch (Exception e) {
@@ -115,7 +111,7 @@ public class VertexTableWrapper extends ElementTableWrapper {
public CloseableIterable<Edge> getEdges(Vertex vertex, Direction direction,
String... labels) {
Scanner scan = getScanner();
scan.setRange(new Range(vertex.id().toString()));
scan.setRange(new Range(vertex.getId().toString()));
if (direction.equals(Direction.IN)) {
scan.fetchColumnFamily(new Text(Constants.IN_EDGE));
} else if (direction.equals(Direction.OUT)) {
@@ -161,7 +157,7 @@ public class VertexTableWrapper extends ElementTableWrapper {
public Iterable<Vertex> getVertices(Vertex vertex, Direction direction, String... labels) {
Scanner scan = getScanner();
scan.setRange(new Range(vertex.id().toString()));
scan.setRange(new Range(vertex.getId().toString()));
if (direction.equals(Direction.IN)) {
scan.fetchColumnFamily(new Text(Constants.IN_EDGE));
} else if (direction.equals(Direction.OUT)) {

View File

@@ -29,11 +29,11 @@ import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.user.RegExFilter;
import org.apache.accumulo.core.util.PeekingIterator;
import org.apache.hadoop.io.Text;
import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import com.tinkerpop.blueprints.CloseableIterable;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.IndexableGraph;
import com.tinkerpop.blueprints.Vertex;
import edu.jhuapl.tinkerpop.AccumuloByteSerializer;
import edu.jhuapl.tinkerpop.AccumuloElement;
@@ -103,7 +103,7 @@ public abstract class BaseIndexValuesTableWrapper extends BaseTableWrapper {
.getIndexedKeys(elementType).contains(key)) {
BatchWriter writer = getWriter();
Object oldValue = element.property(key);
Object oldValue = element.getProperty(key);
if (oldValue != null && !oldValue.equals(value)) {
Mutators.apply(writer, new IndexValueMutator.Delete(element, key, oldValue));
}
@@ -164,7 +164,7 @@ public abstract class BaseIndexValuesTableWrapper extends BaseTableWrapper {
IteratorSetting is = new IteratorSetting(10, "getEdgeFilter", RegExFilter.class);
RegExFilter.setRegexs(is, null, null,
"^"+Pattern.quote(element.id().toString())+"$", null, false);
"^"+Pattern.quote(element.getId().toString())+"$", null, false);
deleter.addScanIterator(is);
deleter.delete();
deleter.close();

View File

@@ -21,8 +21,8 @@ import java.util.Set;
import org.apache.accumulo.core.client.Scanner;
import org.apache.hadoop.io.Text;
import org.apache.tinkerpop.gremlin.structure.Element;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.Index;
import com.tinkerpop.blueprints.IndexableGraph;
import com.tinkerpop.blueprints.KeyIndexableGraph;