Package org.apache.cassandra.thrift

Examples of org.apache.cassandra.thrift.ColumnOrSuperColumn$ColumnOrSuperColumnStandardSchemeFactory


   */
  public ThrottlingBatchMutation<K> addInsertion(K key,
      List<String> columnFamilies, Column column)
  {
    Mutation mutation = new Mutation();
    mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn()
        .setColumn(column));
    addMutation(key, columnFamilies, mutation);
    return this;
  }
View Full Code Here


   */
  public ThrottlingBatchMutation<K> addSuperInsertion(K key,
      List<String> columnFamilies, SuperColumn superColumn)
  {
    Mutation mutation = new Mutation();
    mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn()
        .setSuper_column(superColumn));
    addMutation(key, columnFamilies, mutation);
    return this;
  }
View Full Code Here

   */
  public ThrottlingBatchMutation<K> addCounterInsertion(K key,
      List<String> columnFamilies, CounterColumn counterColumn)
  {
    Mutation mutation = new Mutation();
    mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn()
        .setCounter_column(counterColumn));
    addMutation(key, columnFamilies, mutation);
    return this;
  }
View Full Code Here

   */
  public ThrottlingBatchMutation<K> addSuperCounterInsertion(K key,
      List<String> columnFamilies, CounterSuperColumn counterSuperColumn)
  {
    Mutation mutation = new Mutation();
    mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn()
        .setCounter_super_column(counterSuperColumn));
    addMutation(key, columnFamilies, mutation);
    return this;
  }
View Full Code Here

        type.key = ByteArray.toUTF(keySlice.getKey());
        type.keyHex = new String(Hex.encodeHex(keySlice.getKey()));
        int clen = Math.min(columnCount, keySlice.getColumnsSize());
        type.columns = new String[clen];
        for (int j = 0; j < clen; j++) {
          ColumnOrSuperColumn cos = keySlice.columns.get(j);
          if (cos.isSetColumn()) {
            type.columns[j] = new String(Hex.encodeHex(cos.column.getName()));
          } else if (cos.isSetSuper_column()) {
            type.columns[j] = new String(Hex.encodeHex(cos.super_column.getName()));
          } else {
            type.columns[j] = "Unknown";
          }
        }
View Full Code Here

        {
            org.apache.cassandra.thrift.Column column = new org.apache.cassandra.thrift.Column();
            column.setName(objToBB(t.get(0)));
            column.setValue(objToBB(t.get(1)));
            column.setTimestamp(FBUtilities.timestampMicros());
            mutation.column_or_supercolumn = new ColumnOrSuperColumn();
            mutation.column_or_supercolumn.column = column;
        }
        return mutation;
    }
View Full Code Here

                    mutation.deletion.setTimestamp(FBUtilities.timestampMicros());
                }
                else
                {
                    sc.columns = columns;
                    mutation.column_or_supercolumn = new ColumnOrSuperColumn();
                    mutation.column_or_supercolumn.super_column = sc;
                }
            }
            else
                mutation = mutationFromTuple(pair);
View Full Code Here

        {
            org.apache.cassandra.thrift.Column column = new org.apache.cassandra.thrift.Column();
            column.setName(objToBB(t.get(0)));
            column.setValue(objToBB(t.get(1)));
            column.setTimestamp(FBUtilities.timestampMicros());
            mutation.column_or_supercolumn = new ColumnOrSuperColumn();
            mutation.column_or_supercolumn.column = column;
        }
        return mutation;
    }
View Full Code Here

                        throw new IOException("SuperColumn deletion attempted with empty bag, but deletes are disabled, set " + PIG_ALLOW_DELETES + "=true to enable");
                }
                else
                {
                    sc.columns = columns;
                    mutation.column_or_supercolumn = new ColumnOrSuperColumn();
                    mutation.column_or_supercolumn.super_column = sc;
                }
            }
            else
                mutation = mutationFromTuple(pair);
View Full Code Here

                       mutation.deletion.setTimestamp(System.currentTimeMillis() * 1000);
                   }
                   else
                   {
                       sc.columns = columns;
                       mutation.column_or_supercolumn = new ColumnOrSuperColumn();
                       mutation.column_or_supercolumn.super_column = sc;
                   }
               }
               else // assume column since it couldn't be anything else
               {
                   if (pair.get(1) == null)
                   {
                       mutation.deletion = new Deletion();
                       mutation.deletion.predicate = new org.apache.cassandra.thrift.SlicePredicate();
                       mutation.deletion.predicate.column_names = Arrays.asList(objToBB(pair.get(0)));
                       mutation.deletion.setTimestamp(System.currentTimeMillis() * 1000);
                   }
                   else
                   {
                       org.apache.cassandra.thrift.Column column = new org.apache.cassandra.thrift.Column();
                       column.name = objToBB(pair.get(0));
                       column.value = objToBB(pair.get(1));
                       column.setTimestamp(System.currentTimeMillis() * 1000);
                       mutation.column_or_supercolumn = new ColumnOrSuperColumn();
                       mutation.column_or_supercolumn.column = column;
                   }
               }
               mutationList.add(mutation);
            }
View Full Code Here

TOP

Related Classes of org.apache.cassandra.thrift.ColumnOrSuperColumn$ColumnOrSuperColumnStandardSchemeFactory

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.