http://git-wip-us.apache.org/repos/asf/hbase-site/blob/39cf5e9b/devapidocs/src-html/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.html
----------------------------------------------------------------------
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.html
new file mode 100644
index 0000000..5d603c1
--- /dev/null
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.html
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<html lang="en">
+<head>
+<title>Source code</title>
+<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" 
title="Style">
+</head>
+<body>
+<div class="sourceContainer">
+<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a>
+<span class="sourceLineNo">002</span> *<a name="line.2"></a>
+<span class="sourceLineNo">003</span> * Licensed to the Apache Software 
Foundation (ASF) under one<a name="line.3"></a>
+<span class="sourceLineNo">004</span> * or more contributor license 
agreements.  See the NOTICE file<a name="line.4"></a>
+<span class="sourceLineNo">005</span> * distributed with this work for 
additional information<a name="line.5"></a>
+<span class="sourceLineNo">006</span> * regarding copyright ownership.  The 
ASF licenses this file<a name="line.6"></a>
+<span class="sourceLineNo">007</span> * to you under the Apache License, 
Version 2.0 (the<a name="line.7"></a>
+<span class="sourceLineNo">008</span> * "License"); you may not use this file 
except in compliance<a name="line.8"></a>
+<span class="sourceLineNo">009</span> * with the License.  You may obtain a 
copy of the License at<a name="line.9"></a>
+<span class="sourceLineNo">010</span> *<a name="line.10"></a>
+<span class="sourceLineNo">011</span> *     
http://www.apache.org/licenses/LICENSE-2.0<a name="line.11"></a>
+<span class="sourceLineNo">012</span> *<a name="line.12"></a>
+<span class="sourceLineNo">013</span> * Unless required by applicable law or 
agreed to in writing, software<a name="line.13"></a>
+<span class="sourceLineNo">014</span> * distributed under the License is 
distributed on an "AS IS" BASIS,<a name="line.14"></a>
+<span class="sourceLineNo">015</span> * WITHOUT WARRANTIES OR CONDITIONS OF 
ANY KIND, either express or implied.<a name="line.15"></a>
+<span class="sourceLineNo">016</span> * See the License for the specific 
language governing permissions and<a name="line.16"></a>
+<span class="sourceLineNo">017</span> * limitations under the License.<a 
name="line.17"></a>
+<span class="sourceLineNo">018</span> */<a name="line.18"></a>
+<span class="sourceLineNo">019</span><a name="line.19"></a>
+<span class="sourceLineNo">020</span>package 
org.apache.hadoop.hbase.exceptions;<a name="line.20"></a>
+<span class="sourceLineNo">021</span><a name="line.21"></a>
+<span class="sourceLineNo">022</span>import 
org.apache.hadoop.hbase.CallQueueTooBigException;<a name="line.22"></a>
+<span class="sourceLineNo">023</span>import 
org.apache.hadoop.hbase.MultiActionResultTooLarge;<a name="line.23"></a>
+<span class="sourceLineNo">024</span>import 
org.apache.hadoop.hbase.RegionTooBusyException;<a name="line.24"></a>
+<span class="sourceLineNo">025</span>import 
org.apache.hadoop.hbase.RetryImmediatelyException;<a name="line.25"></a>
+<span class="sourceLineNo">026</span>import 
org.apache.hadoop.hbase.classification.InterfaceAudience;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import 
org.apache.hadoop.hbase.classification.InterfaceStability;<a name="line.27"></a>
+<span class="sourceLineNo">028</span>import 
org.apache.hadoop.hbase.quotas.ThrottlingException;<a name="line.28"></a>
+<span class="sourceLineNo">029</span>import 
org.apache.hadoop.ipc.RemoteException;<a name="line.29"></a>
+<span class="sourceLineNo">030</span><a name="line.30"></a>
+<span class="sourceLineNo">031</span>@InterfaceAudience.Private<a 
name="line.31"></a>
+<span class="sourceLineNo">032</span>@InterfaceStability.Evolving<a 
name="line.32"></a>
+<span class="sourceLineNo">033</span>public final class ClientExceptionsUtil 
{<a name="line.33"></a>
+<span class="sourceLineNo">034</span><a name="line.34"></a>
+<span class="sourceLineNo">035</span>  private ClientExceptionsUtil() {}<a 
name="line.35"></a>
+<span class="sourceLineNo">036</span><a name="line.36"></a>
+<span class="sourceLineNo">037</span>  public static boolean 
isMetaClearingException(Throwable cur) {<a name="line.37"></a>
+<span class="sourceLineNo">038</span>    cur = findException(cur);<a 
name="line.38"></a>
+<span class="sourceLineNo">039</span><a name="line.39"></a>
+<span class="sourceLineNo">040</span>    if (cur == null) {<a 
name="line.40"></a>
+<span class="sourceLineNo">041</span>      return true;<a name="line.41"></a>
+<span class="sourceLineNo">042</span>    }<a name="line.42"></a>
+<span class="sourceLineNo">043</span>    return !isSpecialException(cur) || 
(cur instanceof RegionMovedException);<a name="line.43"></a>
+<span class="sourceLineNo">044</span>  }<a name="line.44"></a>
+<span class="sourceLineNo">045</span><a name="line.45"></a>
+<span class="sourceLineNo">046</span>  public static boolean 
isSpecialException(Throwable cur) {<a name="line.46"></a>
+<span class="sourceLineNo">047</span>    return (cur instanceof 
RegionMovedException || cur instanceof RegionOpeningException<a 
name="line.47"></a>
+<span class="sourceLineNo">048</span>        || cur instanceof 
RegionTooBusyException || cur instanceof ThrottlingException<a 
name="line.48"></a>
+<span class="sourceLineNo">049</span>        || cur instanceof 
MultiActionResultTooLarge || cur instanceof RetryImmediatelyException<a 
name="line.49"></a>
+<span class="sourceLineNo">050</span>        || cur instanceof 
CallQueueTooBigException);<a name="line.50"></a>
+<span class="sourceLineNo">051</span>  }<a name="line.51"></a>
+<span class="sourceLineNo">052</span><a name="line.52"></a>
+<span class="sourceLineNo">053</span><a name="line.53"></a>
+<span class="sourceLineNo">054</span>  /**<a name="line.54"></a>
+<span class="sourceLineNo">055</span>   * Look for an exception we know in the 
remote exception:<a name="line.55"></a>
+<span class="sourceLineNo">056</span>   * - hadoop.ipc wrapped exceptions<a 
name="line.56"></a>
+<span class="sourceLineNo">057</span>   * - nested exceptions<a 
name="line.57"></a>
+<span class="sourceLineNo">058</span>   *<a name="line.58"></a>
+<span class="sourceLineNo">059</span>   * Looks for: RegionMovedException / 
RegionOpeningException / RegionTooBusyException /<a name="line.59"></a>
+<span class="sourceLineNo">060</span>   *            ThrottlingException<a 
name="line.60"></a>
+<span class="sourceLineNo">061</span>   * @return null if we didn't find the 
exception, the exception otherwise.<a name="line.61"></a>
+<span class="sourceLineNo">062</span>   */<a name="line.62"></a>
+<span class="sourceLineNo">063</span>  public static Throwable 
findException(Object exception) {<a name="line.63"></a>
+<span class="sourceLineNo">064</span>    if (exception == null || !(exception 
instanceof Throwable)) {<a name="line.64"></a>
+<span class="sourceLineNo">065</span>      return null;<a name="line.65"></a>
+<span class="sourceLineNo">066</span>    }<a name="line.66"></a>
+<span class="sourceLineNo">067</span>    Throwable cur = (Throwable) 
exception;<a name="line.67"></a>
+<span class="sourceLineNo">068</span>    while (cur != null) {<a 
name="line.68"></a>
+<span class="sourceLineNo">069</span>      if (isSpecialException(cur)) {<a 
name="line.69"></a>
+<span class="sourceLineNo">070</span>        return cur;<a name="line.70"></a>
+<span class="sourceLineNo">071</span>      }<a name="line.71"></a>
+<span class="sourceLineNo">072</span>      if (cur instanceof RemoteException) 
{<a name="line.72"></a>
+<span class="sourceLineNo">073</span>        RemoteException re = 
(RemoteException) cur;<a name="line.73"></a>
+<span class="sourceLineNo">074</span>        cur = re.unwrapRemoteException(<a 
name="line.74"></a>
+<span class="sourceLineNo">075</span>            RegionOpeningException.class, 
RegionMovedException.class,<a name="line.75"></a>
+<span class="sourceLineNo">076</span>            
RegionTooBusyException.class);<a name="line.76"></a>
+<span class="sourceLineNo">077</span>        if (cur == null) {<a 
name="line.77"></a>
+<span class="sourceLineNo">078</span>          cur = 
re.unwrapRemoteException();<a name="line.78"></a>
+<span class="sourceLineNo">079</span>        }<a name="line.79"></a>
+<span class="sourceLineNo">080</span>        // unwrapRemoteException can 
return the exception given as a parameter when it cannot<a name="line.80"></a>
+<span class="sourceLineNo">081</span>        //  unwrap it. In this case, 
there is no need to look further<a name="line.81"></a>
+<span class="sourceLineNo">082</span>        // noinspection ObjectEquality<a 
name="line.82"></a>
+<span class="sourceLineNo">083</span>        if (cur == re) {<a 
name="line.83"></a>
+<span class="sourceLineNo">084</span>          return cur;<a 
name="line.84"></a>
+<span class="sourceLineNo">085</span>        }<a name="line.85"></a>
+<span class="sourceLineNo">086</span>      } else if (cur.getCause() != null) 
{<a name="line.86"></a>
+<span class="sourceLineNo">087</span>        cur = cur.getCause();<a 
name="line.87"></a>
+<span class="sourceLineNo">088</span>      } else {<a name="line.88"></a>
+<span class="sourceLineNo">089</span>        return cur;<a name="line.89"></a>
+<span class="sourceLineNo">090</span>      }<a name="line.90"></a>
+<span class="sourceLineNo">091</span>    }<a name="line.91"></a>
+<span class="sourceLineNo">092</span><a name="line.92"></a>
+<span class="sourceLineNo">093</span>    return null;<a name="line.93"></a>
+<span class="sourceLineNo">094</span>  }<a name="line.94"></a>
+<span class="sourceLineNo">095</span>}<a name="line.95"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</pre>
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/39cf5e9b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/BalancedQueueRpcExecutor.html
----------------------------------------------------------------------
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/BalancedQueueRpcExecutor.html 
b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/BalancedQueueRpcExecutor.html
index d4dd41e..9cc5117 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/BalancedQueueRpcExecutor.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/BalancedQueueRpcExecutor.html
@@ -80,9 +80,9 @@
 <span class="sourceLineNo">072</span>  }<a name="line.72"></a>
 <span class="sourceLineNo">073</span><a name="line.73"></a>
 <span class="sourceLineNo">074</span>  @Override<a name="line.74"></a>
-<span class="sourceLineNo">075</span>  public void dispatch(final CallRunner 
callTask) throws InterruptedException {<a name="line.75"></a>
+<span class="sourceLineNo">075</span>  public boolean dispatch(final 
CallRunner callTask) throws InterruptedException {<a name="line.75"></a>
 <span class="sourceLineNo">076</span>    int queueIndex = 
balancer.getNextQueue();<a name="line.76"></a>
-<span class="sourceLineNo">077</span>    
queues.get(queueIndex).put(callTask);<a name="line.77"></a>
+<span class="sourceLineNo">077</span>    return 
queues.get(queueIndex).offer(callTask);<a name="line.77"></a>
 <span class="sourceLineNo">078</span>  }<a name="line.78"></a>
 <span class="sourceLineNo">079</span><a name="line.79"></a>
 <span class="sourceLineNo">080</span>  @Override<a name="line.80"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/39cf5e9b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.html
----------------------------------------------------------------------
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.html 
b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.html
index 190e423..b7a5179 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.html
@@ -32,77 +32,87 @@
 <span class="sourceLineNo">024</span>import 
java.util.concurrent.ArrayBlockingQueue;<a name="line.24"></a>
 <span class="sourceLineNo">025</span>import 
java.util.concurrent.ThreadPoolExecutor;<a name="line.25"></a>
 <span class="sourceLineNo">026</span>import java.util.concurrent.TimeUnit;<a 
name="line.26"></a>
-<span class="sourceLineNo">027</span><a name="line.27"></a>
-<span class="sourceLineNo">028</span>/**<a name="line.28"></a>
-<span class="sourceLineNo">029</span> * A very simple {@code }RpcScheduler} 
that serves incoming requests in order.<a name="line.29"></a>
-<span class="sourceLineNo">030</span> *<a name="line.30"></a>
-<span class="sourceLineNo">031</span> * This can be used for HMaster, where no 
prioritization is needed.<a name="line.31"></a>
-<span class="sourceLineNo">032</span> */<a name="line.32"></a>
-<span class="sourceLineNo">033</span>public class FifoRpcScheduler extends 
RpcScheduler {<a name="line.33"></a>
-<span class="sourceLineNo">034</span><a name="line.34"></a>
-<span class="sourceLineNo">035</span>  private final int handlerCount;<a 
name="line.35"></a>
-<span class="sourceLineNo">036</span>  private final int maxQueueLength;<a 
name="line.36"></a>
-<span class="sourceLineNo">037</span>  private ThreadPoolExecutor executor;<a 
name="line.37"></a>
-<span class="sourceLineNo">038</span><a name="line.38"></a>
-<span class="sourceLineNo">039</span>  public FifoRpcScheduler(Configuration 
conf, int handlerCount) {<a name="line.39"></a>
-<span class="sourceLineNo">040</span>    this.handlerCount = handlerCount;<a 
name="line.40"></a>
-<span class="sourceLineNo">041</span>    this.maxQueueLength = 
conf.getInt("hbase.ipc.server.max.callqueue.length",<a name="line.41"></a>
-<span class="sourceLineNo">042</span>        handlerCount * 
RpcServer.DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER);<a name="line.42"></a>
-<span class="sourceLineNo">043</span>  }<a name="line.43"></a>
-<span class="sourceLineNo">044</span><a name="line.44"></a>
-<span class="sourceLineNo">045</span>  @Override<a name="line.45"></a>
-<span class="sourceLineNo">046</span>  public void init(Context context) {<a 
name="line.46"></a>
-<span class="sourceLineNo">047</span>    // no-op<a name="line.47"></a>
-<span class="sourceLineNo">048</span>  }<a name="line.48"></a>
-<span class="sourceLineNo">049</span><a name="line.49"></a>
-<span class="sourceLineNo">050</span>  @Override<a name="line.50"></a>
-<span class="sourceLineNo">051</span>  public void start() {<a 
name="line.51"></a>
-<span class="sourceLineNo">052</span>    this.executor = new 
ThreadPoolExecutor(<a name="line.52"></a>
-<span class="sourceLineNo">053</span>        handlerCount,<a 
name="line.53"></a>
-<span class="sourceLineNo">054</span>        handlerCount,<a 
name="line.54"></a>
-<span class="sourceLineNo">055</span>        60,<a name="line.55"></a>
-<span class="sourceLineNo">056</span>        TimeUnit.SECONDS,<a 
name="line.56"></a>
-<span class="sourceLineNo">057</span>        new 
ArrayBlockingQueue&lt;Runnable&gt;(maxQueueLength),<a name="line.57"></a>
-<span class="sourceLineNo">058</span>        new 
DaemonThreadFactory("FifoRpcScheduler.handler"),<a name="line.58"></a>
-<span class="sourceLineNo">059</span>        new 
ThreadPoolExecutor.CallerRunsPolicy());<a name="line.59"></a>
-<span class="sourceLineNo">060</span>  }<a name="line.60"></a>
-<span class="sourceLineNo">061</span><a name="line.61"></a>
-<span class="sourceLineNo">062</span>  @Override<a name="line.62"></a>
-<span class="sourceLineNo">063</span>  public void stop() {<a 
name="line.63"></a>
-<span class="sourceLineNo">064</span>    this.executor.shutdown();<a 
name="line.64"></a>
-<span class="sourceLineNo">065</span>  }<a name="line.65"></a>
-<span class="sourceLineNo">066</span><a name="line.66"></a>
-<span class="sourceLineNo">067</span>  @Override<a name="line.67"></a>
-<span class="sourceLineNo">068</span>  public void dispatch(final CallRunner 
task) throws IOException, InterruptedException {<a name="line.68"></a>
-<span class="sourceLineNo">069</span>    executor.submit(new Runnable() {<a 
name="line.69"></a>
-<span class="sourceLineNo">070</span>      @Override<a name="line.70"></a>
-<span class="sourceLineNo">071</span>      public void run() {<a 
name="line.71"></a>
-<span class="sourceLineNo">072</span>        
task.setStatus(RpcServer.getStatus());<a name="line.72"></a>
-<span class="sourceLineNo">073</span>        task.run();<a name="line.73"></a>
-<span class="sourceLineNo">074</span>      }<a name="line.74"></a>
-<span class="sourceLineNo">075</span>    });<a name="line.75"></a>
-<span class="sourceLineNo">076</span>  }<a name="line.76"></a>
-<span class="sourceLineNo">077</span><a name="line.77"></a>
-<span class="sourceLineNo">078</span>  @Override<a name="line.78"></a>
-<span class="sourceLineNo">079</span>  public int getGeneralQueueLength() {<a 
name="line.79"></a>
-<span class="sourceLineNo">080</span>    return executor.getQueue().size();<a 
name="line.80"></a>
-<span class="sourceLineNo">081</span>  }<a name="line.81"></a>
-<span class="sourceLineNo">082</span><a name="line.82"></a>
-<span class="sourceLineNo">083</span>  @Override<a name="line.83"></a>
-<span class="sourceLineNo">084</span>  public int getPriorityQueueLength() {<a 
name="line.84"></a>
-<span class="sourceLineNo">085</span>    return 0;<a name="line.85"></a>
+<span class="sourceLineNo">027</span>import 
java.util.concurrent.atomic.AtomicInteger;<a name="line.27"></a>
+<span class="sourceLineNo">028</span><a name="line.28"></a>
+<span class="sourceLineNo">029</span>/**<a name="line.29"></a>
+<span class="sourceLineNo">030</span> * A very simple {@code }RpcScheduler} 
that serves incoming requests in order.<a name="line.30"></a>
+<span class="sourceLineNo">031</span> *<a name="line.31"></a>
+<span class="sourceLineNo">032</span> * This can be used for HMaster, where no 
prioritization is needed.<a name="line.32"></a>
+<span class="sourceLineNo">033</span> */<a name="line.33"></a>
+<span class="sourceLineNo">034</span>public class FifoRpcScheduler extends 
RpcScheduler {<a name="line.34"></a>
+<span class="sourceLineNo">035</span><a name="line.35"></a>
+<span class="sourceLineNo">036</span>  private final int handlerCount;<a 
name="line.36"></a>
+<span class="sourceLineNo">037</span>  private final int maxQueueLength;<a 
name="line.37"></a>
+<span class="sourceLineNo">038</span>  private final AtomicInteger queueSize = 
new AtomicInteger(0);<a name="line.38"></a>
+<span class="sourceLineNo">039</span>  private ThreadPoolExecutor executor;<a 
name="line.39"></a>
+<span class="sourceLineNo">040</span><a name="line.40"></a>
+<span class="sourceLineNo">041</span>  public FifoRpcScheduler(Configuration 
conf, int handlerCount) {<a name="line.41"></a>
+<span class="sourceLineNo">042</span>    this.handlerCount = handlerCount;<a 
name="line.42"></a>
+<span class="sourceLineNo">043</span>    this.maxQueueLength = 
conf.getInt("hbase.ipc.server.max.callqueue.length",<a name="line.43"></a>
+<span class="sourceLineNo">044</span>        handlerCount * 
RpcServer.DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER);<a name="line.44"></a>
+<span class="sourceLineNo">045</span>  }<a name="line.45"></a>
+<span class="sourceLineNo">046</span><a name="line.46"></a>
+<span class="sourceLineNo">047</span>  @Override<a name="line.47"></a>
+<span class="sourceLineNo">048</span>  public void init(Context context) {<a 
name="line.48"></a>
+<span class="sourceLineNo">049</span>    // no-op<a name="line.49"></a>
+<span class="sourceLineNo">050</span>  }<a name="line.50"></a>
+<span class="sourceLineNo">051</span><a name="line.51"></a>
+<span class="sourceLineNo">052</span>  @Override<a name="line.52"></a>
+<span class="sourceLineNo">053</span>  public void start() {<a 
name="line.53"></a>
+<span class="sourceLineNo">054</span>    this.executor = new 
ThreadPoolExecutor(<a name="line.54"></a>
+<span class="sourceLineNo">055</span>        handlerCount,<a 
name="line.55"></a>
+<span class="sourceLineNo">056</span>        handlerCount,<a 
name="line.56"></a>
+<span class="sourceLineNo">057</span>        60,<a name="line.57"></a>
+<span class="sourceLineNo">058</span>        TimeUnit.SECONDS,<a 
name="line.58"></a>
+<span class="sourceLineNo">059</span>        new 
ArrayBlockingQueue&lt;Runnable&gt;(maxQueueLength),<a name="line.59"></a>
+<span class="sourceLineNo">060</span>        new 
DaemonThreadFactory("FifoRpcScheduler.handler"),<a name="line.60"></a>
+<span class="sourceLineNo">061</span>        new 
ThreadPoolExecutor.CallerRunsPolicy());<a name="line.61"></a>
+<span class="sourceLineNo">062</span>  }<a name="line.62"></a>
+<span class="sourceLineNo">063</span><a name="line.63"></a>
+<span class="sourceLineNo">064</span>  @Override<a name="line.64"></a>
+<span class="sourceLineNo">065</span>  public void stop() {<a 
name="line.65"></a>
+<span class="sourceLineNo">066</span>    this.executor.shutdown();<a 
name="line.66"></a>
+<span class="sourceLineNo">067</span>  }<a name="line.67"></a>
+<span class="sourceLineNo">068</span><a name="line.68"></a>
+<span class="sourceLineNo">069</span>  @Override<a name="line.69"></a>
+<span class="sourceLineNo">070</span>  public boolean dispatch(final 
CallRunner task) throws IOException, InterruptedException {<a 
name="line.70"></a>
+<span class="sourceLineNo">071</span>    // Executors provide no offer, so 
make our own.<a name="line.71"></a>
+<span class="sourceLineNo">072</span>    int queued = 
queueSize.getAndIncrement();<a name="line.72"></a>
+<span class="sourceLineNo">073</span>    if (maxQueueLength &gt; 0 &amp;&amp; 
queued &gt;= maxQueueLength) {<a name="line.73"></a>
+<span class="sourceLineNo">074</span>      queueSize.decrementAndGet();<a 
name="line.74"></a>
+<span class="sourceLineNo">075</span>      return false;<a name="line.75"></a>
+<span class="sourceLineNo">076</span>    }<a name="line.76"></a>
+<span class="sourceLineNo">077</span>    executor.submit(new Runnable() {<a 
name="line.77"></a>
+<span class="sourceLineNo">078</span>      @Override<a name="line.78"></a>
+<span class="sourceLineNo">079</span>      public void run() {<a 
name="line.79"></a>
+<span class="sourceLineNo">080</span>        
task.setStatus(RpcServer.getStatus());<a name="line.80"></a>
+<span class="sourceLineNo">081</span>        task.run();<a name="line.81"></a>
+<span class="sourceLineNo">082</span>        queueSize.decrementAndGet();<a 
name="line.82"></a>
+<span class="sourceLineNo">083</span>      }<a name="line.83"></a>
+<span class="sourceLineNo">084</span>    });<a name="line.84"></a>
+<span class="sourceLineNo">085</span>    return true;<a name="line.85"></a>
 <span class="sourceLineNo">086</span>  }<a name="line.86"></a>
 <span class="sourceLineNo">087</span><a name="line.87"></a>
 <span class="sourceLineNo">088</span>  @Override<a name="line.88"></a>
-<span class="sourceLineNo">089</span>  public int getReplicationQueueLength() 
{<a name="line.89"></a>
-<span class="sourceLineNo">090</span>    return 0;<a name="line.90"></a>
+<span class="sourceLineNo">089</span>  public int getGeneralQueueLength() {<a 
name="line.89"></a>
+<span class="sourceLineNo">090</span>    return executor.getQueue().size();<a 
name="line.90"></a>
 <span class="sourceLineNo">091</span>  }<a name="line.91"></a>
 <span class="sourceLineNo">092</span><a name="line.92"></a>
 <span class="sourceLineNo">093</span>  @Override<a name="line.93"></a>
-<span class="sourceLineNo">094</span>  public int getActiveRpcHandlerCount() 
{<a name="line.94"></a>
-<span class="sourceLineNo">095</span>    return executor.getActiveCount();<a 
name="line.95"></a>
+<span class="sourceLineNo">094</span>  public int getPriorityQueueLength() {<a 
name="line.94"></a>
+<span class="sourceLineNo">095</span>    return 0;<a name="line.95"></a>
 <span class="sourceLineNo">096</span>  }<a name="line.96"></a>
-<span class="sourceLineNo">097</span>}<a name="line.97"></a>
+<span class="sourceLineNo">097</span><a name="line.97"></a>
+<span class="sourceLineNo">098</span>  @Override<a name="line.98"></a>
+<span class="sourceLineNo">099</span>  public int getReplicationQueueLength() 
{<a name="line.99"></a>
+<span class="sourceLineNo">100</span>    return 0;<a name="line.100"></a>
+<span class="sourceLineNo">101</span>  }<a name="line.101"></a>
+<span class="sourceLineNo">102</span><a name="line.102"></a>
+<span class="sourceLineNo">103</span>  @Override<a name="line.103"></a>
+<span class="sourceLineNo">104</span>  public int getActiveRpcHandlerCount() 
{<a name="line.104"></a>
+<span class="sourceLineNo">105</span>    return executor.getActiveCount();<a 
name="line.105"></a>
+<span class="sourceLineNo">106</span>  }<a name="line.106"></a>
+<span class="sourceLineNo">107</span>}<a name="line.107"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/39cf5e9b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.html
----------------------------------------------------------------------
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.html 
b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.html
index 000a2ff..7695dac 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.html
@@ -168,7 +168,7 @@
 <span class="sourceLineNo">160</span>  }<a name="line.160"></a>
 <span class="sourceLineNo">161</span><a name="line.161"></a>
 <span class="sourceLineNo">162</span>  @Override<a name="line.162"></a>
-<span class="sourceLineNo">163</span>  public void dispatch(final CallRunner 
callTask) throws InterruptedException {<a name="line.163"></a>
+<span class="sourceLineNo">163</span>  public boolean dispatch(final 
CallRunner callTask) throws InterruptedException {<a name="line.163"></a>
 <span class="sourceLineNo">164</span>    RpcServer.Call call = 
callTask.getCall();<a name="line.164"></a>
 <span class="sourceLineNo">165</span>    int queueIndex;<a name="line.165"></a>
 <span class="sourceLineNo">166</span>    if (isWriteRequest(call.getHeader(), 
call.param)) {<a name="line.166"></a>
@@ -178,7 +178,7 @@
 <span class="sourceLineNo">170</span>    } else {<a name="line.170"></a>
 <span class="sourceLineNo">171</span>      queueIndex = numWriteQueues + 
readBalancer.getNextQueue();<a name="line.171"></a>
 <span class="sourceLineNo">172</span>    }<a name="line.172"></a>
-<span class="sourceLineNo">173</span>    
queues.get(queueIndex).put(callTask);<a name="line.173"></a>
+<span class="sourceLineNo">173</span>    return 
queues.get(queueIndex).offer(callTask);<a name="line.173"></a>
 <span class="sourceLineNo">174</span>  }<a name="line.174"></a>
 <span class="sourceLineNo">175</span><a name="line.175"></a>
 <span class="sourceLineNo">176</span>  private boolean isWriteRequest(final 
RequestHeader header, final Message param) {<a name="line.176"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/39cf5e9b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.QueueBalancer.html
----------------------------------------------------------------------
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.QueueBalancer.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.QueueBalancer.html
index 7737c8f..88ac539 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.QueueBalancer.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.QueueBalancer.html
@@ -94,7 +94,7 @@
 <span class="sourceLineNo">086</span>  public abstract int getQueueLength();<a 
name="line.86"></a>
 <span class="sourceLineNo">087</span><a name="line.87"></a>
 <span class="sourceLineNo">088</span>  /** Add the request to the executor 
queue */<a name="line.88"></a>
-<span class="sourceLineNo">089</span>  public abstract void dispatch(final 
CallRunner callTask) throws InterruptedException;<a name="line.89"></a>
+<span class="sourceLineNo">089</span>  public abstract boolean dispatch(final 
CallRunner callTask) throws InterruptedException;<a name="line.89"></a>
 <span class="sourceLineNo">090</span><a name="line.90"></a>
 <span class="sourceLineNo">091</span>  /** Returns the list of request queues 
*/<a name="line.91"></a>
 <span class="sourceLineNo">092</span>  protected abstract 
List&lt;BlockingQueue&lt;CallRunner&gt;&gt; getQueues();<a name="line.92"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/39cf5e9b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.RandomQueueBalancer.html
----------------------------------------------------------------------
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.RandomQueueBalancer.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.RandomQueueBalancer.html
index 7737c8f..88ac539 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.RandomQueueBalancer.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.RandomQueueBalancer.html
@@ -94,7 +94,7 @@
 <span class="sourceLineNo">086</span>  public abstract int getQueueLength();<a 
name="line.86"></a>
 <span class="sourceLineNo">087</span><a name="line.87"></a>
 <span class="sourceLineNo">088</span>  /** Add the request to the executor 
queue */<a name="line.88"></a>
-<span class="sourceLineNo">089</span>  public abstract void dispatch(final 
CallRunner callTask) throws InterruptedException;<a name="line.89"></a>
+<span class="sourceLineNo">089</span>  public abstract boolean dispatch(final 
CallRunner callTask) throws InterruptedException;<a name="line.89"></a>
 <span class="sourceLineNo">090</span><a name="line.90"></a>
 <span class="sourceLineNo">091</span>  /** Returns the list of request queues 
*/<a name="line.91"></a>
 <span class="sourceLineNo">092</span>  protected abstract 
List&lt;BlockingQueue&lt;CallRunner&gt;&gt; getQueues();<a name="line.92"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/39cf5e9b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.html 
b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.html
index 7737c8f..88ac539 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcExecutor.html
@@ -94,7 +94,7 @@
 <span class="sourceLineNo">086</span>  public abstract int getQueueLength();<a 
name="line.86"></a>
 <span class="sourceLineNo">087</span><a name="line.87"></a>
 <span class="sourceLineNo">088</span>  /** Add the request to the executor 
queue */<a name="line.88"></a>
-<span class="sourceLineNo">089</span>  public abstract void dispatch(final 
CallRunner callTask) throws InterruptedException;<a name="line.89"></a>
+<span class="sourceLineNo">089</span>  public abstract boolean dispatch(final 
CallRunner callTask) throws InterruptedException;<a name="line.89"></a>
 <span class="sourceLineNo">090</span><a name="line.90"></a>
 <span class="sourceLineNo">091</span>  /** Returns the list of request queues 
*/<a name="line.91"></a>
 <span class="sourceLineNo">092</span>  protected abstract 
List&lt;BlockingQueue&lt;CallRunner&gt;&gt; getQueues();<a name="line.92"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/39cf5e9b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcScheduler.Context.html
----------------------------------------------------------------------
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcScheduler.Context.html 
b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcScheduler.Context.html
index d49a145..e3c3a71 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcScheduler.Context.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcScheduler.Context.html
@@ -66,7 +66,7 @@
 <span class="sourceLineNo">058</span>   *<a name="line.58"></a>
 <span class="sourceLineNo">059</span>   * @param task the request to be 
dispatched<a name="line.59"></a>
 <span class="sourceLineNo">060</span>   */<a name="line.60"></a>
-<span class="sourceLineNo">061</span>  public abstract void 
dispatch(CallRunner task) throws IOException, InterruptedException;<a 
name="line.61"></a>
+<span class="sourceLineNo">061</span>  public abstract boolean 
dispatch(CallRunner task) throws IOException, InterruptedException;<a 
name="line.61"></a>
 <span class="sourceLineNo">062</span><a name="line.62"></a>
 <span class="sourceLineNo">063</span>  /** Retrieves length of the general 
queue for metrics. */<a name="line.63"></a>
 <span class="sourceLineNo">064</span>  public abstract int 
getGeneralQueueLength();<a name="line.64"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/39cf5e9b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcScheduler.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcScheduler.html 
b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcScheduler.html
index d49a145..e3c3a71 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcScheduler.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/ipc/RpcScheduler.html
@@ -66,7 +66,7 @@
 <span class="sourceLineNo">058</span>   *<a name="line.58"></a>
 <span class="sourceLineNo">059</span>   * @param task the request to be 
dispatched<a name="line.59"></a>
 <span class="sourceLineNo">060</span>   */<a name="line.60"></a>
-<span class="sourceLineNo">061</span>  public abstract void 
dispatch(CallRunner task) throws IOException, InterruptedException;<a 
name="line.61"></a>
+<span class="sourceLineNo">061</span>  public abstract boolean 
dispatch(CallRunner task) throws IOException, InterruptedException;<a 
name="line.61"></a>
 <span class="sourceLineNo">062</span><a name="line.62"></a>
 <span class="sourceLineNo">063</span>  /** Retrieves length of the general 
queue for metrics. */<a name="line.63"></a>
 <span class="sourceLineNo">064</span>  public abstract int 
getGeneralQueueLength();<a name="line.64"></a>

Reply via email to