Package org.apache.cassandra.db

Examples of org.apache.cassandra.db.ReadCommand


    {
        long startTime = System.currentTimeMillis();
    try
    {
      validateTable(tablename);
      ColumnFamily cfamily = readColumnFamily(new ReadCommand(tablename, key, columnFamily, columnNames));
      if (cfamily == null)
      {
        logger_.info("ERROR ColumnFamily " + columnFamily + " is missing.....: "
              +"   key:" + key
              + "  ColumnFamily:" + columnFamily);
View Full Code Here


  {
        long startTime = System.currentTimeMillis();
    try
    {
          String[] values = RowMutation.getColumnAndColumnFamily(columnFamily_column);
      ColumnFamily cfamily = readColumnFamily(new ReadCommand(tablename, key, columnFamily_column, start, count));
      if (cfamily == null)
      {
        logger_.info("ERROR ColumnFamily " + columnFamily_column + " is missing.....: "  + "   key:" + key + "  ColumnFamily:" + values[0]);
        throw new CassandraException("Either the key " + key + " is not present or the columns requested" + columnFamily_column + "are not present.");
      }
View Full Code Here

    public column_t get_column(String tablename, String key, String columnFamily_column) throws CassandraException,TException
    {
    try
    {
          String[] values = RowMutation.getColumnAndColumnFamily(columnFamily_column);
      ColumnFamily cfamily = readColumnFamily(new ReadCommand(tablename, key, columnFamily_column, -1, Integer.MAX_VALUE));
      if (cfamily == null || values.length < 2)
      {
        logger_.info("ERROR ColumnFamily  is missing.....: "
              +"   key:" + key
              + "  ColumnFamily:" + values[0]);
View Full Code Here

  {
      int count = -1;
    try
    {
          String[] values = RowMutation.getColumnAndColumnFamily(columnFamily_column);
      ColumnFamily cfamily = readColumnFamily(new ReadCommand(tablename, key, columnFamily_column, -1, Integer.MAX_VALUE));
      if (cfamily == null)
      {
        logger_.info("ERROR ColumnFamily  is missing.....: "
              +"   key:" + key
              + "  ColumnFamily:" + values[0]);
View Full Code Here

        long startTime = System.currentTimeMillis();
   
    try
    {
      validateTable(tablename);
      ColumnFamily cfamily = readColumnFamily(new ReadCommand(tablename, key, columnFamily, superColumnNames));
      if (cfamily == null)
      {
        logger_.info("ERROR ColumnFamily " + columnFamily + " is missing.....: "+"   key:" + key
              + "  ColumnFamily:" + columnFamily);
        throw new CassandraException("Either the key " + key + " is not present or the column family requested" + columnFamily + "is not present.");
View Full Code Here

    public List<superColumn_t> get_slice_super(String tablename, String key, String columnFamily_superColumnName, int start, int count) throws CassandraException
    {
    try
    {
          String[] values = RowMutation.getColumnAndColumnFamily(columnFamily_superColumnName);
      ColumnFamily cfamily = readColumnFamily(new ReadCommand(tablename, key, columnFamily_superColumnName, start, count));
      if (cfamily == null)
      {
        logger_.info("ERROR ColumnFamily  is missing.....: "
              +"   key:" + key
              + "  ColumnFamily:" + values[0]);
View Full Code Here

    public superColumn_t get_superColumn(String tablename, String key, String columnFamily_column) throws CassandraException
    {
    try
    {
          String[] values = RowMutation.getColumnAndColumnFamily(columnFamily_column);
      ColumnFamily cfamily = readColumnFamily(new ReadCommand(tablename, key, columnFamily_column, -1, Integer.MAX_VALUE));
      if (cfamily == null)
      {
        logger_.info("ERROR ColumnFamily  is missing.....: "
              +"   key:" + key
              + "  ColumnFamily:" + values[0]);
View Full Code Here

        readCommand_ = readCommand;
    }

  public void run()
  {
        ReadCommand readCommandDigestOnly = constructReadMessage(true);
    try
    {
      Message message = readCommandDigestOnly.makeReadMessage();
            if (logger_.isDebugEnabled())
              logger_.debug("Reading consistency digest for " + readCommand_.key + " from " + message.getMessageId() + "@[" + StringUtils.join(replicas_, ", ") + "]");
            MessagingService.instance().sendRR(message, replicas_.toArray(new InetAddress[replicas_.size()]), new DigestResponseHandler());
    }
    catch (IOException ex)
View Full Code Here

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

    {
      IResponseResolver<Row> readResponseResolver = new ReadResponseResolver();
            /* Add the local storage endpoint to the replicas_ list */
            replicas_.add(FBUtilities.getLocalAddress());
      IAsyncCallback responseHandler = new DataRepairHandler(ConsistencyManager.this.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

TOP

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

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.