Package org.apache.hadoop.hbase.io

Examples of org.apache.hadoop.hbase.io.BatchOperation


  private void validateValuesLength(BatchUpdate batchUpdate,
      HRegion region) throws IOException {
    HTableDescriptor desc = region.getTableDesc();
    for (Iterator<BatchOperation> iter =
      batchUpdate.iterator(); iter.hasNext();) {
      BatchOperation operation = iter.next();
      if (operation.getValue() != null) {
        HColumnDescriptor fam =
          desc.getFamily(HStoreKey.getFamily(operation.getColumn()));
        if (fam != null) {
          int maxLength = fam.getMaxValueLength();
          if (operation.getValue().length > maxLength) {
            throw new ValueOverMaxLengthException("Value in column "
                + Bytes.toString(operation.getColumn()) + " is too long. "
                + operation.getValue().length + " instead of " + maxLength);
          }
        }
      }
    }
  }
View Full Code Here


      HRegion region) throws IOException {
    HTableDescriptor desc = region.getTableDesc();
    for (Iterator<BatchOperation> iter =
      batchUpdate.iterator(); iter.hasNext();) {
     
      BatchOperation operation = iter.next();
      if (operation.getValue() != null) {
        HColumnDescriptor fam =
          desc.getFamily(HStoreKey.getFamily(operation.getColumn()));
        if (fam != null) {
          int maxLength = fam.getMaxValueLength();
          if (operation.getValue().length > maxLength) {
            throw new IOException("Value in column "
                + Bytes.toString(operation.getColumn()) + " is too long. "
                + operation.getValue().length + " instead of " + maxLength);
          }
        }
      }
    }
  }
View Full Code Here

      HRegion region) throws IOException {
    HTableDescriptor desc = region.getTableDesc();
    for (Iterator<BatchOperation> iter =
      batchUpdate.iterator(); iter.hasNext();) {
     
      BatchOperation operation = iter.next();
      int maxLength =
        desc.getFamily(HStoreKey.getFamily(operation.getColumn())).
          getMaxValueLength();
      if(operation.getValue() != null)
        if(operation.getValue().length > maxLength) {
          throw new IOException("Value in column " +
              Bytes.toString(operation.getColumn()) + " is too long. " +
              operation.getValue().length + " instead of " + maxLength);
        }
    }
  }
View Full Code Here

  private void validateValuesLength(BatchUpdate batchUpdate,
      HRegion region) throws IOException {
    HTableDescriptor desc = region.getTableDesc();
    for (Iterator<BatchOperation> iter =
      batchUpdate.iterator(); iter.hasNext();) {
      BatchOperation operation = iter.next();
      if (operation.getValue() != null) {
        HColumnDescriptor fam =
          desc.getFamily(HStoreKey.getFamily(operation.getColumn()));
        if (fam != null) {
          int maxLength = fam.getMaxValueLength();
          if (operation.getValue().length > maxLength) {
            throw new ValueOverMaxLengthException("Value in column "
                + Bytes.toString(operation.getColumn()) + " is too long. "
                + operation.getValue().length + " instead of " + maxLength);
          }
        }
      }
    }
  }
View Full Code Here

      HRegion region) throws IOException {
    HTableDescriptor desc = region.getTableDesc();
    for (Iterator<BatchOperation> iter =
      batchUpdate.iterator(); iter.hasNext();) {
     
      BatchOperation operation = iter.next();
      if (operation.getValue() != null) {
        HColumnDescriptor fam =
          desc.getFamily(HStoreKey.getFamily(operation.getColumn()));
        if (fam != null) {
          int maxLength = fam.getMaxValueLength();
          if (operation.getValue().length > maxLength) {
            throw new IOException("Value in column "
                + Bytes.toString(operation.getColumn()) + " is too long. "
                + operation.getValue().length + " instead of " + maxLength);
          }
        }
      }
    }
  }
View Full Code Here

      HRegion region) throws IOException {
    HTableDescriptor desc = region.getTableDesc();
    for (Iterator<BatchOperation> iter =
      batchUpdate.iterator(); iter.hasNext();) {
     
      BatchOperation operation = iter.next();
      if (operation.getValue() != null) {
        HColumnDescriptor fam =
          desc.getFamily(HStoreKey.getFamily(operation.getColumn()));
        if (fam != null) {
          int maxLength = fam.getMaxValueLength();
          if (operation.getValue().length > maxLength) {
            throw new ValueOverMaxLengthException("Value in column "
                + Bytes.toString(operation.getColumn()) + " is too long. "
                + operation.getValue().length + " instead of " + maxLength);
          }
        }
      }
    }
  }
View Full Code Here

  private void validateValuesLength(BatchUpdate batchUpdate,
      HRegion region) throws IOException {
    HTableDescriptor desc = region.getTableDesc();
    for (Iterator<BatchOperation> iter =
      batchUpdate.iterator(); iter.hasNext();) {
      BatchOperation operation = iter.next();
      if (operation.getValue() != null) {
        HColumnDescriptor fam =
          desc.getFamily(HStoreKey.getFamily(operation.getColumn()));
        if (fam != null) {
          int maxLength = fam.getMaxValueLength();
          if (operation.getValue().length > maxLength) {
            throw new ValueOverMaxLengthException("Value in column "
                + Bytes.toString(operation.getColumn()) + " is too long. "
                + operation.getValue().length + " instead of " + maxLength);
          }
        }
      }
    }
  }
View Full Code Here

  private void validateValuesLength(BatchUpdate batchUpdate,
      HRegion region) throws IOException {
    HTableDescriptor desc = region.getTableDesc();
    for (Iterator<BatchOperation> iter =
      batchUpdate.iterator(); iter.hasNext();) {
      BatchOperation operation = iter.next();
      if (operation.getValue() != null) {
        HColumnDescriptor fam =
          desc.getFamily(HStoreKey.getFamily(operation.getColumn()));
        if (fam != null) {
          int maxLength = fam.getMaxValueLength();
          if (operation.getValue().length > maxLength) {
            throw new ValueOverMaxLengthException("Value in column "
                + Bytes.toString(operation.getColumn()) + " is too long. "
                + operation.getValue().length + " instead of " + maxLength);
          }
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.io.BatchOperation

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.