Package org.apache.cassandra.thrift

Examples of org.apache.cassandra.thrift.Deletion$DeletionTupleScheme


     */
    public Mutator deleteSubColumns(String colFamily, Bytes rowKey, Bytes colName, List<Bytes> subColNames) {
      safeGetRowKey(rowKey);
      validateColumnName(colName);
      validateColumnNames(subColNames);
        Deletion deletion = new Deletion();
        deletion.setTimestamp(timestamp);
        deletion.setSuper_column(nullSafeGet(colName));
        // CASSANDRA-1027 allows for a null predicate
        deletion.setPredicate(
                subColNames != null && !subColNames.isEmpty() ?
                        new SlicePredicate().setColumn_names(Bytes.transformBytesToList(subColNames)) : null
        );
        Mutation mutation = new Mutation();
        mutation.setDeletion(deletion);
View Full Code Here


         columnFamilyMutations = new ArrayList<Mutation>();
         keyMutations.put(columnFamily, columnFamilyMutations);
      }

      if (value == null) { // Delete
         Deletion deletion = new Deletion();
         deletion.setTimestamp(microTimestamp());
         if (superColumn != null) {
            deletion.setSuper_column(superColumn);
         }
         if (columnName != null) { // Single column delete
            deletion.setPredicate(new SlicePredicate().setColumn_names(Collections
                     .singletonList(columnName)));
         } // else Delete entire column family or supercolumn
         columnFamilyMutations.add(new Mutation().setDeletion(deletion));
      } else { // Insert/update
         ColumnOrSuperColumn cosc = new ColumnOrSuperColumn();
View Full Code Here

TOP

Related Classes of org.apache.cassandra.thrift.Deletion$DeletionTupleScheme

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.