aliyun-tablestore-java-sdk
aliyun-tablestore-java-sdk copied to clipboard
怎么检查otsclient是否处于shutdown状态
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状态???
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状态???
这个问题解决了吗?
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获取表结构信息,捕获异常,发生异常时,销毁连接,建立新的连接,最大限度保证业务可用