Package org.apache.cassandra.io

Examples of org.apache.cassandra.io.DataInputBuffer.reset()


    public void doVerb(Message message)
    {
        byte[] bytes = message.getMessageBody();
        DataInputBuffer buffer = new DataInputBuffer();
        buffer.reset(bytes, bytes.length);

        try
        {
            RowMutation rm = RowMutation.serializer().deserialize(buffer);
            if (logger_.isDebugEnabled())
View Full Code Here


                catch (EOFException e)
                {
                    // last CL entry didn't get completely written.  that's ok.
                    break;
                }
                bufIn.reset(bytes, bytes.length);

                /* read the commit log entry */
                final RowMutation rm = RowMutation.serializer().deserialize(bufIn);
                if (logger_.isDebugEnabled())
                    logger_.debug(String.format("replaying mutation for %s.%s: %s",
View Full Code Here

        /* Cannot bootstrap another node if I'm in bootstrap mode myself! */
        assert !StorageService.instance().isBootstrapMode();
       
        byte[] body = message.getMessageBody();
        DataInputBuffer bufIn = new DataInputBuffer();
        bufIn.reset(body, body.length);
        try
        {
            BootstrapMetadataMessage bsMetadataMessage = BootstrapMetadataMessage.serializer().deserialize(bufIn);
            BootstrapMetadata[] bsMetadata = bsMetadataMessage.bsMetadata_;

View Full Code Here

   
    public void doVerb(Message message)
    {         
        byte[] body = message.getMessageBody();
        DataInputBuffer buffer = new DataInputBuffer();
        buffer.reset(body, body.length);       
       
        try
        {
            RowMutationMessage rmMsg = RowMutationMessage.serializer().deserialize(buffer);
            RowMutation rm = rmMsg.getRowMutation();
View Full Code Here

    {
        try
        {
          byte[] body = message.getMessageBody();
            DataInputBuffer buffer = new DataInputBuffer();
            buffer.reset(body, body.length);
          RowMutationMessage rmMsg = RowMutationMessage.serializer().deserialize(buffer);

            EndPoint[] endpoints = StorageService.instance().getNStorageEndPoint(rmMsg.getRowMutation().key());

      Message messageInternal = new Message(StorageService.getLocalStorageEndPoint(),
View Full Code Here

        */
        DataInputBuffer bufIn = new DataInputBuffer();
    for (Message response : responses)
    {                     
            byte[] body = response.getMessageBody();
            bufIn.reset(body, body.length);
            try
            {
                long start = System.currentTimeMillis();
                ReadResponse result = ReadResponse.serializer().deserialize(bufIn);
                if (logger_.isDebugEnabled())
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())
          {
View Full Code Here

        */
        public void doVerb(Message message)
        {
            byte[] body = message.getMessageBody();
            DataInputBuffer bufIn = new DataInputBuffer();
            bufIn.reset(body, body.length);
           
            try
            {
                BootstrapInitiateMessage biMsg = BootstrapInitiateMessage.serializer().deserialize(bufIn);
                StreamContextManager.StreamContext[] streamContexts = biMsg.getStreamContext();               
View Full Code Here

    }
       
    public static BitSet and(byte[] bytes1, byte[] bytes2) throws IOException
    {
        DataInputBuffer bufIn = new DataInputBuffer();
        bufIn.reset(bytes1, 0, bytes1.length);
        CommitLogHeader header1 = serializer.deserialize(bufIn);
        bufIn.reset(bytes2, 0, bytes2.length);
        CommitLogHeader header2 = serializer.deserialize(bufIn);
        header1.and(header2);
        return header1.dirty;
View Full Code Here

    public static BitSet and(byte[] bytes1, byte[] bytes2) throws IOException
    {
        DataInputBuffer bufIn = new DataInputBuffer();
        bufIn.reset(bytes1, 0, bytes1.length);
        CommitLogHeader header1 = serializer.deserialize(bufIn);
        bufIn.reset(bytes2, 0, bytes2.length);
        CommitLogHeader header2 = serializer.deserialize(bufIn);
        header1.and(header2);
        return header1.dirty;
    }
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.