} finally {
writer.close();
}
// try splitting the file in a variety of sizes
InputFormat format = new SequenceFileInputFormat();
RecInt key = new RecInt();
RecBuffer value = new RecBuffer();
for (int i = 0; i < 3; i++) {
int numSplits =
random.nextInt(MAX_LENGTH/(SequenceFile.SYNC_INTERVAL/20))+1;
//LOG.info("splitting: requesting = " + numSplits);
FileSplit[] splits = format.getSplits(fs, job, numSplits);
//LOG.info("splitting: got = " + splits.length);
// check each split
BitSet bits = new BitSet(length);
for (int j = 0; j < splits.length; j++) {
RecordReader reader =
format.getRecordReader(fs, splits[j], job, reporter);
try {
int count = 0;
while (reader.next(key, value)) {
// if (bits.get(key.get())) {
// LOG.info("splits["+j+"]="+splits[j]+" : " + key.get());