99import com .scalar .db .storage .cassandra .CassandraAdmin ;
1010import com .scalar .db .storage .cassandra .CassandraConfig ;
1111import com .scalar .db .storage .cassandra .ClusterManager ;
12- import com .scalar .db .storage .jdbc .JdbcAdmin ;
1312import com .scalar .db .storage .jdbc .JdbcConfig ;
1413import com .scalar .db .storage .jdbc .JdbcTestUtils ;
1514import com .scalar .db .storage .jdbc .JdbcUtils ;
15+ import com .scalar .db .storage .jdbc .NamespaceMetadataService ;
1616import com .scalar .db .storage .jdbc .RdbEngineFactory ;
1717import com .scalar .db .storage .jdbc .RdbEngineStrategy ;
18+ import com .scalar .db .storage .jdbc .TableMetadataService ;
1819import com .scalar .db .util .AdminTestUtils ;
1920import edu .umd .cs .findbugs .annotations .SuppressFBWarnings ;
2021import java .sql .Connection ;
@@ -61,7 +62,8 @@ public void dropNamespacesTable() throws SQLException {
6162 // for JDBC
6263 execute (
6364 "DROP TABLE "
64- + rdbEngine .encloseFullTableName (jdbcMetadataSchema , JdbcAdmin .NAMESPACES_TABLE ));
65+ + rdbEngine .encloseFullTableName (
66+ jdbcMetadataSchema , NamespaceMetadataService .NAMESPACES_TABLE ));
6567 }
6668
6769 @ Override
@@ -71,7 +73,8 @@ public void dropMetadataTable() throws SQLException {
7173 // for JDBC
7274 execute (
7375 "DROP TABLE "
74- + rdbEngine .encloseFullTableName (jdbcMetadataSchema , JdbcAdmin .METADATA_TABLE ));
76+ + rdbEngine .encloseFullTableName (
77+ jdbcMetadataSchema , TableMetadataService .METADATA_TABLE ));
7578 }
7679
7780 @ Override
@@ -86,7 +89,7 @@ public void truncateNamespacesTable() throws SQLException {
8689
8790 // for JDBC
8891 String truncateTableStatement =
89- rdbEngine .truncateTableSql (jdbcMetadataSchema , JdbcAdmin .NAMESPACES_TABLE );
92+ rdbEngine .truncateTableSql (jdbcMetadataSchema , NamespaceMetadataService .NAMESPACES_TABLE );
9093 execute (truncateTableStatement );
9194 }
9295
@@ -97,7 +100,8 @@ public void truncateMetadataTable() throws Exception {
97100 // for JDBC
98101 String truncateTableStatement =
99102 "TRUNCATE TABLE "
100- + rdbEngine .encloseFullTableName (jdbcMetadataSchema , JdbcAdmin .METADATA_TABLE );
103+ + rdbEngine .encloseFullTableName (
104+ jdbcMetadataSchema , TableMetadataService .METADATA_TABLE );
101105 execute (truncateTableStatement );
102106 }
103107
@@ -109,7 +113,8 @@ public void corruptMetadata(String namespace, String table) throws Exception {
109113 // for JDBC
110114 String insertCorruptedMetadataStatement =
111115 "INSERT INTO "
112- + rdbEngine .encloseFullTableName (jdbcMetadataSchema , JdbcAdmin .METADATA_TABLE )
116+ + rdbEngine .encloseFullTableName (
117+ jdbcMetadataSchema , TableMetadataService .METADATA_TABLE )
113118 + " VALUES ('"
114119 + getFullTableName (namespace , table )
115120 + "','corrupted','corrupted','corrupted','corrupted','0','0')" ;
@@ -123,9 +128,10 @@ public void deleteMetadata(String namespace, String table) throws Exception {
123128 // for JDBC
124129 String deleteMetadataStatement =
125130 "DELETE FROM "
126- + rdbEngine .encloseFullTableName (jdbcMetadataSchema , JdbcAdmin .METADATA_TABLE )
131+ + rdbEngine .encloseFullTableName (
132+ jdbcMetadataSchema , TableMetadataService .METADATA_TABLE )
127133 + " WHERE "
128- + rdbEngine .enclose (JdbcAdmin .METADATA_COL_FULL_TABLE_NAME )
134+ + rdbEngine .enclose (TableMetadataService .METADATA_COL_FULL_TABLE_NAME )
129135 + " = ?" ;
130136 try (Connection connection = dataSource .getConnection ();
131137 PreparedStatement preparedStatement =
0 commit comments