Example #1
0
  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;
  }
Example #2
0
 public Text getBucketName(BucketStripped bucketStripped) {
   Bucket bucket = bucketCache.get(bucketStripped.getCacheHash());
   return bucket.getBucketName();
 }
Example #3
0
 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;
 }