[HUDI-8901] Fix Timeline Server to process requests from multiple storage lakes #12696
+46
−76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Logs
Timeline server currently caches the hoodie storage which it further uses to process all the requests. When reuse timeline server is enabled, same timeline server can be used by different streams. If two streams are from two different lakes(or buckets) this would fail.
{ "exception": { "stacktrace": "java.lang.IllegalArgumentException: Wrong FS s3a:\/\/lake1\/\/kwcommunity_default\/hudi_slack_channelmembers\/v1\/.hoodie\/.temp\/20250122111902624 -expected s3a:\/\/<lake2>l\n\tat org.apache.hadoop.fs.s3native.S3xLoginHelper.checkPath(S3xLoginHelper.java:224)\n\tat org.apache.hadoop.fs.s3a.S3AFileSystem.checkPath(S3AFileSystem.java:1155)\n\tat org.apache.hadoop.fs.FileSystem.makeQualified(FileSystem.java:666)\n\tat org.apache.hadoop.fs.s3a.S3AFileSystem.makeQualified(S3AFileSystem.java:1117)\n\tat org.apache.hadoop.fs.s3a.S3AFileSystem.qualify(S3AFileSystem.java:1143)\n\tat org.apache.hadoop.fs.s3a.S3AFileSystem.innerGetFileStatus(S3AFileSystem.java:3078)\n\tat org.apache.hadoop.fs.s3a.S3AFileSystem.getFileStatus(S3AFileSystem.java:3053)\n\tat org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1760)\n\tat org.apache.hadoop.fs.s3a.S3AFileSystem.exists(S3AFileSystem.java:4263)\n\tat org.apache.hudi.common.util.MarkerUtils.readTimelineServerBasedMarkersFromFileSystem(MarkerUtils.java:188)\n\tat org.apache.hudi.timeline.service.handlers.marker.MarkerDirState.syncMarkersFromFileSystem(MarkerDirState.java:285)\n\tat org.apache.hudi.timeline.service.handlers.marker.MarkerDirState.<init>(MarkerDirState.java:108)\n\tat org.apache.hudi.timeline.service.handlers.MarkerHandler.getMarkerDirState(MarkerHandler.java:305)\n\tat org.apache.hudi.timeline.service.handlers.MarkerHandler.doesMarkerDirExist(MarkerHandler.java:180)\n\tat org.apache.hudi.timeline.service.RequestHandler.lambda$registerMarkerAPI$80(RequestHandler.java:551)\n\tat org.apache.hudi.timeline.service.RequestHandler$ViewHandler.handle(RequestHandler.java:615)\n\tat io.javalin.core.security.SecurityUtil.noopAccessManager(SecurityUtil.kt:20)\n\tat io.javalin.http.JavalinServlet.addHandler$lambda-0(JavalinServlet.kt:96)\n\tat io.javalin.http.JavalinServlet$lifecycle$2$1$1.invoke(JavalinServlet.kt:43)\n\tat io.javalin.http.JavalinServlet$lifecycle$2$1$1.invoke(JavalinServlet.kt:43)\n\tat io.javalin.http.JavalinServletHandler.executeNextTask(JavalinServletHandler.kt:99)\n\tat io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$lambda-1(JavalinServletHandler.kt:85)\n\tat java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:995)\n\tat java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2137)\n\tat io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$javalin(JavalinServletHandler.kt:85)\n\tat io.javalin.http.JavalinServlet.service(JavalinServlet.kt:89)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:590)\n\tat io.javalin.jetty.JavalinJettyServlet.service(JavalinJettyServlet.kt:58)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:590)\n\tat org.apache.hudi.org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)\n\tat org.apache.hudi.org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554)\n\tat org.apache.hudi.org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)\n\tat org.apache.hudi.org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)\n\tat org.apache.hudi.org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)\n\tat io.javalin.jetty.JettyServer$start$wsAndHttpHandler$1.doHandle(JettyServer.kt:52)\n\tat org.apache.hudi.org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)\n\tat org.apache.hudi.org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)\n\tat org.apache.hudi.org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)\n\tat org.apache.hudi.org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)\n\tat org.apache.hudi.org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)\n\tat org.apache.hudi.org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat org.apache.hudi.org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat org.apache.hudi.org.eclipse.jetty.server.Server.handle(Server.java:516)\n\tat org.apache.hudi.org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)\n\tat org.apache.hudi.org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)\n\tat org.apache.hudi.org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)\n\tat org.apache.hudi.org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)\n\tat org.apache.hudi.org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)\n\tat org.apache.hudi.org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)\n\tat org.apache.hudi.org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)\n\tat org.apache.hudi.org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)\n\tat org.apache.hudi.org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)\n\tat org.apache.hudi.org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)\n\tat org.apache.hudi.org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)\n\tat org.apache.hudi.org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)\n\tat org.apache.hudi.org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)\n\tat
Impact
For createMarker and deleteMarkers apis, we'll be building HoodieStorage object per call.
Risk level (write none, low medium or high below)
low
Contributor's checklist