Package org.apache.cassandra.io

Examples of org.apache.cassandra.io.DataInputBuffer


    public FileStruct(IFileReader reader, IPartitioner partitioner)
    {
        this.reader = reader;
        this.partitioner = partitioner;
        bufIn = new DataInputBuffer();
        bufOut = new DataOutputBuffer();
    }
View Full Code Here


    {
      byte[] body = (byte[])message.getMessageBody()[0];
       
        try
        {
            DataInputBuffer bufIn = new DataInputBuffer();
            bufIn.reset(body, body.length);
            /* Deserialize to get the token for this endpoint. */
            TokenUpdater.TokenInfoMessage tiMessage = TokenUpdater.TokenInfoMessage.serializer().deserialize(bufIn);
           
            BigInteger token = tiMessage.getToken();
            logger_.info("Updating the token to [" + token + "]");
View Full Code Here

    {
        byte[] body = (byte[])message.getMessageBody()[0];
       
        try
        {
            DataInputBuffer bufIn = new DataInputBuffer();
            bufIn.reset(body, body.length);
            /* Deserialize to get the token for this endpoint. */
            MembershipCleaner.MembershipCleanerMessage mcMessage = MembershipCleaner.MembershipCleanerMessage.serializer().deserialize(bufIn);
           
            String target = mcMessage.getTarget();
            logger_.info("Removing the node [" + target + "] from membership");
View Full Code Here

    {
        f.add("a");
        DataOutputBuffer out = new DataOutputBuffer();
        f.getSerializer().serialize(f, out);

        DataInputBuffer in = new DataInputBuffer();
        in.reset(out.getData(), out.getLength());
        Filter f2 = f.getSerializer().deserialize(in);

        assert f2.isPresent("a");
        assert !f2.isPresent("b");
        return f2;
View Full Code Here

            }
            catch (TimeoutException e)
            {
                throw new TimedOutException();
            }
            DataInputBuffer bufIn = new DataInputBuffer();
            bufIn.reset(body, body.length);
            ReadResponse response = ReadResponse.serializer().deserialize(bufIn);
            if (response.row() != null)
                rows.add(response.row());
        }
        return rows;
View Full Code Here

       
        //test the serialization and equals
        DataOutputBuffer output = new DataOutputBuffer();
        GossipDigest.serializer().serialize(expected, output);
       
        DataInputBuffer input = new DataInputBuffer();
        input.reset(output.getData(), output.getLength());
        GossipDigest actual = GossipDigest.serializer().deserialize(input);
        assertEquals(0, expected.compareTo(actual));
    }
View Full Code Here

     * Populate the list of rows from each of the messages
     * Check to see if there is a digest query. If a digest
         * query exists then we need to compare the digest with
         * the digest of the data that is received.
        */
        DataInputBuffer bufIn = new DataInputBuffer();
    for (Message response : responses)
    {                     
            byte[] body = response.getMessageBody();
            bufIn.reset(body, body.length);
            ReadResponse result = ReadResponse.serializer().deserialize(bufIn);
            if (result.isDigestQuery())
            {
                digest = result.digest();
                isDigestQuery = true;
View Full Code Here

        boolean isDataPresent = false;
        for (Message response : responses)
        {
            byte[] body = response.getMessageBody();
            DataInputBuffer bufIn = new DataInputBuffer();
            bufIn.reset(body, body.length);
            try
            {
                ReadResponse result = ReadResponse.serializer().deserialize(bufIn);
                if (!result.isDigestQuery())
                {
                    isDataPresent = true;
                }
                bufIn.close();
            }
            catch (IOException ex)
            {
                logger_.info(LogUtil.throwableToString(ex));
            }
View Full Code Here

    }

    public static RangeSliceCommand read(Message message) throws IOException
    {
        byte[] bytes = message.getMessageBody();
        DataInputBuffer dib = new DataInputBuffer();
        dib.reset(bytes, bytes.length);
        return serializer.deserialize(new DataInputStream(dib));
    }
View Full Code Here

         * Trigger a readonly compaction which will broadcast the tree upon completion.
         */
        public void doVerb(Message message)
        {
            byte[] bytes = message.getMessageBody();
            DataInputBuffer buffer = new DataInputBuffer();
            buffer.reset(bytes, bytes.length);

            try
            {
                CFPair request = this.deserialize(buffer);

View Full Code Here

TOP

Related Classes of org.apache.cassandra.io.DataInputBuffer

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.