minihippo commented on code in PR #5064:
URL: https://github.com/apache/hudi/pull/5064#discussion_r1057021398


##########
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:
   fix
   



-- 
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]

Reply via email to