@Override public ByteBuffer getColumn(ColumnOrSuperColumn element) { return element.getColumn().bufferForName(); }
/** * Convenience method to get the name buffer for the specified column and * decompose it into the name and timestamp. */ public static Pair<byte[], Long> decomposeName(Column column) { ByteBuffer nameBuffer; if (column.isSetName()) { nameBuffer = column.bufferForName(); } else { // the column buffer has not yet been set/cached // so we must fallback on the slowpath and force // the transform to bytes and wrap ourselves nameBuffer = ByteBuffer.wrap(column.getName()); } return decompose(nameBuffer); }
@Override public ByteBuffer getColumn(ColumnOrSuperColumn element) { return element.getColumn().bufferForName(); }
@Override public ByteBuffer getColumn(ColumnOrSuperColumn element) { return element.getColumn().bufferForName(); }
private static Map<String, ByteBuffer> convertThriftCqlRow(CqlRow row) { Map<String, ByteBuffer> m = new HashMap<>(); for (org.apache.cassandra.thrift.Column column : row.getColumns()) m.put(UTF8Type.instance.getString(column.bufferForName()), column.value); return m; }
/** * Convenience method to get the name buffer for the specified column and * decompose it into the name and timestamp. */ public static Pair<byte[], Long> decomposeName(Column column) { ByteBuffer nameBuffer; if (column.isSetName()) { nameBuffer = column.bufferForName(); } else { // the column buffer has not yet been set/cached // so we must fallback on the slowpath and force // the transform to bytes and wrap ourselves nameBuffer = ByteBuffer.wrap(column.getName()); } return decompose(nameBuffer); }
String columnFamily = UTF8Type.instance.getString(row.columns.get(1).bufferForName()); String columnsQuery = String.format("SELECT * FROM %s.%s WHERE keyspace_name = '%s' AND columnfamily_name = '%s'", Keyspace.SYSTEM_KS,