the-other-tim-brown commented on code in PR #10122:
URL: https://github.com/apache/hudi/pull/10122#discussion_r1397381007
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/embedded/EmbeddedTimelineServerHelper.java:
##########
@@ -23,66 +23,42 @@
import org.apache.hudi.common.util.Option;
import org.apache.hudi.config.HoodieWriteConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import java.io.IOException;
/**
* Helper class to instantiate embedded timeline service.
*/
public class EmbeddedTimelineServerHelper {
- private static final Logger LOG =
LoggerFactory.getLogger(EmbeddedTimelineService.class);
-
- private static Option<EmbeddedTimelineService> TIMELINE_SERVER =
Option.empty();
-
/**
* Instantiate Embedded Timeline Server.
* @param context Hoodie Engine Context
* @param config Hoodie Write Config
* @return TimelineServer if configured to run
* @throws IOException
*/
- public static synchronized Option<EmbeddedTimelineService>
createEmbeddedTimelineService(
+ public static Option<EmbeddedTimelineService> createEmbeddedTimelineService(
HoodieEngineContext context, HoodieWriteConfig config) throws
IOException {
- if (config.isEmbeddedTimelineServerReuseEnabled()) {
- if (!TIMELINE_SERVER.isPresent() ||
!TIMELINE_SERVER.get().canReuseFor(config.getBasePath())) {
- TIMELINE_SERVER = Option.of(startTimelineService(context, config));
- } else {
- updateWriteConfigWithTimelineServer(TIMELINE_SERVER.get(), config);
- }
- return TIMELINE_SERVER;
- }
if (config.isEmbeddedTimelineServerEnabled()) {
- return Option.of(startTimelineService(context, config));
+ Option<String> hostAddr =
context.getProperty(EngineProperty.EMBEDDED_SERVER_HOST);
+ EmbeddedTimelineService timelineService =
EmbeddedTimelineService.getOrStartEmbeddedTimelineService(context,
hostAddr.orElse(null), config);
+ updateWriteConfigWithTimelineServer(timelineService, config);
Review Comment:
Yes, there is a
[MultiTable](https://github.com/apache/hudi/blob/master/hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/HoodieMultiTableStreamer.java)
version of the streamer.
--
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]