@Override
    public String toString() {
      StringBuilder buffer = new StringBuilder();
      buffer.append("block{offset: ");
      buffer.append(offset);
      buffer.append(", length: ");
      buffer.append(length);
      buffer.append(", hosts: [");
      for(int i=0; i < hosts.length; i++) {
        if (i != 0) {
          buffer.append(", ");
        }
        buffer.append(hosts[i]);
      }
      buffer.append("]}");
      return buffer.toString();
    }
Compute the number of bytes that overlap between the two ranges.
@param offset1 start of range1
@param length1 length of range1
@param offset2 start of range2
@param length2 length of range2
@return the number of bytes in the overlap range
common/src/test/org/apache/hive/common/util/MockFileSystem.java