Examples of DataInputBuffer


Examples of org.apache.cassandra.io.DataInputBuffer

            throw new UnsupportedOperationException("This operation is not currently supported.");
        }
   
    private void handleDigestResponses()
    {
      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

Examples of org.apache.cassandra.io.DataInputBuffer

        List<Object[]> results = iar.multiget(2*DatabaseDescriptor.getRpcTimeout(), TimeUnit.MILLISECONDS);
       
        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

Examples of org.apache.cassandra.io.DataInputBuffer

        catch (TimeoutException e)
        {
            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();
    }
View Full Code Here

Examples of org.apache.cassandra.io.DataInputBuffer

     * 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 = (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

Examples of org.apache.cassandra.io.DataInputBuffer

  {
    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())
          {
            isDataPresent = true;
          }
                bufIn.close();
            }
            catch(IOException ex)
            {
                logger_.info(LogUtil.throwableToString(ex));
            }                       
View Full Code Here

Examples of org.apache.cassandra.io.DataInputBuffer

        private static Logger logger_ = Logger.getLogger( BootstrapInitiateDoneVerbHandler.class );

        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

Examples of org.apache.cassandra.io.DataInputBuffer

    private ColumnFamily fetchColumnFamily(String key, String cf, IFilter filter, String ssTableFile) throws IOException
  {
    SSTable ssTable = new SSTable(ssTableFile);
    long start = System.currentTimeMillis();
    DataInputBuffer bufIn;
    bufIn = filter.next(key, cf, ssTable);
    logger_.debug("DISK ssTable.next TIME: " + (System.currentTimeMillis() - start) + " ms.");
    if (bufIn.getLength() == 0)
      return null;
        start = System.currentTimeMillis();
        ColumnFamily columnFamily = ColumnFamily.serializer().deserialize(bufIn, cf, filter);
    logger_.debug("DISK Deserialize TIME: " + (System.currentTimeMillis() - start) + " ms.");
    if (columnFamily == null)
View Full Code Here

Examples of org.apache.cassandra.io.DataInputBuffer

   
    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

Examples of org.apache.cassandra.io.DataInputBuffer

   
    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

Examples of org.apache.cassandra.io.DataInputBuffer

    private static Logger logger_ = Logger.getLogger(ReadRepairVerbHandler.class);   
   
    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
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.