AccumuloConfiguration aconf = AccumuloConfiguration.getDefaultConfiguration();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
FSDataOutputStream dos = new FSDataOutputStream(baos, new FileSystem.Statistics("a"));
CachableBlockFile.Writer _cbw = new CachableBlockFile.Writer(dos, "gz", CachedConfiguration.getInstance(), aconf);
BufferedWriter mliw = new BufferedWriter(new Writer(_cbw, maxBlockSize));
for (int i = 0; i < num; i++)
mliw.add(new Key(String.format("%05d000", i)), i, 0, 0, 0);
mliw.addLast(new Key(String.format("%05d000", num)), num, 0, 0, 0);
ABlockWriter root = _cbw.prepareMetaBlock("root");
mliw.close(root);
root.close();
_cbw.close();
dos.close();
baos.close();