Examples of DeserializationException


Examples of org.apache.hadoop.hbase.exceptions.DeserializationException

   * @throws DeserializationException
   */
  public static RegionStoreSequenceIds parseRegionStoreSequenceIds(final byte[] bytes)
      throws DeserializationException {
    if (bytes == null || !ProtobufUtil.isPBMagicPrefix(bytes)) {
      throw new DeserializationException("Unable to parse RegionStoreSequenceIds.");
    }
    RegionStoreSequenceIds.Builder regionSequenceIdsBuilder =
        ZooKeeperProtos.RegionStoreSequenceIds.newBuilder();
    int pblen = ProtobufUtil.lengthOfPBMagic();
    RegionStoreSequenceIds storeIds = null;
    try {
      storeIds = regionSequenceIdsBuilder.mergeFrom(bytes, pblen, bytes.length - pblen).build();
    } catch (InvalidProtocolBufferException e) {
      throw new DeserializationException(e);
    }
    return storeIds;
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.exceptions.DeserializationException

  throws DeserializationException {
    FilterProtos.FirstKeyValueMatchingQualifiersFilter proto;
    try {
      proto = FilterProtos.FirstKeyValueMatchingQualifiersFilter.parseFrom(pbBytes);
    } catch (InvalidProtocolBufferException e) {
      throw new DeserializationException(e);
    }

    TreeSet<byte []> qualifiers = new TreeSet<byte []>(Bytes.BYTES_COMPARATOR);
    for (ByteString qualifier : proto.getQualifiersList()) {
      qualifiers.add(qualifier.toByteArray());
View Full Code Here

Examples of org.apache.hadoop.hbase.exceptions.DeserializationException

  throws DeserializationException {
    FilterProtos.ColumnPrefixFilter proto;
    try {
      proto = FilterProtos.ColumnPrefixFilter.parseFrom(pbBytes);
    } catch (InvalidProtocolBufferException e) {
      throw new DeserializationException(e);
    }
    return new ColumnPrefixFilter(proto.getPrefix().toByteArray());
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.exceptions.DeserializationException

  throws DeserializationException {
    FilterProtos.ColumnPaginationFilter proto;
    try {
      proto = FilterProtos.ColumnPaginationFilter.parseFrom(pbBytes);
    } catch (InvalidProtocolBufferException e) {
      throw new DeserializationException(e);
    }
    if (proto.hasColumnOffset()) {
      return new ColumnPaginationFilter(proto.getLimit(),
                                        proto.getColumnOffset().toByteArray());
    }
View Full Code Here

Examples of org.globus.wsrf.encoding.DeserializationException

        final Cloudcluster_Type cluster;
        try {
            cluster = parseClusterDocument(clusterPath);
            if (cluster == null) {
                throw new DeserializationException("No parsing result?");
            }
        } catch (DeserializationException e) {
            final String msg = "Could not parse the contents of the cluster " +
                    "definition file you provided.\n - Path: '" +
                    clusterPath + "'\n - Is it legal XML?  Try " +
View Full Code Here

Examples of org.terasology.persistence.typeHandling.DeserializationException

    @Override
    public ByteBuffer getAsByteBuffer() {
        if (data.hasBytes()) {
            return data.getBytes().asReadOnlyByteBuffer();
        } else if (!isNull()) {
            throw new DeserializationException("Data is not bytes");
        } else {
            return ByteBuffer.wrap(new byte[0]);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.