I
- Vertex ID classV
- Vertex Value classE
- Edge classpublic class GiraphTypes<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends Object
Constructor and Description |
---|
GiraphTypes()
Empty Constructor
|
GiraphTypes(Class<I> vertexIdClass,
Class<V> vertexValueClass,
Class<E> edgeValueClass,
Class<? extends org.apache.hadoop.io.Writable> incomingMessageValueClass,
Class<? extends org.apache.hadoop.io.Writable> outgoingMessageValueClass)
Constructor taking values
|
Modifier and Type | Method and Description |
---|---|
Class<E> |
getEdgeValueClass() |
Class<? extends Vertex> |
getVertexClass() |
Class<I> |
getVertexIdClass() |
Class<V> |
getVertexValueClass() |
boolean |
hasData()
Check if types are set
|
void |
inferFrom(Class<? extends TypesHolder> klass)
Infer types from Computation class
|
static <IX extends org.apache.hadoop.io.WritableComparable,VX extends org.apache.hadoop.io.Writable,EX extends org.apache.hadoop.io.Writable> |
readFrom(org.apache.hadoop.conf.Configuration conf)
Read types from a
Configuration . |
void |
setEdgeValueClass(Class<E> edgeValueClass) |
void |
setOutgoingMessageValueClass(Class<? extends org.apache.hadoop.io.Writable> outgoingMessageValueClass) |
void |
setVertexIdClass(Class<I> vertexIdClass) |
void |
setVertexValueClass(Class<V> vertexValueClass) |
void |
writeIfUnset(org.apache.hadoop.conf.Configuration conf)
Write types to Configuration if not already set
|
void |
writeTo(org.apache.hadoop.conf.Configuration conf)
Write types to Configuration
|
public GiraphTypes()
public GiraphTypes(Class<I> vertexIdClass, Class<V> vertexValueClass, Class<E> edgeValueClass, Class<? extends org.apache.hadoop.io.Writable> incomingMessageValueClass, Class<? extends org.apache.hadoop.io.Writable> outgoingMessageValueClass)
vertexIdClass
- vertex id classvertexValueClass
- vertex value classedgeValueClass
- edge value classincomingMessageValueClass
- incoming message classoutgoingMessageValueClass
- outgoing message classpublic static <IX extends org.apache.hadoop.io.WritableComparable,VX extends org.apache.hadoop.io.Writable,EX extends org.apache.hadoop.io.Writable> GiraphTypes<IX,VX,EX> readFrom(org.apache.hadoop.conf.Configuration conf)
Configuration
.
First tries to read them directly from the configuration options.
If that doesn't work, tries to infer from TypesHolder
.IX
- vertex idVX
- vertex valueEX
- edge valueconf
- Configurationpublic void inferFrom(Class<? extends TypesHolder> klass)
klass
- Computation classpublic boolean hasData()
public void writeTo(org.apache.hadoop.conf.Configuration conf)
conf
- Configurationpublic void writeIfUnset(org.apache.hadoop.conf.Configuration conf)
conf
- Configurationpublic void setOutgoingMessageValueClass(Class<? extends org.apache.hadoop.io.Writable> outgoingMessageValueClass)
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.