Class GraphDataBufferManagerImpl
- java.lang.Object
-
- com.alibaba.graphscope.loader.impl.GraphDataBufferManagerImpl
-
- All Implemented Interfaces:
GraphDataBufferManager
public class GraphDataBufferManagerImpl extends Object implements GraphDataBufferManager
-
-
Constructor Summary
Constructors Constructor Description GraphDataBufferManagerImpl(int workerId, int threadNum, FFIByteVecVector vidBuffers, FFIByteVecVector vertexDataBuffers, FFIByteVecVector edgeSrcIdBuffers, FFIByteVecVector edgeDstIdBuffers, FFIByteVecVector edgeDataBuffers, FFIIntVecVector vidOffsets, FFIIntVecVector vertexDataOffsets, FFIIntVecVector edgeSrcIdOffsets, FFIIntVecVector edgeDstIdOffsets, FFIIntVecVector edgeDataOffsets)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEdge(int threadId, org.apache.hadoop.io.WritableComparable srcId, org.apache.hadoop.io.WritableComparable dstId, org.apache.hadoop.io.Writable value)
void
addEdges(int threadId, org.apache.hadoop.io.Writable id, Iterable<org.apache.giraph.edge.Edge> edges)
void
addVertex(int threadId, org.apache.hadoop.io.Writable id, org.apache.hadoop.io.Writable value)
void
finishAdding()
void
reserveNumEdges(int length)
void
reserveNumVertices(int length)
resize for std vector
-
-
-
Constructor Detail
-
GraphDataBufferManagerImpl
public GraphDataBufferManagerImpl(int workerId, int threadNum, FFIByteVecVector vidBuffers, FFIByteVecVector vertexDataBuffers, FFIByteVecVector edgeSrcIdBuffers, FFIByteVecVector edgeDstIdBuffers, FFIByteVecVector edgeDataBuffers, FFIIntVecVector vidOffsets, FFIIntVecVector vertexDataOffsets, FFIIntVecVector edgeSrcIdOffsets, FFIIntVecVector edgeDstIdOffsets, FFIIntVecVector edgeDataOffsets)
-
-
Method Detail
-
addVertex
public void addVertex(int threadId, org.apache.hadoop.io.Writable id, org.apache.hadoop.io.Writable value) throws IOException
- Specified by:
addVertex
in interfaceGraphDataBufferManager
- Throws:
IOException
-
addEdges
public void addEdges(int threadId, org.apache.hadoop.io.Writable id, Iterable<org.apache.giraph.edge.Edge> edges) throws IOException
- Specified by:
addEdges
in interfaceGraphDataBufferManager
- Throws:
IOException
-
addEdge
public void addEdge(int threadId, org.apache.hadoop.io.WritableComparable srcId, org.apache.hadoop.io.WritableComparable dstId, org.apache.hadoop.io.Writable value) throws IOException
- Specified by:
addEdge
in interfaceGraphDataBufferManager
- Throws:
IOException
-
reserveNumVertices
public void reserveNumVertices(int length)
resize for std vector- Specified by:
reserveNumVertices
in interfaceGraphDataBufferManager
- Parameters:
length
- number of vertices.
-
reserveNumEdges
public void reserveNumEdges(int length)
- Specified by:
reserveNumEdges
in interfaceGraphDataBufferManager
-
finishAdding
public void finishAdding()
- Specified by:
finishAdding
in interfaceGraphDataBufferManager
-
-