private UUID getUuidForTable(TableReference tableRef) { String internalTableName = CassandraKeyValueServiceImpl.internalTableName(tableRef); String keyspace = config.getKeyspaceOrThrow(); String fullTableNameForUuid = keyspace + "." + internalTableName; return UUID.nameUUIDFromBytes(fullTableNameForUuid.getBytes()); } }
private static Arg<String> quotedTableName(TableReference tableRef) { String tableNameWithQuotes = "\"" + CassandraKeyValueServiceImpl.internalTableName(tableRef) + "\""; return LoggingArgs.customTableName(tableRef, tableNameWithQuotes); }
private void truncateThenDrop(TableReference tableRef, CassandraClient client) throws TException { cassandraTableTruncator.runTruncateOnClient(ImmutableSet.of(tableRef), client); client.system_drop_column_family(CassandraKeyValueServiceImpl.internalTableName(tableRef)); } }
@Override public Void apply(CassandraClient client) throws TException { for (TableReference tableRef : tablesToTruncate) { queryRunner.run(client, tableRef, () -> { client.truncate(CassandraKeyValueServiceImpl.internalTableName(tableRef)); return true; }); } return null; }
public static List<String> nodetoolGetSsTables(String containerName, String keyspace, TableReference tableRef, byte[] rowKey) throws IOException, InterruptedException { String query = String.format("nodetool getsstables %s %s %s", keyspace, CassandraKeyValueServiceImpl.internalTableName(tableRef), BaseEncoding.base16().lowerCase().encode(rowKey)); String output = EteSetup.execCliCommand(containerName, query); String[] outputSplitIntoLines = output.split("\n"); return Arrays.stream(outputSplitIntoLines) .skip(1) // first line is Picked up _JAVA_OPTIONS... .collect(Collectors.toList()); }
final CassandraKeyValueServices.ThreadSafeResultVisitor visitor, final ConsistencyLevel consistency) { final ColumnParent colFam = new ColumnParent(CassandraKeyValueServiceImpl.internalTableName(tableRef)); Multimap<byte[], Cell> cellsByCol = TreeMultimap.create(UnsignedBytes.lexicographicalComparator(), Ordering.natural());
private UUID getUuidForTable(TableReference tableRef) { String internalTableName = CassandraKeyValueServiceImpl.internalTableName(tableRef); String keyspace = config.getKeyspaceOrThrow(); String fullTableNameForUuid = keyspace + "." + internalTableName; return UUID.nameUUIDFromBytes(fullTableNameForUuid.getBytes()); } }
private static Arg<String> quotedTableName(TableReference tableRef) { String tableNameWithQuotes = "\"" + CassandraKeyValueServiceImpl.internalTableName(tableRef) + "\""; return LoggingArgs.customTableName(tableRef, tableNameWithQuotes); }
private void truncateThenDrop(TableReference tableRef, CassandraClient client) throws TException { cassandraTableTruncator.runTruncateOnClient(ImmutableSet.of(tableRef), client); client.system_drop_column_family(CassandraKeyValueServiceImpl.internalTableName(tableRef)); } }
@Override public Void apply(CassandraClient client) throws TException { for (TableReference tableRef : tablesToTruncate) { queryRunner.run(client, tableRef, () -> { client.truncate(CassandraKeyValueServiceImpl.internalTableName(tableRef)); return true; }); } return null; }
boolean appendHeavyReadLight = tableMetadata.isAppendHeavyAndReadLight(); String keyspace = wrapInQuotes(config.getKeyspaceOrThrow()); String internalTableName = wrapInQuotes(CassandraKeyValueServiceImpl.internalTableName(tableRef));
final CassandraKeyValueServices.ThreadSafeResultVisitor visitor, final ConsistencyLevel consistency) { final ColumnParent colFam = new ColumnParent(CassandraKeyValueServiceImpl.internalTableName(tableRef)); Multimap<byte[], Cell> cellsByCol = TreeMultimap.create(UnsignedBytes.lexicographicalComparator(), Ordering.natural());
boolean appendHeavyReadLight = tableMetadata.isAppendHeavyAndReadLight(); String keyspace = wrapInQuotes(config.getKeyspaceOrThrow()); String internalTableName = wrapInQuotes(CassandraKeyValueServiceImpl.internalTableName(tableRef));