Package org.apache.cassandra.db

Examples of org.apache.cassandra.db.RowMutationMessage


  public void testRead(String filepath) throws Throwable {
    BufferedReader bufReader = new BufferedReader(new InputStreamReader(
        new FileInputStream(filepath)), 16 * 1024 * 1024);
    String line = null;
    String delimiter_ = new String(",");
    RowMutationMessage rmInbox = null;
    RowMutationMessage rmOutbox = null;
    ColumnFamily cfInbox = null;
    ColumnFamily cfOutbox = null;
    while ((line = bufReader.readLine()) != null) {
      StringTokenizer st = new StringTokenizer(line, delimiter_);
      int i = 0;
View Full Code Here


  public void testReadThrift(String filepath) throws Throwable {
    BufferedReader bufReader = new BufferedReader(new InputStreamReader(
        new FileInputStream(filepath)), 16 * 1024 * 1024);
    String line = null;
    String delimiter_ = new String(",");
    RowMutationMessage rmInbox = null;
    RowMutationMessage rmOutbox = null;
    ColumnFamily cfInbox = null;
    ColumnFamily cfOutbox = null;
    String firstuser = null ;
    String nextuser = null;
    while ((line = bufReader.readLine()) != null) {
View Full Code Here

  public void testSuperReadThrift(String filepath) throws Throwable {
    BufferedReader bufReader = new BufferedReader(new InputStreamReader(
        new FileInputStream(filepath)), 16 * 1024 * 1024);
    String line = null;
    String delimiter_ = new String(",");
    RowMutationMessage rmInbox = null;
    RowMutationMessage rmOutbox = null;
    ColumnFamily cfInbox = null;
    ColumnFamily cfOutbox = null;
    String firstuser = null ;
    String nextuser = null;
    while ((line = bufReader.readLine()) != null) {
View Full Code Here

        {
            long t = System.currentTimeMillis();
            counter_.incrementAndGet();
        columnFamilyHack_++;
            EndPoint to = new EndPoint(7000);
            RowMutationMessage rmMsg = new RowMutationMessage(rm);          
            Message message = new Message(to,
                    StorageService.mutationStage_,
                    StorageService.mutationVerbHandler_,
                    new Object[]{ rmMsg }
            );                                                           
View Full Code Here

            RowMutation rowMutation = new RowMutation(table, key);
            for (ColumnFamily cf : diffRow.getColumnFamilies())
            {
                rowMutation.add(cf);
            }
            RowMutationMessage rowMutationMessage = new RowMutationMessage(rowMutation);
            ReadRepairManager.instance().schedule(endPoints.get(i), rowMutationMessage);
        }
        if (logger_.isDebugEnabled())
            logger_.debug("resolve: " + (System.currentTimeMillis() - startTime) + " ms.");
    return retRow;
View Full Code Here

      RowMutation rowMutation = new RowMutation(table, key);                 
          for (ColumnFamily cf : diffRow.getColumnFamilies())
          {
              rowMutation.add(cf);
          }
            RowMutationMessage rowMutationMessage = new RowMutationMessage(rowMutation);
          ReadRepairManager.instance().schedule(endPoints.get(i),rowMutationMessage);
    }
        logger_.info("resolve: " + (System.currentTimeMillis() - startTime) + " ms.");
    return retRow;
  }
View Full Code Here

                continue;

            // create and send the row mutation message based on the diff
            RowMutation rowMutation = new RowMutation(table, key);
            rowMutation.add(diffCf);
            RowMutationMessage rowMutationMessage = new RowMutationMessage(rowMutation);
            Message repairMessage;
            try
            {
                repairMessage = rowMutationMessage.makeRowMutationMessage(StorageService.Verb.READ_REPAIR);
            }
            catch (IOException e)
            {
                throw new IOError(e);
            }
View Full Code Here

      RowMutation rowMutation = new RowMutation(table, key);                 
          for (ColumnFamily cf : diffRow.getColumnFamilies())
          {
              rowMutation.add(cf);
          }
            RowMutationMessage rowMutationMessage = new RowMutationMessage(rowMutation);
          ReadRepairManager.instance().schedule(endPoints.get(i),rowMutationMessage);
    }
        logger_.info("resolve: " + (System.currentTimeMillis() - startTime) + " ms.");
    return retRow;
  }
View Full Code Here

                continue;

            // create and send the row mutation message based on the diff
            RowMutation rowMutation = new RowMutation(table, key);
            rowMutation.add(diffCf);
            RowMutationMessage rowMutationMessage = new RowMutationMessage(rowMutation);
            Message repairMessage;
            try
            {
                repairMessage = rowMutationMessage.makeRowMutationMessage(StorageService.Verb.READ_REPAIR);
            }
            catch (IOException e)
            {
                throw new IOError(e);
            }
View Full Code Here

        }
        else
        {
      rm.add(Table.recycleBin_ + ":" + columnFamilyName, bytes, operation);
        }
    RowMutationMessage rmMsg = new RowMutationMessage(rm);
        if( server_ != null)
        {
            Message message = rmMsg.makeRowMutationMessage(StorageService.binaryVerbHandler_);
          EndPoint to = new EndPoint(server_, 7000);
      MessagingService.getMessagingInstance().sendOneWay(message, to);
        }
        else
        {
          for( String server : servers_ )
          {
                Message message = rmMsg.makeRowMutationMessage(StorageService.binaryVerbHandler_);
            EndPoint to = new EndPoint(server, 7000);
        MessagingService.getMessagingInstance().sendOneWay(message, to);
          }
        }
  }
View Full Code Here

TOP

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

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.