szlta commented on issue #5371:
URL: https://github.com/apache/iceberg/issues/5371#issuecomment-1199900780
Hm I still don't think this is the full picture of what's happening. In
light of the stack trace above...
```
java.lang.IllegalStateException: Cannot get a client from a closed pool
at
org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkState(Preconditions.java:502)
at org.apache.iceberg.ClientPoolImpl.get(ClientPoolImpl.java:118)
at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:56)
at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:51)
at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:76)
at
org.apache.iceberg.hive.HiveTableOperations.doRefresh(HiveTableOperations.java:203)
...
```
... this is how I think things happened:
- inside `HiveTableOperations.doRefresh()` we wanted to do a `getTable()`
call on HMS
- so we invoked `CachedClientPool.run`
- this has called `clientPool()` first to get an instance of the
appropriate ClientPoolImpl instance, which in this case is a HiveClientPool
object
- this calls `get()` on the `clientPoolCache`, which either creates a
new instance or returns a used one, but either way the **clock is reset at this
point** (this part is not visible in the stacktrace but should have already
happened quite recently)
- right after we have the instance, we invoke `run()` (and its overloaded
`run()` right after)
- which calls `get()` to get one Client from the ClientPool
And this is where the exception happens stating that the whole pool is
closed already..
We didn't event get to start working on the Hive operation, we just got
`HiveClientPool (ClientPoolImpl)` from the `clientPoolCache` with clock reset
on it and attempted to get one `Client` from it, but it was already closed
between these couple of frames.
Perhaps somebody else closed this HiveClientPool, and it was stored in this
closed state within the cache, or there's a problem with the cache
implementation?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]