HBASE-2941 reader threads for hbase rpc

Review Request #846 — Created Sept. 14, 2010 and submitted

ryanobjc
old-hbase
HBASE-2941
hbase
HBASE-2941 reader threads for hbase rpc


stack
  1. Looks good.  Do the RPC tests pass?  There are a few small things below.
  2. What happens now if key is not acceptable?
  3. Now we let the IE out?
  4. No need of the limit of ten anymore because pool is bounded?
  5. 
      
todd
  1. 
      
  2. do you not have to wait here until indication that the selector thread has woken up and is in the "wait" loop? I'm not 100% sure of the state preconditions for the NIO stuff
  3. 
      
ryanobjc
  1. 
      
  2. this seems to be some kind of coordinate hand off so that the reader gets notified immediately of new things to read.  
    
    this is mostly a straightforward port of the hadoop bug so i cant answer to the suitability of the design really... but it does work... reliably.
  3. Not really sure, i dont think it should be possible, since this thread will only have 'accept' bits set on the sockets... but this is just a straightforward port of the HADOOP bug.
  4. they used to accept up to 10 connections, then read from 1, then go back into the select loop.  
    
    now the listener thread only accepts 1, then passes that to another thread to do the reads, so it doesnt have to attempt to keep socket accept() delays down by accepting batches at a time.
  5. 
      
apurtell
  1. 
      
  2. This won't happen now?
  3. 
      
ryanobjc
  1. 
      
  2. The IE doesnt get thrown anymore, it was being thrown inside doRead() which we no longer call...
  3. 
      
apurtell
  1. 
      
  2. 
      
todd
  1. +1 from me too
  2. 
      
Loading...