Configuration conf = new Configuration();
MiniDFSCluster cluster = new MiniDFSCluster(conf, 2, true, null);
FileSystem fs = cluster.getFileSystem();
ByteArrayOutputStream out = new ByteArrayOutputStream();
TypedBytesOutput tboutput = new TypedBytesOutput(new DataOutputStream(out));
for (int i = 0; i < 100; i++) {
tboutput.write(new Long(i)); // key
tboutput.write("" + (10 * i)); // value
}
InputStream isBackup = System.in;
ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
System.setIn(in);
LoadTypedBytes loadtb = new LoadTypedBytes(conf);