Package org.apache.hadoop.zebra.tfile

Examples of org.apache.hadoop.zebra.tfile.ByteArray


  /**
   * Get the block distribution of all data that maps to the key bucket.
   */
  public BlockDistribution getBlockDistribution(BytesWritable key) {
    ByteArray key0 = new ByteArray(key.get(), 0, key.getSize());
    BlockDistribution bInfo = data.get(key0);
    if (bInfo == null) {
      throw new IllegalArgumentException("Invalid key");
    }
    return bInfo;
View Full Code Here


      if (!isSorted()) {
        throw new IOException(
            "Cannot get key-bounded scanner for unsorted table");
      }
      RawComparable begin =
          (beginKey != null) ? new ByteArray(beginKey.get(), 0, beginKey
              .getSize()) : null;
      RawComparable end =
          (endKey != null) ? new ByteArray(endKey.get(), 0, endKey.getSize())
              : null;
      if (begin != null && end != null) {
        if (comparator.compare(begin, end) >= 0) {
          throw new IOException("Zero-key-range split");
        }
View Full Code Here

        if (atEnd())
        {
          return false;
        }
        int index =
            cgindex.lowerBound(new ByteArray(key.get(), 0, key.getSize()),
                comparator);
        if (index >= endIndex) {
          seekToEnd();
          return false;
        }
View Full Code Here

        byte[] firstKeyBuffer = new byte[firstKeyLen];
        in.readFully(firstKeyBuffer);
        int lastKeyLen = Utils.readVInt(in);
        byte[] lastKeyBuffer = new byte[lastKeyLen];
        in.readFully(lastKeyBuffer);
        firstKey = new ByteArray(firstKeyBuffer);
        lastKey = new ByteArray(lastKeyBuffer);
      }
    }
View Full Code Here

        if (atEnd())
        {
          return false;
        }
        int index =
            cgindex.lowerBound(new ByteArray(key.getBytes(), 0, key.getLength()),
                comparator);
        if (index >= endIndex) {
          seekToEnd();
          return false;
        }
View Full Code Here

        byte[] firstKeyBuffer = new byte[firstKeyLen];
        in.readFully(firstKeyBuffer);
        int lastKeyLen = Utils.readVInt(in);
        byte[] lastKeyBuffer = new byte[lastKeyLen];
        in.readFully(lastKeyBuffer);
        firstKey = new ByteArray(firstKeyBuffer);
        lastKey = new ByteArray(lastKeyBuffer);
      }
    }
View Full Code Here

      if (!isSorted()) {
        throw new IOException(
            "Cannot get key-bounded scanner for unsorted table");
      }
      RawComparable begin =
          (beginKey != null) ? new ByteArray(beginKey.getBytes(), 0, beginKey
              .getLength()) : null;
      RawComparable end =
          (endKey != null) ? new ByteArray(endKey.getBytes(), 0, endKey.getLength())
              : null;
      if (begin != null && end != null) {
        if (comparator.compare(begin, end) >= 0) {
          throw new IOException("Zero-key-range split");
        }
View Full Code Here

        if (atEnd())
        {
          return false;
        }
        int index =
            cgindex.lowerBound(new ByteArray(key.getBytes(), 0, key.getLength()),
                comparator);
        if (index >= endIndex) {
          seekToEnd();
          return false;
        }
View Full Code Here

      if (!isSorted()) {
        throw new IOException(
            "Cannot get key-bounded scanner for unsorted table");
      }
      RawComparable begin =
          (beginKey != null) ? new ByteArray(beginKey.getBytes(), 0, beginKey
              .getLength()) : null;
      RawComparable end =
          (endKey != null) ? new ByteArray(endKey.getBytes(), 0, endKey.getLength())
              : null;
      if (begin != null && end != null) {
        if (comparator.compare(begin, end) >= 0) {
          throw new IOException("Zero-key-range split");
        }
View Full Code Here

        byte[] firstKeyBuffer = new byte[firstKeyLen];
        in.readFully(firstKeyBuffer);
        int lastKeyLen = Utils.readVInt(in);
        byte[] lastKeyBuffer = new byte[lastKeyLen];
        in.readFully(lastKeyBuffer);
        firstKey = new ByteArray(firstKeyBuffer);
        lastKey = new ByteArray(lastKeyBuffer);
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.zebra.tfile.ByteArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.