Package com.netflix.astyanax

Examples of com.netflix.astyanax.MutationBatch.discardMutations()


        MutationBatch mb = keyspace.prepareMutationBatch();

        for (int i=0; i<numRows; i++) {
            mb.withRow(CF_USER_INFO, "acct_" + i).delete();
            mb.execute();
            mb.discardMutations();
        }
  }


  public Collection<String> getRandomColumns(int numColumns) {
View Full Code Here


      .putColumn("bytes", TestBytes)
      .putColumn("uuid", TestUUID)
      .putEmptyColumn("empty");

      mb.execute();
      mb.discardMutations();
    }
  }

  private static void populateRowsForColumnRange() throws Exception {
   
View Full Code Here

              for (char cName = 'a'; cName <= 'z'; cName++) {
                colMutation.putColumn(Character.toString(cName), (int) (cName - 'a') + 1, null);
              }
              m.withCaching(true);
              m.execute();
              m.discardMutations();
        }
  }

}
View Full Code Here

    for (char keyName = 'A'; keyName <= 'Z'; keyName++) {
      String character = Character.toString(keyName);
      ColumnListMutation<String> colMutation = m.withRow(CF_ACCOUNTS, character);
      colMutation.putColumn("user", "user" + character).putColumn("pswd", "pswd" + character);
      m.execute();
      m.discardMutations();
    }
  }

  public static void deleteRowsForAccountsTable(Keyspace keyspace) throws Exception {
View Full Code Here

    for (char keyName = 'A'; keyName <= 'Z'; keyName++) {
      MutationBatch m = keyspace.prepareMutationBatch();
      String rowKey = Character.toString(keyName);
      m.withRow(CF_ACCOUNTS, rowKey).delete();
      m.execute();
      m.discardMutations();
    }
  }
}
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.