@Override
protected void setUp() throws Exception {
super.setUp();
MapFileWriter w = FSOrderedMapFile.mapFileWrite(file);
FixedSizeWriteableFactory<Text> keyFactory = new FixedSizeTextFactory(20);
int offset = 0;
for(String key : testKeys)
{
Text wkey = keyFactory.newInstance();
IntWritable wvalue = new IntWritable();
wkey.set(key);
wvalue.set(offset);
w.write(wkey, wvalue);
key2id.put(key, offset);
offset++;
}
w.close();
}