Examples of addToColumn_names()


Examples of org.apache.cassandra.thrift.SlicePredicate.addToColumn_names()

  public <SN,N,V> Mutator<K> addSubDelete(K key, String cf, HSuperColumn<SN,N,V> sc, long clock) {
    SlicePredicate pred = new SlicePredicate();
    Deletion d = new Deletion(clock);
    if ( sc.getColumns() != null ) {     
      for (HColumn<N, V> col : sc.getColumns()) {
        pred.addToColumn_names(col.getNameSerializer().toByteBuffer(col.getName()));
      }
      d.setPredicate(pred);
    }   
    d.setSuper_column(sc.getNameByteBuffer());
    getPendingMutations().addDeletion(key, Arrays.asList(cf), d);       
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate.addToColumn_names()

   * {@inheritDoc}
   */
  @Override
  public <N> Mutator<K> addDeletion(K key, String cf, N columnName, Serializer<N> nameSerializer, long clock) {
    SlicePredicate sp = new SlicePredicate();
    sp.addToColumn_names(nameSerializer.toByteBuffer(columnName));
    Deletion d = columnName != null ? new Deletion(clock).setPredicate(sp) : new Deletion(clock);
    getPendingMutations().addDeletion(key, Arrays.asList(cf), d);
    return this;
  }

View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate.addToColumn_names()

    SlicePredicate predicate = getOrCreate(parent);
    if (predicate.getSlice_range() != null) {
      // TODO: Make this another exception
      throw new RuntimeException("Can't add columns if slice_range is not null");
    }
    predicate.addToColumn_names(ByteUtils.toBytes(columnName));
    return this;
  }

  public Select addColumnName(String columnFamily, String columnName) {
    SlicePredicate predicate = getOrCreate(new ColumnParent(columnFamily));
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate.addToColumn_names()

    SlicePredicate predicate = getOrCreate(new ColumnParent(columnFamily));
    if (predicate.getSlice_range() != null) {
      // TODO: Make this another exception
      throw new RuntimeException("Can't add columns if slice_range is not null");
    }
    predicate.addToColumn_names(ByteUtils.toBytes(columnName));
    return this;
  }

  public Select addSuperColumnAll(String superColumnFamily) {
    return addColumnAll(superColumnFamily);
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate.addToColumn_names()

        for (Map.Entry<String, PartialMutation> partialKeyValue : partials.entrySet()) {
            // the columnName is the key of the map entry
            String columnName = partialKeyValue.getKey();
            // add this column to the predicate
            slicePredicate.addToColumn_names(bytes(columnName));
        }

        // read old values from Cassandra
        List<Column> columns = getSlice(rowKey,
                                        columnFamily,
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate.addToColumn_names()

            if (superColumnName != null) {
                deletion.setSuper_column(bytes(superColumnName));
            }
            SlicePredicate predicate = new SlicePredicate();
            for (String columnName : columnNames) {
                predicate.addToColumn_names(bytes(columnName));
            }
            deletion.setPredicate(predicate);
            batchMutation.addDeletion(rowKey, Collections.singletonList(columnFamilyName), deletion);

            mutate(batchMutation, keyspaceName, template);
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate.addToColumn_names()

            if (superColumnName != null) {
                deletion.setSuper_column(bytes(superColumnName));
            }
            SlicePredicate predicate = new SlicePredicate();
            for (String columnName : columnNames) {
                predicate.addToColumn_names(bytes(columnName));
            }
            deletion.setPredicate(predicate);
            batchMutation.addDeletion(rowKey, Collections.singletonList(columnFamilyName), deletion);

            mutate(batchMutation, keyspaceName, template);
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate.addToColumn_names()

            if (superColumnName != null) {
                deletion.setSuper_column(bytes(superColumnName));
            }
            SlicePredicate predicate = new SlicePredicate();
            for (String columnName : columnNames) {
                predicate.addToColumn_names(bytes(columnName));
            }
            deletion.setPredicate(predicate);
            batchMutation.addDeletion(rowKey, Collections.singletonList(columnFamilyName), deletion);

            mutate(batchMutation, keyspaceName, template);
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate.addToColumn_names()

            if (superColumnName != null) {
                deletion.setSuper_column(bytes(superColumnName));
            }
            SlicePredicate predicate = new SlicePredicate();
            for (String columnName : columnNames) {
                predicate.addToColumn_names(bytes(columnName));
            }
            deletion.setPredicate(predicate);
            batchMutation.addDeletion(rowKey, Collections.singletonList(columnFamilyName), deletion);

            mutate(batchMutation, keyspaceName, template);
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate.addToColumn_names()

        for (Map.Entry<String, PartialMutation> partialKeyValue : partials.entrySet()) {
            // the columnName is the key of the map entry
            String columnName = partialKeyValue.getKey();
            // add this column to the predicate
            slicePredicate.addToColumn_names(bytes(columnName));
        }

        // read old values from Cassandra
        List<Column> columns = getSlice(rowKey,
                                        columnFamily,
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.