xushiyan commented on code in PR #5064:
URL: https://github.com/apache/hudi/pull/5064#discussion_r1055289640
##########
packaging/hudi-spark-bundle/pom.xml:
##########
@@ -441,5 +441,35 @@
<spark.bundle.hive.shade.prefix>org.apache.hudi.</spark.bundle.hive.shade.prefix>
</properties>
</profile>
+ <profile>
+ <id>hudi-platform-service</id>
Review Comment:
should this also be added to flink bundle?
##########
hudi-platform-service/hudi-metaserver/hudi-metaserver-client/src/main/java/org/apache/hudi/metaserver/client/HoodieMetaserverClientImp.java:
##########
@@ -61,7 +62,12 @@ public HoodieMetaserverClientImp(HoodieMetaserverConfig
config) {
this.retryDelaySeconds = config.getConnectionRetryDelay();
String uri = config.getMetaserverUris();
if (isLocalEmbeddedMetaserver(uri)) {
- this.client = HoodieMetaserver.getEmbeddedMetaserver();
+ try {
+ Method method =
Class.forName("org.apache.hudi.metaserver.HoodieMetaserver").getMethod("getEmbeddedMetaserver",
new Class[]{});
+ this.client = (ThriftHoodieMetaserver.Iface) method.invoke(null, new
Object[]{});
+ } catch (ClassNotFoundException | NoSuchMethodException |
InvocationTargetException | IllegalAccessException e) {
+ throw new HoodieException("Please check the server uri has ever been
set. Empty uri is used for local unit test", e);
+ }
Review Comment:
see how can we move this into a helper in
org.apache.hudi.common.util.ReflectionUtils so we don't have so many exceptions
to catch
--
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]