Package org.jboss.netty.buffer

Examples of org.jboss.netty.buffer.ChannelBuffer.writeLong()


            int b = (int) (Long.parseLong(key2.replaceAll("[^0-9]", "")) / key2.replaceAll("[^ ]", "").length());
            long c = req.getContent().readLong();
            ChannelBuffer input = ChannelBuffers.buffer(16);
            input.writeInt(a);
            input.writeInt(b);
            input.writeLong(c);
            try {
                ChannelBuffer output = ChannelBuffers.wrappedBuffer(MessageDigest.getInstance("MD5").digest(input.array()));
                res.setContent(output);
            } catch (NoSuchAlgorithmException ex) {
                throw new UnexpectedException(ex);
View Full Code Here


                int b = (int) (Long.parseLong(key2.replaceAll("[^0-9]", "")) / key2.replaceAll("[^ ]", "").length());
                long c = req.getContent().readLong();
                ChannelBuffer input = ChannelBuffers.buffer(16);
                input.writeInt(a);
                input.writeInt(b);
                input.writeLong(c);
                ChannelBuffer output = ChannelBuffers.wrappedBuffer(
                        MessageDigest.getInstance("MD5").digest(input.array()));
                res.setContent(output);
            } else {
                // Old handshake method with no challenge:
View Full Code Here

    // 2nd param: Get object
    buf.writeByte(32);   // Code for a `Get' parameter.
    buf.writeByte(32);   // Code again (see HBASE-2877).
    buf.writeByte(1);    // Get#GET_VERSION.  Undocumented versioning of Get.
    writeByteArray(buf, key);
    buf.writeLong(lockid)// Lock ID.
    buf.writeInt(maxVersions()); // Max number of versions to return.
    buf.writeByte(0x00); // boolean (false): whether or not to use a filter.
    // If the previous boolean was true:
    //   writeByteArray(buf, filter name as byte array);
    //   write the filter itself
View Full Code Here

    if (server_version >= 26) {  // New in 0.90 (because of HBASE-3174).
      buf.writeByte(0x01)// boolean (true): whether to cache the blocks.
    }

    // TimeRange
    buf.writeLong(0);               // Minimum timestamp.
    buf.writeLong(Long.MAX_VALUE)// Maximum timestamp.
    buf.writeByte(0x01);            // Boolean: "all time".
    // The "all time" boolean indicates whether or not this time range covers
    // all possible times.  Not sure why it's part of the serialized RPC...
View Full Code Here

      buf.writeByte(0x01)// boolean (true): whether to cache the blocks.
    }

    // TimeRange
    buf.writeLong(0);               // Minimum timestamp.
    buf.writeLong(Long.MAX_VALUE)// Maximum timestamp.
    buf.writeByte(0x01);            // Boolean: "all time".
    // The "all time" boolean indicates whether or not this time range covers
    // all possible times.  Not sure why it's part of the serialized RPC...

    // Families.
View Full Code Here

        buf.writeByte(0x01); // boolean (true): use a filter.
        filter.serializeOld(buf);
      }

      // TimeRange
      buf.writeLong(min_timestamp)// Minimum timestamp.
      buf.writeLong(max_timestamp)// Maximum timestamp.
      // Boolean: "all time".
      buf.writeByte(min_timestamp != 0 || max_timestamp != Long.MAX_VALUE
                    ? 0x00 : 0x01);
View Full Code Here

        filter.serializeOld(buf);
      }

      // TimeRange
      buf.writeLong(min_timestamp)// Minimum timestamp.
      buf.writeLong(max_timestamp)// Maximum timestamp.
      // Boolean: "all time".
      buf.writeByte(min_timestamp != 0 || max_timestamp != Long.MAX_VALUE
                    ? 0x00 : 0x01);

      // Families.
View Full Code Here

    // 2nd param: Delete object.
    buf.writeByte(CODE); // Code for a `Delete' parameter.
    buf.writeByte(CODE); // Code again (see HBASE-2877).
    buf.writeByte(1);    // Delete#DELETE_VERSION.  Stick to v1 here for now.
    writeByteArray(buf, key);
    buf.writeLong(timestamp)// Maximum timestamp.
    buf.writeLong(lockid)// Lock ID.

    // Families.
    if (family == WHOLE_ROW) {
      buf.writeInt(0)// Number of families that follow.
View Full Code Here

    buf.writeByte(CODE); // Code for a `Delete' parameter.
    buf.writeByte(CODE); // Code again (see HBASE-2877).
    buf.writeByte(1);    // Delete#DELETE_VERSION.  Stick to v1 here for now.
    writeByteArray(buf, key);
    buf.writeLong(timestamp)// Maximum timestamp.
    buf.writeLong(lockid)// Lock ID.

    // Families.
    if (family == WHOLE_ROW) {
      buf.writeInt(0)// Number of families that follow.
      return buf;
View Full Code Here

        // This timestamp is unused, only the KeyValue-level timestamp is
        // used, except in one case: whole-row deletes.  In that case only,
        // this timestamp is used by the RegionServer to create per-family
        // deletes for that row.  See HRegion.prepareDelete() for more info.
        buf.writeLong(rpc.timestamp)// Timestamp.

        buf.writeLong(RowLock.NO_LOCK);    // Lock ID.
        buf.writeByte(rpc.durable ? 0x01 : 0x00)// Use the WAL?
        nfamilies_index = buf.writerIndex();
        // Number of families that follow.
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.