Skip to content

HBASE-28999 Return HTTP 503 when stateless scan REST endpoint is invoked on disabled table - #6520

Closed
PDavid wants to merge 3 commits into
apache:masterfrom
PDavid:HBASE-28999-rest-scan-disabled-table
Closed

HBASE-28999 Return HTTP 503 when stateless scan REST endpoint is invoked on disabled table#6520
PDavid wants to merge 3 commits into
apache:masterfrom
PDavid:HBASE-28999-rest-scan-disabled-table

Conversation

@PDavid

@PDavidPDavid commented Dec 4, 2024

Copy link
Copy Markdown
Contributor

Before this change it returned HTTP 500 Internal Server Error in this case.

@DefaultValue("false") @QueryParam(Constants.SCAN_INCLUDE_STOP_ROW) boolean includeStopRow) {
try {
if (servlet.getAdmin().isTableDisabled(TableName.valueOf(this.table))) {
throw new ServiceUnavailableException("Table disabled.");

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be completely honest I'm not 100% sure if this is the best way to solve this.
This newly created ServiceUnavailableException class extends IOException so that it will be caught and handled in the catch block below (also incrementing failed requests metrics).
What do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am worried that this explicit check may cause some extra network traffic.

Can we catch whatever exception HBase throws in this case, and process that ?

Also, the same check applies to most operations, so we should probably check this on all non-metadata endpoints.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for the feedback. 👍

Good point, performance is very important. I'll look into it.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked that the TableNotEnabledException is coming via TableScanResource.CellSetModelStream here: https://github.com/apache/hbase/blob/master/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableScanResource.java#L77

This code is actually called by JAXB / Jackson (for XML / JSON respectively).

The problem is that even if we catch the TableNotEnabledException in the Iterator.hasNext() implementation we cannot throw any checked Exceptions from there or return REST response.

Here is the full stacktrace:

2024-12-05T11:21:47,001 WARN [qtp485475507-43 {}] server.HttpChannel: handleException /test/* org.apache.hadoop.hbase.TableNotEnabledException: test
2024-12-05T11:21:47,001 WARN [qtp485475507-43 {}] server.HttpChannelState: unhandled due to prior sendError
javax.servlet.ServletException: java.io.UncheckedIOException: org.apache.hadoop.hbase.TableNotEnabledException: test
at org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:412) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:349) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:379) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:312) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hadoop.hbase.http.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:66) ~[hbase-http-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hadoop.hbase.http.ClickjackingPreventionFilter.doFilter(ClickjackingPreventionFilter.java:49) ~[hbase-http-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hadoop.hbase.rest.filter.GzipFilter.doFilter(GzipFilter.java:73) ~[hbase-rest-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.Server.handle(Server.java:516) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:137) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) ~[hbase-shaded-jetty-4.1.9.jar:?]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.io.UncheckedIOException: org.apache.hadoop.hbase.TableNotEnabledException: test
at org.apache.hadoop.hbase.client.ResultScanner$1.hasNext(ResultScanner.java:53) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.rest.TableScanResource$1$1.hasNext(TableScanResource.java:77) ~[hbase-rest-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at com.sun.xml.bind.v2.runtime.reflect.Lister$CollectionLister$1.hasNext(Lister.java:285) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:137) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:159) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:344) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:597) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:328) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:498) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:320) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:249) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:110) ~[jaxb-api-2.3.1.jar:2.3.0]
at org.apache.hbase.thirdparty.org.glassfish.jersey.jaxb.internal.AbstractRootElementJaxbProvider.writeTo(AbstractRootElementJaxbProvider.java:181) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.jaxb.internal.AbstractRootElementJaxbProvider.writeTo(AbstractRootElementJaxbProvider.java:160) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:242) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:227) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:85) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:61) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1116) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:649) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:380) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:370) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:259) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.internal.Errors.process(Errors.java:292) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.internal.Errors.process(Errors.java:274) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.internal.Errors.process(Errors.java:244) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:397) ~[hbase-shaded-jersey-4.1.9.jar:?]
... 45 more
Caused by: org.apache.hadoop.hbase.TableNotEnabledException: test
at java.lang.Thread.getStackTrace(Thread.java:1619) ~[?:?]
at org.apache.hadoop.hbase.util.FutureUtils.setStackTrace(FutureUtils.java:144) ~[hbase-common-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.util.FutureUtils.rethrow(FutureUtils.java:163) ~[hbase-common-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.client.AsyncTableResultScanner.next(AsyncTableResultScanner.java:173) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.client.ResultScanner$1.hasNext(ResultScanner.java:51) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.rest.TableScanResource$1$1.hasNext(TableScanResource.java:77) ~[hbase-rest-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at com.sun.xml.bind.v2.runtime.reflect.Lister$CollectionLister$1.hasNext(Lister.java:285) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:137) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:159) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:344) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:597) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:328) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:498) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:320) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:249) ~[jaxb-impl-2.2.3-1.jar:2.2.3]
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:110) ~[jaxb-api-2.3.1.jar:2.3.0]
at org.apache.hbase.thirdparty.org.glassfish.jersey.jaxb.internal.AbstractRootElementJaxbProvider.writeTo(AbstractRootElementJaxbProvider.java:181) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.jaxb.internal.AbstractRootElementJaxbProvider.writeTo(AbstractRootElementJaxbProvider.java:160) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:242) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:227) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:85) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:61) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1116) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:649) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:380) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:370) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:259) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.internal.Errors.process(Errors.java:292) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.internal.Errors.process(Errors.java:274) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.internal.Errors.process(Errors.java:244) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:397) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:349) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:379) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:312) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hadoop.hbase.http.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:66) ~[hbase-http-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hadoop.hbase.http.ClickjackingPreventionFilter.doFilter(ClickjackingPreventionFilter.java:49) ~[hbase-http-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hadoop.hbase.rest.filter.GzipFilter.doFilter(GzipFilter.java:73) ~[hbase-rest-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.Server.handle(Server.java:516) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:137) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) ~[hbase-shaded-jetty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) ~[hbase-shaded-jetty-4.1.9.jar:?]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
at --------Future.get--------(Unknown Source) ~[?:?]
at org.apache.hadoop.hbase.client.AsyncRpcRetryingCaller.lambda$onError$2(AsyncRpcRetryingCaller.java:206) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.util.FutureUtils.lambda$addListener$0(FutureUtils.java:71) ~[hbase-common-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863) ~[?:?]
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841) ~[?:?]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147) ~[?:?]
at org.apache.hadoop.hbase.client.RawAsyncHBaseAdmin.completeCheckTableState(RawAsyncHBaseAdmin.java:767) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.client.RawAsyncHBaseAdmin.lambda$isTableDisabled$40(RawAsyncHBaseAdmin.java:797) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.util.FutureUtils.lambda$addListener$0(FutureUtils.java:71) ~[hbase-common-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863) ~[?:?]
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841) ~[?:?]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147) ~[?:?]
at org.apache.hadoop.hbase.ClientMetaTableAccessor.lambda$getTableState$0(ClientMetaTableAccessor.java:96) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.util.FutureUtils.lambda$addListener$0(FutureUtils.java:71) ~[hbase-common-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863) ~[?:?]
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841) ~[?:?]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147) ~[?:?]
at org.apache.hadoop.hbase.client.AsyncSingleRequestRpcRetryingCaller.lambda$call$4(AsyncSingleRequestRpcRetryingCaller.java:92) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.util.FutureUtils.lambda$addListener$0(FutureUtils.java:71) ~[hbase-common-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863) ~[?:?]
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841) ~[?:?]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147) ~[?:?]
at org.apache.hadoop.hbase.client.ConnectionUtils$2.run(ConnectionUtils.java:628) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hbase.thirdparty.com.google.protobuf.RpcUtil$1.run(RpcUtil.java:56) ~[hbase-shaded-protobuf-4.1.9.jar:4.1.9]
at org.apache.hbase.thirdparty.com.google.protobuf.RpcUtil$1.run(RpcUtil.java:47) ~[hbase-shaded-protobuf-4.1.9.jar:4.1.9]
at org.apache.hadoop.hbase.ipc.AbstractRpcClient.onCallFinished(AbstractRpcClient.java:400) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.ipc.AbstractRpcClient$3.run(AbstractRpcClient.java:430) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.ipc.AbstractRpcClient$3.run(AbstractRpcClient.java:425) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.ipc.Call.callComplete(Call.java:117) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.ipc.Call.setResponse(Call.java:149) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.ipc.RpcConnection.finishCall(RpcConnection.java:396) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.ipc.RpcConnection.readResponse(RpcConnection.java:461) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.ipc.NettyRpcDuplexHandler.readResponse(NettyRpcDuplexHandler.java:125) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.ipc.NettyRpcDuplexHandler.channelRead(NettyRpcDuplexHandler.java:140) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[hbase-shaded-netty-4.1.9.jar:?]
at org.apache.hbase.thirdparty.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[hbase-shaded-netty-4.1.9.jar:?]
... 1 more

Do you maybe have any idea how to solve this? 🤔

@stotystotyDec 5, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other endpoints have this code for that:

I think that would work here as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course we should add a new case for the not enabled case to the exception handler.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for the suggestion but it will not work this particular case as the linked source is from the protobuf implementation which is very different: it uses the ProtobufStreamingOutput class and it does not uses the CellSetModelStream and that custom iterator implementation.

I did the change but the test will fail.

Here you can see why it will not work:

publicCellSetModelStreamget(final@ContextUriInfouriInfo) {
if (LOG.isTraceEnabled()) {
LOG.trace("GET " + uriInfo.getAbsolutePath());
}
servlet.getMetrics().incrementRequests(1);
try {
finalintrowsToSend = userRequestedLimit;
servlet.getMetrics().incrementSucessfulScanRequests(1);
finalIterator<Result> itr = results.iterator();
returnnewCellSetModelStream(newArrayList<RowModel>() {
@OverridepublicIterator<RowModel> iterator() {
returnnewIterator<RowModel>() {
intcount = rowsToSend;
@OverridepublicbooleanhasNext() {
returncount > 0 && itr.hasNext(); // <-- Exception is thrown here (JAXB / Jackson calls this later)
}
@OverridepublicRowModelnext() {
Resultrs = itr.next();
if ((rs == null) || (count <= 0)) {
returnnull;
}
RowModelrModel = RestUtil.createRowModelFromResult(rs);
count--;
if (count == 0) {
results.close();
}
returnrModel;
}
};
}
});
} catch (Exceptionexp) { // <-- Exception will not be caught here as "problematic" code is called later by JAXB / Jackson when serializing the responseservlet.getMetrics().incrementFailedScanRequests(1);
processException(exp);
LOG.warn(exp.toString(), exp);
returnnull;
}
}

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this Exception also happening in the protobuf case. There ProtobufStreamingOutput.write() is invoked by Jersey because it is using a streaming output feature

Caused by: org.apache.hadoop.hbase.TableNotEnabledException: test
at java.lang.Thread.getStackTrace(Thread.java:1619) ~[?:?]
at org.apache.hadoop.hbase.util.FutureUtils.setStackTrace(FutureUtils.java:144) ~[hbase-common-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.util.FutureUtils.rethrow(FutureUtils.java:163) ~[hbase-common-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.client.AsyncTableResultScanner.next(AsyncTableResultScanner.java:173) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.client.ResultScanner.next(ResultScanner.java:94) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hadoop.hbase.rest.ProtobufStreamingOutput.write(ProtobufStreamingOutput.java:65) ~[hbase-rest-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:55) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:37) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:242) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:227) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:85) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:61) ~[hbase-shaded-jersey-4.1.9.jar:?]
at org.apache.hbase.thirdparty.org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[hbase-shaded-jersey-4.1.9.jar:?]
...

@PDavidPDavid changed the title HBASE-28999 Return HTTP 503 when stateless scan REST endpoint is invo…HBASE-28999 Return HTTP 503 when stateless scan REST endpoint is invoked on disabled tableDec 4, 2024
@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@PDavid
PDavid marked this pull request as ready for review December 4, 2024 16:56
instead of eagerly checking if table is disabled. Reason: explicit check may cause some extra network traffic.
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 52sDocker mode activated.
-0 ⚠️yetus0m 4sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall2m 57smaster passed
+1 💚compile0m 28smaster passed
+1 💚javadoc0m 20smaster passed
+1 💚shadedjars5m 10sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚mvninstall2m 44sthe patch passed
+1 💚compile0m 21sthe patch passed
+1 💚javac0m 21sthe patch passed
+1 💚javadoc0m 17sthe patch passed
+1 💚shadedjars4m 50spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌unit3m 14s/patch-unit-hbase-rest.txthbase-rest in the patch failed.
22m 20s
SubsystemReport/Notes
DockerClientAPI=1.47 ServerAPI=1.47 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6520/2/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#6520
Optional Testsjavac javadoc unit compile shadedjars
unameLinux 4e15abc2586e 5.4.0-200-generic #220-Ubuntu SMP Fri Sep 27 13:19:16 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / cfb5623
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6520/2/testReport/
Max. process+thread count1853 (vs. ulimit of 30000)
modulesC: hbase-rest U: hbase-rest
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6520/2/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 24sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
_ master Compile Tests _
+1 💚mvninstall3m 29smaster passed
+1 💚compile0m 43smaster passed
+1 💚checkstyle0m 12smaster passed
+1 💚spotbugs0m 46smaster passed
+1 💚spotless0m 57sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚mvninstall3m 10sthe patch passed
+1 💚compile0m 38sthe patch passed
+1 💚javac0m 38sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 11sthe patch passed
+1 💚spotbugs0m 56sthe patch passed
+1 💚hadoopcheck11m 17sPatch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚spotless0m 50spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 11sThe patch does not generate ASF License warnings.
30m 36s
SubsystemReport/Notes
DockerClientAPI=1.47 ServerAPI=1.47 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6520/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#6520
Optional Testsdupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
unameLinux af01ddc7089f 5.4.0-200-generic #220-Ubuntu SMP Fri Sep 27 13:19:16 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / cfb5623
Default JavaEclipse Adoptium-17.0.11+9
Max. process+thread count85 (vs. ulimit of 30000)
modulesC: hbase-rest U: hbase-rest
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6520/2/console
versionsgit=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@stoty

stoty commented Dec 6, 2024

Copy link
Copy Markdown
Contributor

I don't have a solution.

Maybe we should just leave this be, and trade a good error message off for performance.

@PDavid

Copy link
Copy Markdown
ContributorAuthor

I don't have a solution.

Maybe we should just leave this be, and trade a good error message off for performance.

Many thanks. I agree. Then I'll close this PR.

@PDavidPDavid closed this Dec 6, 2024
@PDavid
PDavid deleted the HBASE-28999-rest-scan-disabled-table branch March 10, 2025 12:29
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@PDavid@Apache-HBase@stoty