Package org.apache.cassandra.io

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


      DataInputBuffer bufIn = new DataInputBuffer();
      logger_.debug("Handle Digest reponses");
      for( Message response : responses_ )
      {
        byte[] body = (byte[])response.getMessageBody()[0];           
              bufIn.reset(body, body.length);
              try
              {                
                  ReadResponse result = ReadResponse.serializer().deserialize(bufIn);
                  byte[] digest = result.digest();
                  if( !Arrays.equals(row_.digest(), digest) )
View Full Code Here


       
        for ( Object[] result : results )
        {
            byte[] body = (byte[])result[0];
            DataInputBuffer bufIn = new DataInputBuffer();
            bufIn.reset(body, body.length);
            ReadResponse response = ReadResponse.serializer().deserialize(bufIn);
            Row row = response.row();
            rows.put(row.key(), row);
        }       
        return rows;
View Full Code Here

        {
            throw new RuntimeException(e);
            // TODO retry to a different endpoint
        }
        DataInputBuffer bufIn = new DataInputBuffer();
        bufIn.reset(body, body.length);
        ReadResponse response = ReadResponse.serializer().deserialize(bufIn);
        return response.row();
    }

    static void touch_local(String tablename, String key, boolean fData ) throws IOException
View Full Code Here

        */
        DataInputBuffer bufIn = new DataInputBuffer();
    for (Message response : responses)
    {                     
            byte[] body = (byte[])response.getMessageBody()[0];           
            bufIn.reset(body, body.length);
            try
            {
                long start = System.currentTimeMillis();
                ReadResponse result = ReadResponse.serializer().deserialize(bufIn);
                logger_.debug( "Response deserialization time : " + (System.currentTimeMillis() - start) + " ms.");
View Full Code Here

    boolean isDataPresent = false;
    for (Message response : responses)
    {
            byte[] body = (byte[])response.getMessageBody()[0];
      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 = (byte[])message.getMessageBody()[0];
            DataInputBuffer bufIn = new DataInputBuffer();
            bufIn.reset(body, body.length);

            try
            {
                StreamContextManager.StreamStatusMessage streamStatusMessage = StreamContextManager.StreamStatusMessage.serializer().deserialize(bufIn);
                StreamContextManager.StreamStatus streamStatus = streamStatusMessage.getStreamStatus();
View Full Code Here

    public void doVerb(Message message)
    {
        Object[] body = message.getMessageBody();
        byte[] bytes = (byte[])body[0];
        DataInputBuffer bufIn = new DataInputBuffer();
        bufIn.reset(bytes, bytes.length);
        try
        {
            CalloutDeployMessage cdMessage = CalloutDeployMessage.serializer().deserialize(bufIn);
            /* save the callout to callout cache and to disk. */
            CalloutManager.instance().addCallout( cdMessage.getCallout(), cdMessage.getScript() );
View Full Code Here

    public void doVerb(Message message)
    {
        logger_.debug("Received a BootstrapMetadataMessage from " + message.getFrom());
        byte[] body = (byte[])message.getMessageBody()[0];
        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 = (byte[])message.getMessageBody()[0];
        DataInputBuffer buffer = new DataInputBuffer();
        buffer.reset(body, body.length);       
       
        try
        {
            RowMutationMessage rmMsg = RowMutationMessage.serializer().deserialize(buffer);
            RowMutation rm = rmMsg.getRowMutation();
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

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.