Package org.apache.cassandra.db

Examples of org.apache.cassandra.db.WriteResponse


    // TODO: We need to log error responses here for example
    // if a write fails for a key log that the key could not be replicated
    boolean returnValue = false;
    for (Message response : responses) {
      Object[] body = response.getMessageBody();
      WriteResponse writeResponse = (WriteResponse) body[0];
      boolean result = writeResponse.isSuccess();
      if (!result) {
        logger_.debug("Write at " + response.getFrom()
            + " may have failed for the key " + writeResponse.key());
      }
      returnValue |= result;
    }
    return returnValue;
  }
View Full Code Here


  {
    // TODO: We need to log error responses here for example
    // if a write fails for a key log that the key could not be replicated
    boolean returnValue = false;
    for (Message response : responses) {
            WriteResponse writeResponseMessage = null;
            try
            {
                writeResponseMessage = WriteResponse.serializer().deserialize(new DataInputStream(new ByteArrayInputStream(response.getMessageBody())));
            }
            catch (IOException e)
            {
                throw new RuntimeException(e);
            }
            boolean result = writeResponseMessage.isSuccess();
            if (!result) {
        if (logger_.isDebugEnabled())
                    logger_.debug("Write at " + response.getFrom()
            + " may have failed for the key " + writeResponseMessage.key());
      }
      returnValue |= result;
    }
    return returnValue;
  }
View Full Code Here

  {
    // TODO: We need to log error responses here for example
    // if a write fails for a key log that the key could not be replicated
    boolean returnValue = false;
    for (Message response : responses) {
            WriteResponse writeResponseMessage = null;
            try
            {
                writeResponseMessage = WriteResponse.serializer().deserialize(new DataInputStream(new ByteArrayInputStream(response.getMessageBody())));
            }
            catch (IOException e)
            {
                throw new RuntimeException(e);
            }
            boolean result = writeResponseMessage.isSuccess();
            if (!result) {
        logger_.debug("Write at " + response.getFrom()
            + " may have failed for the key " + writeResponseMessage.key());
      }
      returnValue |= result;
    }
    return returnValue;
  }
View Full Code Here

{
    public void doVerb(MessageIn<Commit> message, int id)
    {
        PaxosState.commit(message.payload);

        WriteResponse response = new WriteResponse();
        Tracing.trace("Enqueuing acknowledge to {}", message.from);
        MessagingService.instance().sendReply(response.createMessage(), id, message.from);
    }
View Full Code Here

  {
    // TODO: We need to log error responses here for example
    // if a write fails for a key log that the key could not be replicated
    boolean returnValue = false;
    for (Message response : responses) {
            WriteResponse writeResponseMessage = null;
            try
            {
                writeResponseMessage = WriteResponse.serializer().deserialize(new DataInputStream(new ByteArrayInputStream(response.getMessageBody())));
            }
            catch (IOException e)
            {
                throw new RuntimeException(e);
            }
            boolean result = writeResponseMessage.isSuccess();
            if (!result) {
        if (logger_.isDebugEnabled())
                    logger_.debug("Write at " + response.getFrom()
            + " may have failed for the key " + writeResponseMessage.key());
      }
      returnValue |= result;
    }
    return returnValue;
  }
View Full Code Here

TOP

Related Classes of org.apache.cassandra.db.WriteResponse

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.