ChukwaArchiveKey.class, ChunkImpl.class,
SequenceFile.CompressionType.NONE, null);
RandSeqFileWriter rw = new RandSeqFileWriter();
for (int i = 0; i < chunks; ++i) {
ChunkImpl chunk = rw.getARandomChunk();
ChukwaArchiveKey archiveKey = new ChukwaArchiveKey();
calendar.set(Calendar.YEAR, 2008);
calendar.set(Calendar.MONTH, Calendar.MAY);
calendar.set(Calendar.DAY_OF_MONTH, 29);
calendar.set(Calendar.HOUR, 10);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
archiveKey.setTimePartition(calendar.getTimeInMillis());
archiveKey.setDataType(chunk.getDataType());
archiveKey.setStreamName(chunk.getStreamName());
archiveKey.setSeqId(chunk.getSeqID());
seqFileWriter.append(archiveKey, chunk);
}
seqFileWriter.close();
out.close();
}