public boolean addAllocation(long offset) throws BucketAllocatorException {
      offset -= baseOffset;
      if (offset < 0 || offset % itemAllocationSize != 0)
        throw new BucketAllocatorException("Attempt to add allocation for bad offset: " + offset
          + " base=" + baseOffset + ", bucket size=" + itemAllocationSize);
      int idx = (int) (offset / itemAllocationSize);
      boolean matchFound = false;
      for (int i = 0; i < freeCount; ++i) {
        if (matchFound) freeList[i - 1] = freeList[i];
        else if (freeList[i] == idx) matchFound = true;
      }
      if (!matchFound) {
        LOG.warn("We found more entries for bucket starting at offset {} for blocks of {} size. "
          + "Skipping entry at cache offset {}", baseOffset, itemAllocationSize, offset);
        return false;
      }
      ++usedCount;
      --freeCount;
      return true;
    }
Allocate a block in this bucket, return the offset representing the position in physical
space
@return the offset in the IOEngine
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java