public class OffHeapVerticesInfo<V extends org.apache.hadoop.io.WritableComparable<?>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable> extends Object implements VerticesInfo<V,E,M>
Vertex storage.| Modifier and Type | Field and Description |
|---|---|
static String |
DM_BUFFERS |
static String |
DM_CAPACITY |
static String |
DM_CONCURRENCY |
static String |
DM_DISPOSAL_TIME |
static String |
DM_SERIALIZER |
static String |
DM_SIZE |
static String |
DM_SORTED |
static String |
DM_STRICT_ITERATOR |
| Constructor and Description |
|---|
OffHeapVerticesInfo() |
| Modifier and Type | Method and Description |
|---|---|
void |
addVertex(Vertex<V,E,M> vertex)
Add a vertex to the underlying structure.
|
void |
cleanup(org.apache.hadoop.conf.Configuration conf,
TaskAttemptID attempt)
Cleanup of internal structures.
|
void |
clear() |
void |
finishAdditions()
Finish the additions, from this point on the implementations should close
the adds and throw exceptions in case something is added after this call.
|
void |
finishRemovals()
Finish the removals, from this point on the implementations should close
the removes and throw exceptions in case something is removed after this call.
|
void |
finishSuperstep()
Called once completed a superstep.
|
void |
finishVertexComputation(Vertex<V,E,M> vertex)
Must be called once a vertex is guaranteed not to change any more and can
safely be persisted to a secondary storage.
|
void |
init(GraphJobRunner<V,E,M> runner,
org.apache.hadoop.conf.Configuration conf,
TaskAttemptID attempt)
Initialization of internal structures.
|
void |
removeVertex(V vertexID)
Remove a vertex to the underlying structure.
|
int |
size() |
IDSkippingIterator<V,E,M> |
skippingIterator() |
void |
startSuperstep()
Called once a superstep starts.
|
public static final String DM_STRICT_ITERATOR
public static final String DM_BUFFERS
public static final String DM_SIZE
public static final String DM_CAPACITY
public static final String DM_CONCURRENCY
public static final String DM_DISPOSAL_TIME
public static final String DM_SERIALIZER
public static final String DM_SORTED
public void init(GraphJobRunner<V,E,M> runner, org.apache.hadoop.conf.Configuration conf, TaskAttemptID attempt) throws IOException
VerticesInfoinit in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<?>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>IOExceptionpublic void cleanup(org.apache.hadoop.conf.Configuration conf,
TaskAttemptID attempt)
throws IOException
VerticesInfocleanup in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<?>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>IOExceptionpublic void addVertex(Vertex<V,E,M> vertex)
VerticesInfoaddVertex in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<?>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public void finishAdditions()
VerticesInfofinishAdditions in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<?>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public void startSuperstep()
throws IOException
VerticesInfostartSuperstep in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<?>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>IOExceptionpublic void finishSuperstep()
throws IOException
VerticesInfofinishSuperstep in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<?>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>IOExceptionpublic void finishVertexComputation(Vertex<V,E,M> vertex) throws IOException
VerticesInfofinishVertexComputation in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<?>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>IOExceptionpublic void clear()
public int size()
size in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<?>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public IDSkippingIterator<V,E,M> skippingIterator()
skippingIterator in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<?>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public void removeVertex(V vertexID)
VerticesInforemoveVertex in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<?>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public void finishRemovals()
VerticesInfofinishRemovals in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<?>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>Copyright © 2008-2013 The Apache Software Foundation. All Rights Reserved.