assertFalse(map.containsKey(new UTF8("" + 1)));
}
public void testWritable() throws Exception {
MapWritable datum1 = new MapWritable();
for (int i = 0; i < 100; i++) {
datum1.put(new LongWritable(i), new UTF8("" + 1));
}
assertEquals(100, datum1.size());
testWritable(datum1);
MapWritable datum2 = new MapWritable();
for (int i = 0; i < 100; i++) {
datum2.put(new DummyWritable(i), new DummyWritable(i));
}
assertEquals(100, datum2.size());
testWritable(datum2);
CrawlDatum c = new CrawlDatum(CrawlDatum.STATUS_DB_FETCHED, 1f);
c.setMetaData(new MapWritable());
for (int i = 0; i < 100; i++) {
c.getMetaData().put(new LongWritable(i), new UTF8("" + 1));
}
testWritable(c);
}