abhishekagarwal87 commented on code in PR #15408:
URL: https://github.com/apache/druid/pull/15408#discussion_r1429896610
##########
extensions-core/mysql-metadata-storage/pom.xml:
##########
@@ -48,8 +48,8 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
+ <groupId>com.mysql</groupId>
+ <artifactId>mysql-connector-j</artifactId>
<version>${mysql.version}</version>
Review Comment:
indentation needs to be fixed.
##########
extensions-core/mysql-metadata-storage/src/test/java/org/apache/druid/metadata/storage/mysql/MySQLConnectorTest.java:
##########
@@ -57,16 +56,16 @@ public void testIsExceptionTransientMySql()
new MySQLConnectorSslConfig(),
MYSQL_DRIVER_CONFIG
);
- Assert.assertTrue(connector.connectorIsTransientException(new
MySQLTransientException()));
- Assert.assertTrue(connector.connectorIsTransientException(new
MySQLTransactionRollbackException()));
+ Assert.assertTrue(connector.connectorIsTransientException(new
SQLTransientException()));
+ Assert.assertTrue(connector.connectorIsTransientException(new
SQLTransactionRollbackException()));
Assert.assertTrue(
connector.connectorIsTransientException(new SQLException("some
transient failure", "s0", 1317))
);
Assert.assertFalse(
connector.connectorIsTransientException(new SQLException("totally
realistic test data", "s0", 1337))
);
// this method does not specially handle normal transient exceptions
either, since it is not vendor specific
Review Comment:
this comment needs to be removed.
##########
extensions-core/lookups-cached-global/src/test/java/org/apache/druid/query/lookup/namespace/JdbcExtractionNamespaceUrlCheckTest.java:
##########
@@ -159,46 +159,6 @@ public boolean isEnforceAllowedProperties()
}
);
}
-
- @Test
- public void testWhenInvalidUrlFormat()
Review Comment:
is this no longer an invalid url format?
##########
processing/src/main/java/org/apache/druid/utils/ConnectionUriUtils.java:
##########
@@ -177,21 +182,75 @@ public static Set<String>
tryParsePostgresConnectionUri(String connectionUri)
}
public static Set<String> tryParseMySqlConnectionUri(String connectionUri)
- throws ClassNotFoundException, NoSuchMethodException,
InstantiationException, IllegalAccessException,
+ throws ClassNotFoundException, NoSuchMethodException,
IllegalAccessException,
InvocationTargetException
{
- Class<?> driverClass = Class.forName(MYSQL_NON_REGISTERING_DRIVER);
- Method parseUrl = driverClass.getMethod("parseURL", String.class,
Properties.class);
- // almost the same as postgres, but is an instance level method
- Properties properties = (Properties) parseUrl.invoke(
- driverClass.getConstructor().newInstance(),
- connectionUri,
- null
- );
+ Class<?> connectionUrlClass = Class.forName(MYSQL_CONNECTION_URL);
Review Comment:
can you describe your logic in a bit more detail?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]