Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么检查otsclient是否处于shutdown状态 #25

Open
zhonghongfly opened this issue Jun 18, 2021 · 2 comments
Open

怎么检查otsclient是否处于shutdown状态 #25

zhonghongfly opened this issue Jun 18, 2021 · 2 comments

Comments

@zhonghongfly
Copy link

java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED
at org.apache.http.util.Asserts.check(Asserts.java:46)
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.ensureRunning(CloseableHttpAsyncClientBase.java:90)
at org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:123)
at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:68)
at com.alicloud.openservices.tablestore.core.http.AsyncServiceClient.asyncSendRequest(AsyncServiceClient.java:150)
at com.alicloud.openservices.tablestore.core.OperationLauncher.asyncInvokePost(OperationLauncher.java:152)
at com.alicloud.openservices.tablestore.core.BatchGetRowLauncher.fire(BatchGetRowLauncher.java:63)
at com.alicloud.openservices.tablestore.InternalClient.batchGetRow(InternalClient.java:586)
at com.alicloud.openservices.tablestore.SyncClient.batchGetRow(SyncClient.java:273)

怎么检查otsclient是否处于shutdown状态???

@activeThomas
Copy link

java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED at org.apache.http.util.Asserts.check(Asserts.java:46) at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.ensureRunning(CloseableHttpAsyncClientBase.java:90) at org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:123) at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:68) at com.alicloud.openservices.tablestore.core.http.AsyncServiceClient.asyncSendRequest(AsyncServiceClient.java:150) at com.alicloud.openservices.tablestore.core.OperationLauncher.asyncInvokePost(OperationLauncher.java:152) at com.alicloud.openservices.tablestore.core.BatchGetRowLauncher.fire(BatchGetRowLauncher.java:63) at com.alicloud.openservices.tablestore.InternalClient.batchGetRow(InternalClient.java:586) at com.alicloud.openservices.tablestore.SyncClient.batchGetRow(SyncClient.java:273)

怎么检查otsclient是否处于shutdown状态???

这个问题解决了吗?

@zhonghongfly
Copy link
Author

java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED at org.apache.http.util.Asserts.check(Asserts.java:46) at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.ensureRunning(CloseableHttpAsyncClientBase.java:90) at org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:123) at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:68) at com.alicloud.openservices.tablestore.core.http.AsyncServiceClient.asyncSendRequest(AsyncServiceClient.java:150) at com.alicloud.openservices.tablestore.core.OperationLauncher.asyncInvokePost(OperationLauncher.java:152) at com.alicloud.openservices.tablestore.core.BatchGetRowLauncher.fire(BatchGetRowLauncher.java:63) at com.alicloud.openservices.tablestore.InternalClient.batchGetRow(InternalClient.java:586) at com.alicloud.openservices.tablestore.SyncClient.batchGetRow(SyncClient.java:273)

怎么检查otsclient是否处于shutdown状态???

这个问题解决了吗?

源码没有暴露方法来判断,目前的做法是每隔5s获取表结构信息,捕获异常,发生异常时,销毁连接,建立新的连接,最大限度保证业务可用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants