Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
Tried using run() method call of https://github.com/apache/hbase/blob/master/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/MultiThreadedClientExample.java Following the stack trace of error during runtime
Exception in thread "main" java.io.IOException: java.lang.reflect.UndeclaredThrowableException at org.apache.hadoop.hbase.client.ConnectionFactory.lambda$createConnection$1(ConnectionFactory.java:235) at org.apache.hadoop.hbase.trace.TraceUtil.trace(TraceUtil.java:216) at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:218) at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:160) at org.apache.hadoop.hbase.client.example.MultiThreadedClientExample.run(MultiThreadedClientExample.java:136) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90) at <classname>.runMultiThreadedRWOps(xxxxxx) at <classname>.main(xxxxxx) Caused by: java.lang.reflect.UndeclaredThrowableException at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1780) at org.apache.hadoop.hbase.security.User$SecureHadoopUser.runAs(User.java:328) at org.apache.hadoop.hbase.client.ConnectionFactory.lambda$createConnection$1(ConnectionFactory.java:232) ... 8 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedConstructorAccessor16.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.hadoop.hbase.client.ConnectionFactory.lambda$null$0(ConnectionFactory.java:233) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1762) ... 10 more Caused by: java.lang.ClassCastException: java.util.concurrent.ForkJoinPool cannot be cast to java.util.concurrent.ThreadPoolExecutor at org.apache.hadoop.hbase.client.ConnectionImplementation.<init>(ConnectionImplementation.java:283) at org.apache.hadoop.hbase.client.ConnectionImplementation.<init>(ConnectionImplementation.java:270) ... 17 more
Reason: due to HBASE-22244 Make use of MetricsConnection in async client following changes
// thread executor shared by all Table instances created // by this connection private volatile ExecutorService batchPool = null; got modified to private volatile ThreadPoolExecutor batchPool = null;
ExecutorService got changed to ThreadPoolExecutor. ExecutorService is compatible with ForkJoinPool however ThreadPoolExecutor is not compatible.
Attachments
Issue Links
- is superceded by
-
HBASE-28035 ConnectionFactory.createConnection does not work with anything except ThreadPoolExecutor
- Open
- relates to
-
HBASE-22244 Make use of MetricsConnection in async client
- Closed
- links to