use of org.goldenorb.io.output.checkpoint.CheckPointDataOutput in project goldenorb by jzachr.
the class CheckPointDataTest method testCheckpointOutput.
/**
* Tests the CheckPointDataOutput class by writing several different types of Writables to the checkpoint.
*
* @throws Exception
*/
@Test
public void testCheckpointOutput() throws Exception {
int superStep = 0;
int partition = 0;
OrbConfiguration orbConf = new OrbConfiguration();
orbConf.set("fs.default.name", "hdfs://localhost:" + cluster.getNameNodePort());
orbConf.setJobNumber("0");
orbConf.setFileOutputPath("test");
CheckPointDataOutput checkpointOutput = new CheckPointDataOutput(orbConf, superStep, partition);
IntWritable intOutput = new IntWritable(4);
intOutput.write(checkpointOutput);
LongWritable longOutput = new LongWritable(9223372036854775807L);
longOutput.write(checkpointOutput);
Text textOutput = new Text("test");
textOutput.write(checkpointOutput);
FloatWritable floatOutput = new FloatWritable(3.14159F);
floatOutput.write(checkpointOutput);
checkpointOutput.close();
assertThat(checkpointOutput, notNullValue());
}
Aggregations