There are null checks for unit tests when the coprocessor host is not loaded:
if (cpHost != null) {
// foo
}
// no...
So one option is to instantiate it on demand only after a CP is loaded.
Best regards,
- Andy
--- On Tue, 3/1/11, Stack <[email protected]> wrote:
> From: Stack <[email protected]>
> Subject: Coprocessor tax?
> To: "HBase Dev List" <[email protected]>
> Date: Tuesday, March 1, 2011, 11:51 AM
> So, I'm debugging something else but
> thread dumping I see a bunch of this:
>
>
> "IPC Server handler 6 on 61020" daemon prio=10
> tid=0x00000000422d2800
> nid=0x7714 runnable [0x00007f1c5acea000]
> java.lang.Thread.State: RUNNABLE
> at
> java.util.concurrent.locks.ReentrantReadWriteLock$Sync.fullTryAcquireShared(ReentrantReadWriteLock.java:434)
> at
> java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryAcquireShared(ReentrantReadWriteLock.java:404)
> at
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1260)
> at
> java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:594)
> at
> org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.prePut(RegionCoprocessorHost.java:532)
> at
> org.apache.hadoop.hbase.regionserver.HRegion.doMiniBatchPut(HRegion.java:1476)
> at
> org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:1454)
> at
> org.apache.hadoop.hbase.regionserver.HRegionServer.multi(HRegionServer.java:2652)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at
> java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:309)
> at
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1060)
>
>
> Do others? I don't have any CPs loaded. I'm
> wondering if we can do
> more to just avoid the CP codepath if no CPs loaded.
>
> St.Ack
>