Package io.hgraphdb
Class HBaseGraph
- java.lang.Object
-
- io.hgraphdb.HBaseGraph
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.tinkerpop.gremlin.structure.Graph
,org.apache.tinkerpop.gremlin.structure.util.Host
public class HBaseGraph extends Object implements org.apache.tinkerpop.gremlin.structure.Graph
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.Graph
org.apache.tinkerpop.gremlin.structure.Graph.Exceptions, org.apache.tinkerpop.gremlin.structure.Graph.Features, org.apache.tinkerpop.gremlin.structure.Graph.Hidden, org.apache.tinkerpop.gremlin.structure.Graph.OptIn, org.apache.tinkerpop.gremlin.structure.Graph.OptIns, org.apache.tinkerpop.gremlin.structure.Graph.OptOut, org.apache.tinkerpop.gremlin.structure.Graph.OptOuts, org.apache.tinkerpop.gremlin.structure.Graph.Variables
-
-
Constructor Summary
Constructors Constructor Description HBaseGraph(HBaseGraphConfiguration config)
HBaseGraph(HBaseGraphConfiguration config, org.apache.hadoop.hbase.client.Connection connection)
HBaseGraph(String graphNamespace, String zkHosts)
HBaseGraph(String graphNamespace, String zkHosts, String znodeParent)
HBaseGraph(org.apache.commons.configuration2.Configuration cfg)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.tinkerpop.gremlin.structure.Edge
addEdge(org.apache.tinkerpop.gremlin.structure.Vertex outVertex, org.apache.tinkerpop.gremlin.structure.Vertex inVertex, String label, Object... keyValues)
org.apache.tinkerpop.gremlin.structure.Vertex
addVertex(Object... keyValues)
Iterator<org.apache.tinkerpop.gremlin.structure.Edge>
allEdges()
Iterator<org.apache.tinkerpop.gremlin.structure.Edge>
allEdges(Object fromId, int limit)
Iterator<org.apache.tinkerpop.gremlin.structure.Vertex>
allVertices()
Iterator<org.apache.tinkerpop.gremlin.structure.Vertex>
allVertices(Object fromId, int limit)
void
close()
protected void
close(boolean clear)
org.apache.tinkerpop.gremlin.process.computer.GraphComputer
compute()
<C extends org.apache.tinkerpop.gremlin.process.computer.GraphComputer>
Ccompute(Class<C> graphComputerClass)
HBaseGraphConfiguration
configuration()
org.apache.hadoop.hbase.client.Connection
connection()
void
connectLabels(String outVertexLabel, String edgeLabel, String inVertexLabel)
void
createIndex(ElementType type, String label, String propertyKey)
void
createIndex(ElementType type, String label, String propertyKey, boolean isUnique)
void
createIndex(ElementType type, String label, String propertyKey, boolean isUnique, boolean populate, boolean async)
void
createLabel(ElementType type, String label, ValueType idType, Object... propertyKeysAndTypes)
void
drop()
void
dump()
org.apache.tinkerpop.gremlin.structure.Edge
edge(Object id)
Iterator<org.apache.tinkerpop.gremlin.structure.Edge>
edges(Object... edgeIds)
org.apache.tinkerpop.gremlin.structure.Graph.Features
features()
protected org.apache.tinkerpop.gremlin.structure.Edge
findEdge(Object id, boolean createIfNotFound)
org.apache.tinkerpop.gremlin.structure.Edge
findOrCreateEdge(Object id)
org.apache.tinkerpop.gremlin.structure.Vertex
findOrCreateVertex(Object id)
protected org.apache.tinkerpop.gremlin.structure.Vertex
findVertex(Object id, boolean createIfNotFound)
EdgeIndexModel
getEdgeIndexModel()
EdgeModel
getEdgeModel()
protected ScheduledExecutorService
getExecutor()
IndexMetadata
getIndex(OperationType op, ElementType type, String label, String propertyKey)
IndexMetadataModel
getIndexMetadataModel()
Iterator<IndexMetadata>
getIndices(OperationType op, ElementType type)
Iterator<IndexMetadata>
getIndices(OperationType op, ElementType type, String label, String... propertyKeys)
Iterator<IndexMetadata>
getIndices(OperationType op, ElementType type, String label, Collection<String> propertyKeys)
LabelMetadata
getLabel(ElementType type, String label)
LabelConnectionModel
getLabelConnectionModel()
Iterator<LabelConnection>
getLabelConnections()
LabelMetadataModel
getLabelMetadataModel()
Iterator<LabelMetadata>
getLabels(ElementType type)
int
getLoadingBatchSize()
ValueType
getPropertyType(ElementType type, String label, String propertyKey)
VertexIndexModel
getVertexIndexModel()
VertexModel
getVertexModel()
boolean
hasIndex(OperationType op, ElementType type, String label, String propertyKey)
boolean
isLazyLoading()
static HBaseGraph
open(String graphNamespace, String zkHosts)
static HBaseGraph
open(String graphNamespace, String zkHosts, String znodeParent)
static HBaseGraph
open(org.apache.commons.configuration2.Configuration properties)
protected void
refreshSchema()
void
removeEdge(org.apache.tinkerpop.gremlin.structure.Edge edge)
void
removeVertex(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
String
toString()
org.apache.tinkerpop.gremlin.structure.Transaction
tx()
void
updateIndex(IndexMetadata.Key indexKey, IndexMetadata.State newState)
void
updateLabel(ElementType type, String label, Object... propertyKeysAndTypes)
void
validateEdge(String label, Object id, Map<String,Object> properties, org.apache.tinkerpop.gremlin.structure.Vertex inVertex, org.apache.tinkerpop.gremlin.structure.Vertex outVertex)
ValueType
validateProperty(ElementType type, String label, String propertyKey, Object value)
void
validateVertex(String label, Object id, Map<String,Object> properties)
org.apache.tinkerpop.gremlin.structure.Graph.Variables
variables()
org.apache.tinkerpop.gremlin.structure.Vertex
vertex(Object id)
Iterator<org.apache.tinkerpop.gremlin.structure.Vertex>
vertices(Object... vertexIds)
Iterator<org.apache.tinkerpop.gremlin.structure.Vertex>
verticesByLabel(String label)
Iterator<org.apache.tinkerpop.gremlin.structure.Vertex>
verticesByLabel(String label, String key, Object value)
Iterator<org.apache.tinkerpop.gremlin.structure.Vertex>
verticesInRange(String label, String key, Object inclusiveFromValue, Object exclusiveToValue)
Iterator<org.apache.tinkerpop.gremlin.structure.Vertex>
verticesWithLimit(String label, String key, Object fromValue, int limit)
Iterator<org.apache.tinkerpop.gremlin.structure.Vertex>
verticesWithLimit(String label, String key, Object fromValue, int limit, boolean reversed)
-
-
-
Constructor Detail
-
HBaseGraph
public HBaseGraph(org.apache.commons.configuration2.Configuration cfg)
-
HBaseGraph
public HBaseGraph(HBaseGraphConfiguration config)
-
HBaseGraph
public HBaseGraph(HBaseGraphConfiguration config, org.apache.hadoop.hbase.client.Connection connection)
-
-
Method Detail
-
open
public static HBaseGraph open(org.apache.commons.configuration2.Configuration properties) throws HBaseGraphException
- Throws:
HBaseGraphException
-
open
public static HBaseGraph open(String graphNamespace, String zkHosts) throws HBaseGraphException
- Throws:
HBaseGraphException
-
open
public static HBaseGraph open(String graphNamespace, String zkHosts, String znodeParent) throws HBaseGraphException
- Throws:
HBaseGraphException
-
getExecutor
protected ScheduledExecutorService getExecutor()
-
getEdgeModel
public EdgeModel getEdgeModel()
-
getEdgeIndexModel
public EdgeIndexModel getEdgeIndexModel()
-
getVertexModel
public VertexModel getVertexModel()
-
getVertexIndexModel
public VertexIndexModel getVertexIndexModel()
-
getIndexMetadataModel
public IndexMetadataModel getIndexMetadataModel()
-
getLabelMetadataModel
public LabelMetadataModel getLabelMetadataModel()
-
getLabelConnectionModel
public LabelConnectionModel getLabelConnectionModel()
-
isLazyLoading
public boolean isLazyLoading()
-
getLoadingBatchSize
public int getLoadingBatchSize()
-
addVertex
public org.apache.tinkerpop.gremlin.structure.Vertex addVertex(Object... keyValues)
- Specified by:
addVertex
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph
-
vertices
public Iterator<org.apache.tinkerpop.gremlin.structure.Vertex> vertices(Object... vertexIds)
- Specified by:
vertices
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph
-
vertex
public org.apache.tinkerpop.gremlin.structure.Vertex vertex(Object id)
-
findOrCreateVertex
public org.apache.tinkerpop.gremlin.structure.Vertex findOrCreateVertex(Object id)
-
findVertex
protected org.apache.tinkerpop.gremlin.structure.Vertex findVertex(Object id, boolean createIfNotFound)
-
removeVertex
public void removeVertex(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
-
allVertices
public Iterator<org.apache.tinkerpop.gremlin.structure.Vertex> allVertices()
-
allVertices
public Iterator<org.apache.tinkerpop.gremlin.structure.Vertex> allVertices(Object fromId, int limit)
-
verticesByLabel
public Iterator<org.apache.tinkerpop.gremlin.structure.Vertex> verticesByLabel(String label)
-
verticesByLabel
public Iterator<org.apache.tinkerpop.gremlin.structure.Vertex> verticesByLabel(String label, String key, Object value)
-
verticesInRange
public Iterator<org.apache.tinkerpop.gremlin.structure.Vertex> verticesInRange(String label, String key, Object inclusiveFromValue, Object exclusiveToValue)
-
verticesWithLimit
public Iterator<org.apache.tinkerpop.gremlin.structure.Vertex> verticesWithLimit(String label, String key, Object fromValue, int limit)
-
verticesWithLimit
public Iterator<org.apache.tinkerpop.gremlin.structure.Vertex> verticesWithLimit(String label, String key, Object fromValue, int limit, boolean reversed)
-
addEdge
public org.apache.tinkerpop.gremlin.structure.Edge addEdge(org.apache.tinkerpop.gremlin.structure.Vertex outVertex, org.apache.tinkerpop.gremlin.structure.Vertex inVertex, String label, Object... keyValues)
-
edges
public Iterator<org.apache.tinkerpop.gremlin.structure.Edge> edges(Object... edgeIds)
- Specified by:
edges
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph
-
edge
public org.apache.tinkerpop.gremlin.structure.Edge edge(Object id)
-
findOrCreateEdge
public org.apache.tinkerpop.gremlin.structure.Edge findOrCreateEdge(Object id)
-
findEdge
protected org.apache.tinkerpop.gremlin.structure.Edge findEdge(Object id, boolean createIfNotFound)
-
removeEdge
public void removeEdge(org.apache.tinkerpop.gremlin.structure.Edge edge)
-
allEdges
public Iterator<org.apache.tinkerpop.gremlin.structure.Edge> allEdges()
-
allEdges
public Iterator<org.apache.tinkerpop.gremlin.structure.Edge> allEdges(Object fromId, int limit)
-
compute
public <C extends org.apache.tinkerpop.gremlin.process.computer.GraphComputer> C compute(Class<C> graphComputerClass)
- Specified by:
compute
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph
-
compute
public org.apache.tinkerpop.gremlin.process.computer.GraphComputer compute()
- Specified by:
compute
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph
-
tx
public org.apache.tinkerpop.gremlin.structure.Transaction tx()
- Specified by:
tx
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph
-
variables
public org.apache.tinkerpop.gremlin.structure.Graph.Variables variables()
- Specified by:
variables
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph
-
configuration
public HBaseGraphConfiguration configuration()
- Specified by:
configuration
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph
-
connection
public org.apache.hadoop.hbase.client.Connection connection()
-
features
public org.apache.tinkerpop.gremlin.structure.Graph.Features features()
- Specified by:
features
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph
-
refreshSchema
protected void refreshSchema()
-
createIndex
public void createIndex(ElementType type, String label, String propertyKey)
-
createIndex
public void createIndex(ElementType type, String label, String propertyKey, boolean isUnique)
-
createIndex
public void createIndex(ElementType type, String label, String propertyKey, boolean isUnique, boolean populate, boolean async)
-
hasIndex
public boolean hasIndex(OperationType op, ElementType type, String label, String propertyKey)
-
getIndex
public IndexMetadata getIndex(OperationType op, ElementType type, String label, String propertyKey)
-
getIndices
public Iterator<IndexMetadata> getIndices(OperationType op, ElementType type)
-
getIndices
public Iterator<IndexMetadata> getIndices(OperationType op, ElementType type, String label, String... propertyKeys)
-
getIndices
public Iterator<IndexMetadata> getIndices(OperationType op, ElementType type, String label, Collection<String> propertyKeys)
-
updateIndex
public void updateIndex(IndexMetadata.Key indexKey, IndexMetadata.State newState)
-
createLabel
public void createLabel(ElementType type, String label, ValueType idType, Object... propertyKeysAndTypes)
-
getLabel
public LabelMetadata getLabel(ElementType type, String label)
-
getLabels
public Iterator<LabelMetadata> getLabels(ElementType type)
-
getLabelConnections
public Iterator<LabelConnection> getLabelConnections()
-
updateLabel
public void updateLabel(ElementType type, String label, Object... propertyKeysAndTypes)
-
connectLabels
public void connectLabels(String outVertexLabel, String edgeLabel, String inVertexLabel)
-
validateEdge
public void validateEdge(String label, Object id, Map<String,Object> properties, org.apache.tinkerpop.gremlin.structure.Vertex inVertex, org.apache.tinkerpop.gremlin.structure.Vertex outVertex)
-
validateProperty
public ValueType validateProperty(ElementType type, String label, String propertyKey, Object value)
-
getPropertyType
public ValueType getPropertyType(ElementType type, String label, String propertyKey)
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph
-
close
protected void close(boolean clear)
-
drop
public void drop()
-
dump
public void dump()
-
-