public MapWritable getBucketAsKey(BucketStripped bucketStripped) throws IOException { MapWritable mw = new MapWritable(); MapWritable bucketMap = new MapWritable(); Bucket bucket = getBucket(bucketStripped); bucketMap.put(new IntWritable(bucket.hashCode()), bucket); mw.put(MAPWRITABLE_BUCKET_KEY, bucketMap); return mw; }
public Text getBucketName(BucketStripped bucketStripped) { Bucket bucket = bucketCache.get(bucketStripped.getCacheHash()); return bucket.getBucketName(); }
public Bucket getBucket(BucketStripped bucketStripped) throws IOException { Bucket bucket = new Bucket(bucketCache.get(bucketStripped.getCacheHash())); bucket.setBucketValue(new Text(bucketStripped.getBucketValue())); bucket.computeHash(); return bucket; }