I
- vertexId type parameterT
- vertexData type parameterpublic abstract class AbstractVertexIdData<I extends org.apache.hadoop.io.WritableComparable,T> extends Object implements VertexIdData<I,T>
Modifier and Type | Field and Description |
---|---|
protected ExtendedDataOutput |
extendedDataOutput
Extended data output
|
Constructor and Description |
---|
AbstractVertexIdData() |
Modifier and Type | Method and Description |
---|---|
void |
add(byte[] serializedId,
int idPos,
T data)
Add a serialized vertex id and data.
|
void |
add(I vertexId,
T data)
Add a vertex id and data pair to the collection.
|
void |
clear()
Clear the list.
|
ImmutableClassesGiraphConfiguration<I,?,?> |
getConf()
Return the configuration used by this object.
|
int |
getSerializedSize()
Get the size of this object in serialized form.
|
int |
getSize()
Get the number of bytes used.
|
ByteStructVertexIdDataIterator<I,T> |
getVertexIdDataIterator()
Get an iterator over the pairs.
|
void |
initialize()
Initialize the inner state.
|
void |
initialize(int expectedSize)
Initialize the inner state, with a known size.
|
boolean |
isEmpty()
Check if the list is empty.
|
void |
readFields(DataInput dataInput) |
void |
setConf(ImmutableClassesGiraphConfiguration configuration)
Set the configuration to be used by this object.
|
void |
write(DataOutput output) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createData, readData, writeData
protected ExtendedDataOutput extendedDataOutput
public void initialize()
VertexIdData
add()
is
called.initialize
in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,T>
public void initialize(int expectedSize)
VertexIdData
add()
is called.initialize
in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,T>
expectedSize
- Number of bytes to be expectedpublic void add(I vertexId, T data)
VertexIdData
add
in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,T>
vertexId
- Vertex iddata
- Datapublic void add(byte[] serializedId, int idPos, T data)
VertexIdData
add
in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,T>
serializedId
- The bye array which holds the serialized id.idPos
- The end position of the serialized id in the byte array.data
- Datapublic int getSize()
VertexIdData
getSize
in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,T>
public int getSerializedSize()
VertexIdData
getSerializedSize
in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,T>
public boolean isEmpty()
VertexIdData
isEmpty
in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,T>
public void clear()
VertexIdData
clear
in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,T>
public void setConf(ImmutableClassesGiraphConfiguration configuration)
GiraphConfigurationSettable
setConf
in interface GiraphConfigurationSettable
configuration
- Set configurationpublic ImmutableClassesGiraphConfiguration<I,?,?> getConf()
ImmutableClassesGiraphConfigurable
getConf
in interface ImmutableClassesGiraphConfigurable
public ByteStructVertexIdDataIterator<I,T> getVertexIdDataIterator()
VertexIdData
getVertexIdDataIterator
in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,T>
public void write(DataOutput output) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput dataInput) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.