testFile.length(), null);
System.out.println("reading GraphSON adjacency file " + testFile.getAbsolutePath() + " (" + testFile.length() + " bytes)");
GraphSONInputFormat inputFormat = ReflectionUtils.newInstance(GraphSONInputFormat.class, conf);
TaskAttemptContext job = new TaskAttemptContext(conf, new TaskAttemptID());
RecordReader reader = inputFormat.createRecordReader(split, job);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
try (DataOutputStream dos = new DataOutputStream(bos)) {
GraphSONOutputFormat outputFormat = new GraphSONOutputFormat();
RecordWriter writer = outputFormat.getRecordWriter(job, dos);
float lastProgress = -1f;
int count = 0;
boolean foundKeyValue = false;
while (reader.nextKeyValue()) {
//System.out.println("" + reader.getProgress() + "> " + reader.getCurrentKey() + ": " + reader.getCurrentValue());
count++;
float progress = reader.getProgress();
assertTrue(progress >= lastProgress);
assertEquals(NullWritable.class, reader.getCurrentKey().getClass());
GiraphComputeVertex v = (GiraphComputeVertex) reader.getCurrentValue();
writer.write(NullWritable.get(), v);
Vertex vertex = v.getBaseVertex();
assertEquals(Integer.class, vertex.id().getClass());