File tree Expand file tree Collapse file tree 4 files changed +23
-17
lines changed
main/java/io/trino/gateway/ha/config
test/java/io/trino/gateway/ha/router Expand file tree Collapse file tree 4 files changed +23
-17
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Licensed under the Apache License, Version 2.0 (the "License");
3+ * you may not use this file except in compliance with the License.
4+ * You may obtain a copy of the License at
5+ *
6+ * http://www.apache.org/licenses/LICENSE-2.0
7+ *
8+ * Unless required by applicable law or agreed to in writing, software
9+ * distributed under the License is distributed on an "AS IS" BASIS,
10+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+ * See the License for the specific language governing permissions and
12+ * limitations under the License.
13+ */
14+ package io .trino .gateway .ha .config ;
15+
16+ public enum DataStoreBackend {
17+ ORACLE ,
18+ MYSQL ,
19+ POSTGRES ,
20+ H2
21+ }
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ public MySqlConfiguration getMySqlConfiguration()
111111 return mySqlConfiguration ;
112112 }
113113
114- public void setMysqlConfiguration (MySqlConfiguration mySqlConfig )
114+ public void setMySqlConfiguration (MySqlConfiguration mySqlConfig )
115115 {
116116 this .mySqlConfiguration = mySqlConfig ;
117117 }
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ public class HaGatewayConfiguration
4343 private List <String > statementPaths = ImmutableList .of (V1_STATEMENT_PATH );
4444 private boolean includeClusterHostInResponse ;
4545 private ProxyResponseConfiguration proxyResponseConfiguration = new ProxyResponseConfiguration ();
46- private boolean oracleBackend ;
4746
4847 private RequestAnalyzerConfig requestAnalyzerConfig = new RequestAnalyzerConfig ();
4948
@@ -298,14 +297,4 @@ public HaGatewayConfigurationException(String message)
298297 super (message );
299298 }
300299 }
301-
302- public boolean isOracleBackend ()
303- {
304- return oracleBackend ;
305- }
306-
307- public void setOracleBackend (boolean oracleBackend )
308- {
309- this .oracleBackend = oracleBackend ;
310- }
311300}
Original file line number Diff line number Diff line change 1414package io .trino .gateway .ha .router ;
1515
1616import io .trino .gateway .ha .config .DataStoreConfiguration ;
17- import io .trino .gateway .ha .config .HaGatewayConfiguration ;
1817import io .trino .gateway .ha .domain .response .DistributionResponse ;
1918import io .trino .gateway .ha .persistence .FlywayMigration ;
2019import io .trino .gateway .ha .persistence .JdbcConnectionManager ;
@@ -51,10 +50,7 @@ void setUp()
5150 true );
5251 FlywayMigration .migrate (config );
5352 JdbcConnectionManager jdbcConnectionManager = createTestingJdbcConnectionManager (container , config );
54- HaGatewayConfiguration haGatewayConfiguration = new HaGatewayConfiguration ();
55- haGatewayConfiguration .setDataStore (config );
56- haGatewayConfiguration .setOracleBackend (container .getJdbcUrl ().startsWith ("jdbc:oracle" ));
57- queryHistoryManager = new HaQueryHistoryManager (jdbcConnectionManager .getJdbi (), config );
53+ queryHistoryManager = new HaQueryHistoryManager (jdbcConnectionManager .getJdbi (), jdbcConnectionManager .getConfiguration ());
5854 }
5955
6056 @ AfterAll
You can’t perform that action at this time.
0 commit comments