Giraph use your own version of VertexInputFormat
Assume you want to use JsonDoubleDoubleFloatDoubleVertexInputFormat and the .java file is saved in /myhome/giraph-work
###copy the .java file into the corrent directory (In our docker, the java files for the formats are saved in /usr/local/giraph/giraph-core/src/main/java/org/apache/giraph/io/formats)
cp /myhome/giraph-work/JsonDoubleDoubleFloatDoubleVertexInputFormat.java /usr/local/giraph/giraph-core/src/main/java/org/apache/giraph/io/formats
- cd /usr/local/giraph/giraph-core/src/main/java/org/apache/giraph/io/formats
- javac -cp /usr/local/giraph/giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-2.4.1-jar-with-dependencies.jar:$($HADOOP_HOME/bin/hadoop classpath) JsonDoubleDoubleFloatDoubleVertexInputFormat.java
In this example, you can see JsonDoubleDoubleFloatDoubleVertexInputFormat.class and JsonDoubleDoubleFloatDoubleVertexInputFormat$JsonDoubleDoubleFloatDoubleVertexReader.class since there are two classes in the java file.
In order to put the two .class files to the same directory (org/apache/giraph/io/formats/) as the other .class files, cd into the parent directory of "org" (/usr/local/giraph/giraph-core/src/main/java/).
cd /usr/local/giraph/giraph-core/src/main/java/
jar uf /usr/local/giraph/giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-2.4.1-jar-with-dependencies.jar org/apache/giraph/io/formats/JsonDoubleDoubleFloatDoubleVertexInputFormat.class org/apache/giraph/io/formats/JsonDoubleDoubleFloatDoubleVertexInputFormat$JsonDoubleDoubleFloatDoubleVertexReader.class
cp /usr/local/giraph/giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-2.4.1-jar-with-dependencies.jar /myhome/giraph-work/