Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private void upsertIntoNamespacesTable(String keyspace) {
String insertQuery =
QueryBuilder.insertInto(
quoteIfNecessary(metadataKeyspace), quoteIfNecessary(NAMESPACES_TABLE))
.value(NAMESPACES_NAME_COL, quoteIfNecessary(keyspace))
.value(NAMESPACES_NAME_COL, keyspace)
.toString();
clusterManager.getSession().execute(insertQuery);
}
Expand Down Expand Up @@ -180,7 +180,7 @@ private void deleteFromNamespacesTable(String keyspace) {
String deleteQuery =
QueryBuilder.delete()
.from(quoteIfNecessary(metadataKeyspace), quoteIfNecessary(NAMESPACES_TABLE))
.where(QueryBuilder.eq(NAMESPACES_NAME_COL, quoteIfNecessary(keyspace)))
.where(QueryBuilder.eq(NAMESPACES_NAME_COL, keyspace))
.toString();
clusterManager.getSession().execute(deleteQuery);
}
Expand Down Expand Up @@ -349,7 +349,7 @@ public boolean namespaceExists(String namespace) throws ExecutionException {
String query =
QueryBuilder.select(NAMESPACES_NAME_COL)
.from(quoteIfNecessary(metadataKeyspace), quoteIfNecessary(NAMESPACES_TABLE))
.where(QueryBuilder.eq(NAMESPACES_NAME_COL, quoteIfNecessary(namespace)))
.where(QueryBuilder.eq(NAMESPACES_NAME_COL, namespace))
.toString();
ResultSet resultSet = clusterManager.getSession().execute(query);

Expand Down Expand Up @@ -396,7 +396,7 @@ public void addNewColumnToTable(
}
try {
String alterTableQuery =
SchemaBuilder.alterTable(namespace, table)
SchemaBuilder.alterTable(quoteIfNecessary(namespace), quoteIfNecessary(table))
.addColumn(columnName)
.type(toCassandraDataType(columnType))
.getQueryString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ private void verifyInsertIntoKeyspacesTableQuery(String keyspace) {
QueryBuilder.insertInto(
quoteIfNecessary(METADATA_KEYSPACE),
quoteIfNecessary(CassandraAdmin.NAMESPACES_TABLE))
.value(CassandraAdmin.NAMESPACES_NAME_COL, quoteIfNecessary(keyspace))
.value(CassandraAdmin.NAMESPACES_NAME_COL, keyspace)
.toString();
verify(cassandraSession).execute(query);
}
Expand Down Expand Up @@ -569,7 +569,7 @@ private void verifyDeleteFromKeyspacesTableQuery(String keyspace) {
.from(
quoteIfNecessary(METADATA_KEYSPACE),
quoteIfNecessary(CassandraAdmin.NAMESPACES_TABLE))
.where(QueryBuilder.eq(CassandraAdmin.NAMESPACES_NAME_COL, quoteIfNecessary(keyspace)))
.where(QueryBuilder.eq(CassandraAdmin.NAMESPACES_NAME_COL, keyspace))
.toString();
verify(cassandraSession).execute(query);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ public abstract class DistributedStorageAdminIntegrationTestBase {
LoggerFactory.getLogger(DistributedStorageAdminIntegrationTestBase.class);

private static final String TEST_NAME = "storage_admin";
private static final String NAMESPACE1 = "int_test_" + TEST_NAME + "1";
private static final String NAMESPACE2 = "int_test_" + TEST_NAME + "2";
private static final String NAMESPACE3 = "int_test_" + TEST_NAME + "3";
private static final String TABLE1 = "test_table1";
private static final String TABLE2 = "test_table2";
private static final String TABLE3 = "test_table3";
private static final String TABLE4 = "test_table4";
private static final String NAMESPACE1 = "Int_test_" + TEST_NAME + "1";
private static final String NAMESPACE2 = "Int_test_" + TEST_NAME + "2";
private static final String NAMESPACE3 = "Int_test_" + TEST_NAME + "3";
private static final String TABLE1 = "Test_table1";
private static final String TABLE2 = "Test_table2";
private static final String TABLE3 = "Test_table3";
private static final String TABLE4 = "Test_table4";
private static final String COL_NAME1 = "c1";
private static final String COL_NAME2 = "c2";
private static final String COL_NAME3 = "c3";
Expand Down
Loading