Examples of ReadCommand


Examples of org.apache.cassandra.db.ReadCommand

    }
  }
   
    private ReadCommand constructReadMessage(boolean isDigestQuery)
    {
        ReadCommand readCommand = readCommand_.copy();
        readCommand.setDigestQuery(isDigestQuery);
        return readCommand;
    }
View Full Code Here

Examples of org.apache.cassandra.db.ReadCommand

    private void doReadRepair() throws IOException
    {
            replicas_.add(FBUtilities.getLocalAddress());
            IResponseResolver<Row> readResponseResolver = new ReadResponseResolver(table_, replicas_.size());
            IAsyncCallback responseHandler = new DataRepairHandler(replicas_.size(), readResponseResolver);
            ReadCommand readCommand = constructReadMessage(false);
            Message message = readCommand.makeReadMessage();
            if (logger_.isDebugEnabled())
              logger_.debug("Performing read repair for " + readCommand_.key + " to " + message.getMessageId() + "@[" + StringUtils.join(replicas_, ", ") + "]");
      MessagingService.instance().sendRR(message, replicas_.toArray(new InetAddress[replicas_.size()]), responseHandler);
    }
View Full Code Here

Examples of org.apache.cassandra.db.ReadCommand

                if (logger.isDebugEnabled())
                    logger.debug("Digest mismatch:", e);
               
                ReadRepairMetrics.repairedBackground.mark();
               
                ReadCommand readCommand = (ReadCommand) command;
                final RowDataResolver repairResolver = new RowDataResolver(readCommand.ksName, readCommand.key, readCommand.filter(), readCommand.timestamp);
                AsyncRepairCallback repairHandler = new AsyncRepairCallback(repairResolver, endpoints.size());

                MessageOut<ReadCommand> message = ((ReadCommand) command).createMessage();
                for (InetAddress endpoint : endpoints)
                    MessagingService.instance().sendRR(message, endpoint, repairHandler);
View Full Code Here

Examples of org.apache.cassandra.db.ReadCommand

            catch (DigestMismatchException e)
            {
                if (logger.isDebugEnabled())
                    logger.debug("Digest mismatch:", e);

                ReadCommand readCommand = (ReadCommand) command;
                final RowRepairResolver repairResolver = new RowRepairResolver(readCommand.table, readCommand.key);
                IAsyncCallback repairHandler = new AsyncRepairCallback(repairResolver, endpoints.size());

                Message messageRepair = readCommand.makeReadMessage();
                for (InetAddress endpoint : endpoints)
                    MessagingService.instance().sendRR(messageRepair, endpoint, repairHandler);
            }
        }
View Full Code Here

Examples of org.apache.cassandra.db.ReadCommand

            catch (DigestMismatchException e)
            {
                if (logger.isDebugEnabled())
                    logger.debug("Digest mismatch:", e);

                ReadCommand readCommand = (ReadCommand) command;
                final RowRepairResolver repairResolver = new RowRepairResolver(readCommand.table, readCommand.key);
                IAsyncCallback repairHandler = new AsyncRepairCallback(repairResolver, endpoints.size());

                Message messageRepair = readCommand.makeReadMessage();
                for (InetAddress endpoint : endpoints)
                    MessagingService.instance().sendRR(messageRepair, endpoint, repairHandler);
            }
        }
View Full Code Here

Examples of org.apache.cassandra.db.ReadCommand

        ByteBuffer rKey = kser.toByteBuffer(rkey);
        ByteBuffer sname = colser.toByteBuffer(startColumn);
        ByteBuffer ename = colser.toByteBuffer(endColumn);
       
        List<ReadCommand> commands = new ArrayList<ReadCommand>();
        ReadCommand readCommand = new SliceFromReadCommand(ks, rKey, new ColumnParent(cf), sname, ename, reversed, count);
        readCommand.setDigestQuery(false);
        commands.add(readCommand);
        List<Row> rows;
        try
        {
            rows = StorageProxy.read(commands, rConsistecy);
View Full Code Here

Examples of org.apache.cassandra.db.ReadCommand

        Row row = null;
        try
        {
            String key = (String)(rowKey_.get());
            ReadCommand readCommand = new ReadCommand(cfMetaData_.tableName, key, columnFamily_column, offset_, limit_);
            row = StorageProxy.readProtocol(readCommand, StorageService.ConsistencyLevel.WEAK);
        }
        catch (Exception e)
        {
            logger_.error(LogUtil.throwableToString(e));
View Full Code Here

Examples of org.apache.cassandra.db.ReadCommand

    {
        Row row = null;
        try
        {
            String key = (String)(rowKey_.get());
            ReadCommand readCommand = new ReadCommand(cfMetaData_.tableName, key, cfMetaData_.cfName, offset_, limit_);
            row = StorageProxy.readProtocol(readCommand, StorageService.ConsistencyLevel.WEAK);
        }
        catch (Exception e)
        {
            logger_.error(LogUtil.throwableToString(e));
View Full Code Here

Examples of org.apache.cassandra.db.ReadCommand

        Row row = null;
        try
        {
            String key = (String)(rowKey_.get());
            ReadCommand readCommand = new ReadCommand(cfMetaData_.tableName, key, columnFamily_column, -1, Integer.MAX_VALUE);
            row = StorageProxy.readProtocol(readCommand, StorageService.ConsistencyLevel.WEAK);
        }
        catch (Exception e)
        {
            logger_.error(LogUtil.throwableToString(e));
View Full Code Here

Examples of org.apache.cassandra.db.ReadCommand

        key = user + ":0";
      } else {
        key = user + ":1";
      }

      ReadCommand readCommand = new ReadCommand(tablename_, key);
      Message message = new Message(from_, StorageService.readStage_,
          StorageService.readVerbHandler_,
          new Object[] {readCommand});
      IAsyncResult iar = MessagingService.getMessagingInstance().sendRR(
          message, to_);
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.