hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject [29/52] [partial] hbase-site git commit: Published site at e06c3676f1273f033e3e185ee9c1ec52c1c7cb31.
Date Sun, 09 Oct 2016 15:13:07 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/c7e84622/apidocs/src-html/org/apache/hadoop/hbase/client/Query.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/client/Query.html b/apidocs/src-html/org/apache/hadoop/hbase/client/Query.html
index ecf5411..417e13a 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/client/Query.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/client/Query.html
@@ -33,185 +33,186 @@
 <span class="sourceLineNo">025</span>import org.apache.hadoop.hbase.exceptions.DeserializationException;<a name="line.25"></a>
 <span class="sourceLineNo">026</span>import org.apache.hadoop.hbase.filter.Filter;<a name="line.26"></a>
 <span class="sourceLineNo">027</span>import org.apache.hadoop.hbase.io.TimeRange;<a name="line.27"></a>
-<span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.protobuf.ProtobufUtil;<a name="line.28"></a>
-<span class="sourceLineNo">029</span>import org.apache.hadoop.hbase.security.access.AccessControlConstants;<a name="line.29"></a>
+<span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.security.access.AccessControlConstants;<a name="line.28"></a>
+<span class="sourceLineNo">029</span>import org.apache.hadoop.hbase.security.access.AccessControlUtil;<a name="line.29"></a>
 <span class="sourceLineNo">030</span>import org.apache.hadoop.hbase.security.access.Permission;<a name="line.30"></a>
 <span class="sourceLineNo">031</span>import org.apache.hadoop.hbase.security.visibility.Authorizations;<a name="line.31"></a>
 <span class="sourceLineNo">032</span>import org.apache.hadoop.hbase.security.visibility.VisibilityConstants;<a name="line.32"></a>
-<span class="sourceLineNo">033</span><a name="line.33"></a>
-<span class="sourceLineNo">034</span>import com.google.common.collect.ArrayListMultimap;<a name="line.34"></a>
-<span class="sourceLineNo">035</span>import com.google.common.collect.ListMultimap;<a name="line.35"></a>
-<span class="sourceLineNo">036</span>import org.apache.hadoop.hbase.util.Bytes;<a name="line.36"></a>
-<span class="sourceLineNo">037</span><a name="line.37"></a>
-<span class="sourceLineNo">038</span>@InterfaceAudience.Public<a name="line.38"></a>
-<span class="sourceLineNo">039</span>@InterfaceStability.Evolving<a name="line.39"></a>
-<span class="sourceLineNo">040</span>public abstract class Query extends OperationWithAttributes {<a name="line.40"></a>
-<span class="sourceLineNo">041</span>  private static final String ISOLATION_LEVEL = "_isolationlevel_";<a name="line.41"></a>
-<span class="sourceLineNo">042</span>  protected Filter filter = null;<a name="line.42"></a>
-<span class="sourceLineNo">043</span>  protected int targetReplicaId = -1;<a name="line.43"></a>
-<span class="sourceLineNo">044</span>  protected Consistency consistency = Consistency.STRONG;<a name="line.44"></a>
-<span class="sourceLineNo">045</span>  protected Map&lt;byte[], TimeRange&gt; colFamTimeRangeMap = Maps.newTreeMap(Bytes.BYTES_COMPARATOR);<a name="line.45"></a>
-<span class="sourceLineNo">046</span><a name="line.46"></a>
-<span class="sourceLineNo">047</span>  /**<a name="line.47"></a>
-<span class="sourceLineNo">048</span>   * @return Filter<a name="line.48"></a>
-<span class="sourceLineNo">049</span>   */<a name="line.49"></a>
-<span class="sourceLineNo">050</span>  public Filter getFilter() {<a name="line.50"></a>
-<span class="sourceLineNo">051</span>    return filter;<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>   * Apply the specified server-side filter when performing the Query.<a name="line.55"></a>
-<span class="sourceLineNo">056</span>   * Only {@link Filter#filterKeyValue(Cell)} is called AFTER all tests<a name="line.56"></a>
-<span class="sourceLineNo">057</span>   * for ttl, column match, deletes and max versions have been run.<a name="line.57"></a>
-<span class="sourceLineNo">058</span>   * @param filter filter to run on the server<a name="line.58"></a>
-<span class="sourceLineNo">059</span>   * @return this for invocation chaining<a name="line.59"></a>
-<span class="sourceLineNo">060</span>   */<a name="line.60"></a>
-<span class="sourceLineNo">061</span>  public Query setFilter(Filter filter) {<a name="line.61"></a>
-<span class="sourceLineNo">062</span>    this.filter = filter;<a name="line.62"></a>
-<span class="sourceLineNo">063</span>    return this;<a name="line.63"></a>
-<span class="sourceLineNo">064</span>  }<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>   * Sets the authorizations to be used by this Query<a name="line.67"></a>
-<span class="sourceLineNo">068</span>   * @param authorizations<a name="line.68"></a>
-<span class="sourceLineNo">069</span>   */<a name="line.69"></a>
-<span class="sourceLineNo">070</span>  public Query setAuthorizations(Authorizations authorizations) {<a name="line.70"></a>
-<span class="sourceLineNo">071</span>    this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, ProtobufUtil<a name="line.71"></a>
-<span class="sourceLineNo">072</span>        .toAuthorizations(authorizations).toByteArray());<a name="line.72"></a>
-<span class="sourceLineNo">073</span>    return this;<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>   * @return The authorizations this Query is associated with.<a name="line.77"></a>
-<span class="sourceLineNo">078</span>   * @throws DeserializationException<a name="line.78"></a>
-<span class="sourceLineNo">079</span>   */<a name="line.79"></a>
-<span class="sourceLineNo">080</span>  public Authorizations getAuthorizations() throws DeserializationException {<a name="line.80"></a>
-<span class="sourceLineNo">081</span>    byte[] authorizationsBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY);<a name="line.81"></a>
-<span class="sourceLineNo">082</span>    if (authorizationsBytes == null) return null;<a name="line.82"></a>
-<span class="sourceLineNo">083</span>    return ProtobufUtil.toAuthorizations(authorizationsBytes);<a name="line.83"></a>
-<span class="sourceLineNo">084</span>  }<a name="line.84"></a>
-<span class="sourceLineNo">085</span><a name="line.85"></a>
-<span class="sourceLineNo">086</span>  /**<a name="line.86"></a>
-<span class="sourceLineNo">087</span>   * @return The serialized ACL for this operation, or null if none<a name="line.87"></a>
-<span class="sourceLineNo">088</span>   */<a name="line.88"></a>
-<span class="sourceLineNo">089</span>  public byte[] getACL() {<a name="line.89"></a>
-<span class="sourceLineNo">090</span>    return getAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL);<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>  /**<a name="line.93"></a>
-<span class="sourceLineNo">094</span>   * @param user User short name<a name="line.94"></a>
-<span class="sourceLineNo">095</span>   * @param perms Permissions for the user<a name="line.95"></a>
-<span class="sourceLineNo">096</span>   */<a name="line.96"></a>
-<span class="sourceLineNo">097</span>  public Query setACL(String user, Permission perms) {<a name="line.97"></a>
-<span class="sourceLineNo">098</span>    setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,<a name="line.98"></a>
-<span class="sourceLineNo">099</span>      ProtobufUtil.toUsersAndPermissions(user, perms).toByteArray());<a name="line.99"></a>
-<span class="sourceLineNo">100</span>    return this;<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>  /**<a name="line.103"></a>
-<span class="sourceLineNo">104</span>   * @param perms A map of permissions for a user or users<a name="line.104"></a>
-<span class="sourceLineNo">105</span>   */<a name="line.105"></a>
-<span class="sourceLineNo">106</span>  public Query setACL(Map&lt;String, Permission&gt; perms) {<a name="line.106"></a>
-<span class="sourceLineNo">107</span>    ListMultimap&lt;String, Permission&gt; permMap = ArrayListMultimap.create();<a name="line.107"></a>
-<span class="sourceLineNo">108</span>    for (Map.Entry&lt;String, Permission&gt; entry : perms.entrySet()) {<a name="line.108"></a>
-<span class="sourceLineNo">109</span>      permMap.put(entry.getKey(), entry.getValue());<a name="line.109"></a>
-<span class="sourceLineNo">110</span>    }<a name="line.110"></a>
-<span class="sourceLineNo">111</span>    setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,<a name="line.111"></a>
-<span class="sourceLineNo">112</span>      ProtobufUtil.toUsersAndPermissions(permMap).toByteArray());<a name="line.112"></a>
-<span class="sourceLineNo">113</span>    return this;<a name="line.113"></a>
-<span class="sourceLineNo">114</span>  }<a name="line.114"></a>
-<span class="sourceLineNo">115</span><a name="line.115"></a>
-<span class="sourceLineNo">116</span>  /**<a name="line.116"></a>
-<span class="sourceLineNo">117</span>   * Returns the consistency level for this operation<a name="line.117"></a>
-<span class="sourceLineNo">118</span>   * @return the consistency level<a name="line.118"></a>
-<span class="sourceLineNo">119</span>   */<a name="line.119"></a>
-<span class="sourceLineNo">120</span>  public Consistency getConsistency() {<a name="line.120"></a>
-<span class="sourceLineNo">121</span>    return consistency;<a name="line.121"></a>
-<span class="sourceLineNo">122</span>  }<a name="line.122"></a>
-<span class="sourceLineNo">123</span><a name="line.123"></a>
-<span class="sourceLineNo">124</span>  /**<a name="line.124"></a>
-<span class="sourceLineNo">125</span>   * Sets the consistency level for this operation<a name="line.125"></a>
-<span class="sourceLineNo">126</span>   * @param consistency the consistency level<a name="line.126"></a>
-<span class="sourceLineNo">127</span>   */<a name="line.127"></a>
-<span class="sourceLineNo">128</span>  public Query setConsistency(Consistency consistency) {<a name="line.128"></a>
-<span class="sourceLineNo">129</span>    this.consistency = consistency;<a name="line.129"></a>
-<span class="sourceLineNo">130</span>    return this;<a name="line.130"></a>
-<span class="sourceLineNo">131</span>  }<a name="line.131"></a>
-<span class="sourceLineNo">132</span><a name="line.132"></a>
-<span class="sourceLineNo">133</span>  /**<a name="line.133"></a>
-<span class="sourceLineNo">134</span>   * Specify region replica id where Query will fetch data from. Use this together with<a name="line.134"></a>
-<span class="sourceLineNo">135</span>   * {@link #setConsistency(Consistency)} passing {@link Consistency#TIMELINE} to read data from<a name="line.135"></a>
-<span class="sourceLineNo">136</span>   * a specific replicaId.<a name="line.136"></a>
-<span class="sourceLineNo">137</span>   * &lt;br&gt;&lt;b&gt; Expert: &lt;/b&gt;This is an advanced API exposed. Only use it if you know what you are doing<a name="line.137"></a>
-<span class="sourceLineNo">138</span>   * @param Id<a name="line.138"></a>
-<span class="sourceLineNo">139</span>   */<a name="line.139"></a>
-<span class="sourceLineNo">140</span>  public Query setReplicaId(int Id) {<a name="line.140"></a>
-<span class="sourceLineNo">141</span>    this.targetReplicaId = Id;<a name="line.141"></a>
-<span class="sourceLineNo">142</span>    return this;<a name="line.142"></a>
-<span class="sourceLineNo">143</span>  }<a name="line.143"></a>
-<span class="sourceLineNo">144</span><a name="line.144"></a>
-<span class="sourceLineNo">145</span>  /**<a name="line.145"></a>
-<span class="sourceLineNo">146</span>   * Returns region replica id where Query will fetch data from.<a name="line.146"></a>
-<span class="sourceLineNo">147</span>   * @return region replica id or -1 if not set.<a name="line.147"></a>
-<span class="sourceLineNo">148</span>   */<a name="line.148"></a>
-<span class="sourceLineNo">149</span>  public int getReplicaId() {<a name="line.149"></a>
-<span class="sourceLineNo">150</span>    return this.targetReplicaId;<a name="line.150"></a>
-<span class="sourceLineNo">151</span>  }<a name="line.151"></a>
-<span class="sourceLineNo">152</span><a name="line.152"></a>
-<span class="sourceLineNo">153</span>  /**<a name="line.153"></a>
-<span class="sourceLineNo">154</span>   * Set the isolation level for this query. If the<a name="line.154"></a>
-<span class="sourceLineNo">155</span>   * isolation level is set to READ_UNCOMMITTED, then<a name="line.155"></a>
-<span class="sourceLineNo">156</span>   * this query will return data from committed and<a name="line.156"></a>
-<span class="sourceLineNo">157</span>   * uncommitted transactions. If the isolation level<a name="line.157"></a>
-<span class="sourceLineNo">158</span>   * is set to READ_COMMITTED, then this query will return<a name="line.158"></a>
-<span class="sourceLineNo">159</span>   * data from committed transactions only. If a isolation<a name="line.159"></a>
-<span class="sourceLineNo">160</span>   * level is not explicitly set on a Query, then it<a name="line.160"></a>
-<span class="sourceLineNo">161</span>   * is assumed to be READ_COMMITTED.<a name="line.161"></a>
-<span class="sourceLineNo">162</span>   * @param level IsolationLevel for this query<a name="line.162"></a>
-<span class="sourceLineNo">163</span>   */<a name="line.163"></a>
-<span class="sourceLineNo">164</span>  public Query setIsolationLevel(IsolationLevel level) {<a name="line.164"></a>
-<span class="sourceLineNo">165</span>    setAttribute(ISOLATION_LEVEL, level.toBytes());<a name="line.165"></a>
-<span class="sourceLineNo">166</span>    return this;<a name="line.166"></a>
-<span class="sourceLineNo">167</span>  }<a name="line.167"></a>
-<span class="sourceLineNo">168</span><a name="line.168"></a>
-<span class="sourceLineNo">169</span>  /**<a name="line.169"></a>
-<span class="sourceLineNo">170</span>   * @return The isolation level of this query.<a name="line.170"></a>
-<span class="sourceLineNo">171</span>   * If no isolation level was set for this query object,<a name="line.171"></a>
-<span class="sourceLineNo">172</span>   * then it returns READ_COMMITTED.<a name="line.172"></a>
-<span class="sourceLineNo">173</span>   * @return The IsolationLevel for this query<a name="line.173"></a>
-<span class="sourceLineNo">174</span>   */<a name="line.174"></a>
-<span class="sourceLineNo">175</span>  public IsolationLevel getIsolationLevel() {<a name="line.175"></a>
-<span class="sourceLineNo">176</span>    byte[] attr = getAttribute(ISOLATION_LEVEL);<a name="line.176"></a>
-<span class="sourceLineNo">177</span>    return attr == null ? IsolationLevel.READ_COMMITTED :<a name="line.177"></a>
-<span class="sourceLineNo">178</span>                          IsolationLevel.fromBytes(attr);<a name="line.178"></a>
-<span class="sourceLineNo">179</span>  }<a name="line.179"></a>
-<span class="sourceLineNo">180</span><a name="line.180"></a>
+<span class="sourceLineNo">033</span>import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;<a name="line.33"></a>
+<span class="sourceLineNo">034</span><a name="line.34"></a>
+<span class="sourceLineNo">035</span>import com.google.common.collect.ArrayListMultimap;<a name="line.35"></a>
+<span class="sourceLineNo">036</span>import com.google.common.collect.ListMultimap;<a name="line.36"></a>
+<span class="sourceLineNo">037</span>import org.apache.hadoop.hbase.util.Bytes;<a name="line.37"></a>
+<span class="sourceLineNo">038</span><a name="line.38"></a>
+<span class="sourceLineNo">039</span>@InterfaceAudience.Public<a name="line.39"></a>
+<span class="sourceLineNo">040</span>@InterfaceStability.Evolving<a name="line.40"></a>
+<span class="sourceLineNo">041</span>public abstract class Query extends OperationWithAttributes {<a name="line.41"></a>
+<span class="sourceLineNo">042</span>  private static final String ISOLATION_LEVEL = "_isolationlevel_";<a name="line.42"></a>
+<span class="sourceLineNo">043</span>  protected Filter filter = null;<a name="line.43"></a>
+<span class="sourceLineNo">044</span>  protected int targetReplicaId = -1;<a name="line.44"></a>
+<span class="sourceLineNo">045</span>  protected Consistency consistency = Consistency.STRONG;<a name="line.45"></a>
+<span class="sourceLineNo">046</span>  protected Map&lt;byte[], TimeRange&gt; colFamTimeRangeMap = Maps.newTreeMap(Bytes.BYTES_COMPARATOR);<a name="line.46"></a>
+<span class="sourceLineNo">047</span><a name="line.47"></a>
+<span class="sourceLineNo">048</span>  /**<a name="line.48"></a>
+<span class="sourceLineNo">049</span>   * @return Filter<a name="line.49"></a>
+<span class="sourceLineNo">050</span>   */<a name="line.50"></a>
+<span class="sourceLineNo">051</span>  public Filter getFilter() {<a name="line.51"></a>
+<span class="sourceLineNo">052</span>    return filter;<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>  /**<a name="line.55"></a>
+<span class="sourceLineNo">056</span>   * Apply the specified server-side filter when performing the Query.<a name="line.56"></a>
+<span class="sourceLineNo">057</span>   * Only {@link Filter#filterKeyValue(Cell)} is called AFTER all tests<a name="line.57"></a>
+<span class="sourceLineNo">058</span>   * for ttl, column match, deletes and max versions have been run.<a name="line.58"></a>
+<span class="sourceLineNo">059</span>   * @param filter filter to run on the server<a name="line.59"></a>
+<span class="sourceLineNo">060</span>   * @return this for invocation chaining<a name="line.60"></a>
+<span class="sourceLineNo">061</span>   */<a name="line.61"></a>
+<span class="sourceLineNo">062</span>  public Query setFilter(Filter filter) {<a name="line.62"></a>
+<span class="sourceLineNo">063</span>    this.filter = filter;<a name="line.63"></a>
+<span class="sourceLineNo">064</span>    return this;<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>  /**<a name="line.67"></a>
+<span class="sourceLineNo">068</span>   * Sets the authorizations to be used by this Query<a name="line.68"></a>
+<span class="sourceLineNo">069</span>   * @param authorizations<a name="line.69"></a>
+<span class="sourceLineNo">070</span>   */<a name="line.70"></a>
+<span class="sourceLineNo">071</span>  public Query setAuthorizations(Authorizations authorizations) {<a name="line.71"></a>
+<span class="sourceLineNo">072</span>    this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, ProtobufUtil<a name="line.72"></a>
+<span class="sourceLineNo">073</span>        .toAuthorizations(authorizations).toByteArray());<a name="line.73"></a>
+<span class="sourceLineNo">074</span>    return this;<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>   * @return The authorizations this Query is associated with.<a name="line.78"></a>
+<span class="sourceLineNo">079</span>   * @throws DeserializationException<a name="line.79"></a>
+<span class="sourceLineNo">080</span>   */<a name="line.80"></a>
+<span class="sourceLineNo">081</span>  public Authorizations getAuthorizations() throws DeserializationException {<a name="line.81"></a>
+<span class="sourceLineNo">082</span>    byte[] authorizationsBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY);<a name="line.82"></a>
+<span class="sourceLineNo">083</span>    if (authorizationsBytes == null) return null;<a name="line.83"></a>
+<span class="sourceLineNo">084</span>    return ProtobufUtil.toAuthorizations(authorizationsBytes);<a name="line.84"></a>
+<span class="sourceLineNo">085</span>  }<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>   * @return The serialized ACL for this operation, or null if none<a name="line.88"></a>
+<span class="sourceLineNo">089</span>   */<a name="line.89"></a>
+<span class="sourceLineNo">090</span>  public byte[] getACL() {<a name="line.90"></a>
+<span class="sourceLineNo">091</span>    return getAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL);<a name="line.91"></a>
+<span class="sourceLineNo">092</span>  }<a name="line.92"></a>
+<span class="sourceLineNo">093</span><a name="line.93"></a>
+<span class="sourceLineNo">094</span>  /**<a name="line.94"></a>
+<span class="sourceLineNo">095</span>   * @param user User short name<a name="line.95"></a>
+<span class="sourceLineNo">096</span>   * @param perms Permissions for the user<a name="line.96"></a>
+<span class="sourceLineNo">097</span>   */<a name="line.97"></a>
+<span class="sourceLineNo">098</span>  public Query setACL(String user, Permission perms) {<a name="line.98"></a>
+<span class="sourceLineNo">099</span>    setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,<a name="line.99"></a>
+<span class="sourceLineNo">100</span>      AccessControlUtil.toUsersAndPermissions(user, perms).toByteArray());<a name="line.100"></a>
+<span class="sourceLineNo">101</span>    return this;<a name="line.101"></a>
+<span class="sourceLineNo">102</span>  }<a name="line.102"></a>
+<span class="sourceLineNo">103</span><a name="line.103"></a>
+<span class="sourceLineNo">104</span>  /**<a name="line.104"></a>
+<span class="sourceLineNo">105</span>   * @param perms A map of permissions for a user or users<a name="line.105"></a>
+<span class="sourceLineNo">106</span>   */<a name="line.106"></a>
+<span class="sourceLineNo">107</span>  public Query setACL(Map&lt;String, Permission&gt; perms) {<a name="line.107"></a>
+<span class="sourceLineNo">108</span>    ListMultimap&lt;String, Permission&gt; permMap = ArrayListMultimap.create();<a name="line.108"></a>
+<span class="sourceLineNo">109</span>    for (Map.Entry&lt;String, Permission&gt; entry : perms.entrySet()) {<a name="line.109"></a>
+<span class="sourceLineNo">110</span>      permMap.put(entry.getKey(), entry.getValue());<a name="line.110"></a>
+<span class="sourceLineNo">111</span>    }<a name="line.111"></a>
+<span class="sourceLineNo">112</span>    setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,<a name="line.112"></a>
+<span class="sourceLineNo">113</span>        AccessControlUtil.toUsersAndPermissions(permMap).toByteArray());<a name="line.113"></a>
+<span class="sourceLineNo">114</span>    return this;<a name="line.114"></a>
+<span class="sourceLineNo">115</span>  }<a name="line.115"></a>
+<span class="sourceLineNo">116</span><a name="line.116"></a>
+<span class="sourceLineNo">117</span>  /**<a name="line.117"></a>
+<span class="sourceLineNo">118</span>   * Returns the consistency level for this operation<a name="line.118"></a>
+<span class="sourceLineNo">119</span>   * @return the consistency level<a name="line.119"></a>
+<span class="sourceLineNo">120</span>   */<a name="line.120"></a>
+<span class="sourceLineNo">121</span>  public Consistency getConsistency() {<a name="line.121"></a>
+<span class="sourceLineNo">122</span>    return consistency;<a name="line.122"></a>
+<span class="sourceLineNo">123</span>  }<a name="line.123"></a>
+<span class="sourceLineNo">124</span><a name="line.124"></a>
+<span class="sourceLineNo">125</span>  /**<a name="line.125"></a>
+<span class="sourceLineNo">126</span>   * Sets the consistency level for this operation<a name="line.126"></a>
+<span class="sourceLineNo">127</span>   * @param consistency the consistency level<a name="line.127"></a>
+<span class="sourceLineNo">128</span>   */<a name="line.128"></a>
+<span class="sourceLineNo">129</span>  public Query setConsistency(Consistency consistency) {<a name="line.129"></a>
+<span class="sourceLineNo">130</span>    this.consistency = consistency;<a name="line.130"></a>
+<span class="sourceLineNo">131</span>    return this;<a name="line.131"></a>
+<span class="sourceLineNo">132</span>  }<a name="line.132"></a>
+<span class="sourceLineNo">133</span><a name="line.133"></a>
+<span class="sourceLineNo">134</span>  /**<a name="line.134"></a>
+<span class="sourceLineNo">135</span>   * Specify region replica id where Query will fetch data from. Use this together with<a name="line.135"></a>
+<span class="sourceLineNo">136</span>   * {@link #setConsistency(Consistency)} passing {@link Consistency#TIMELINE} to read data from<a name="line.136"></a>
+<span class="sourceLineNo">137</span>   * a specific replicaId.<a name="line.137"></a>
+<span class="sourceLineNo">138</span>   * &lt;br&gt;&lt;b&gt; Expert: &lt;/b&gt;This is an advanced API exposed. Only use it if you know what you are doing<a name="line.138"></a>
+<span class="sourceLineNo">139</span>   * @param Id<a name="line.139"></a>
+<span class="sourceLineNo">140</span>   */<a name="line.140"></a>
+<span class="sourceLineNo">141</span>  public Query setReplicaId(int Id) {<a name="line.141"></a>
+<span class="sourceLineNo">142</span>    this.targetReplicaId = Id;<a name="line.142"></a>
+<span class="sourceLineNo">143</span>    return this;<a name="line.143"></a>
+<span class="sourceLineNo">144</span>  }<a name="line.144"></a>
+<span class="sourceLineNo">145</span><a name="line.145"></a>
+<span class="sourceLineNo">146</span>  /**<a name="line.146"></a>
+<span class="sourceLineNo">147</span>   * Returns region replica id where Query will fetch data from.<a name="line.147"></a>
+<span class="sourceLineNo">148</span>   * @return region replica id or -1 if not set.<a name="line.148"></a>
+<span class="sourceLineNo">149</span>   */<a name="line.149"></a>
+<span class="sourceLineNo">150</span>  public int getReplicaId() {<a name="line.150"></a>
+<span class="sourceLineNo">151</span>    return this.targetReplicaId;<a name="line.151"></a>
+<span class="sourceLineNo">152</span>  }<a name="line.152"></a>
+<span class="sourceLineNo">153</span><a name="line.153"></a>
+<span class="sourceLineNo">154</span>  /**<a name="line.154"></a>
+<span class="sourceLineNo">155</span>   * Set the isolation level for this query. If the<a name="line.155"></a>
+<span class="sourceLineNo">156</span>   * isolation level is set to READ_UNCOMMITTED, then<a name="line.156"></a>
+<span class="sourceLineNo">157</span>   * this query will return data from committed and<a name="line.157"></a>
+<span class="sourceLineNo">158</span>   * uncommitted transactions. If the isolation level<a name="line.158"></a>
+<span class="sourceLineNo">159</span>   * is set to READ_COMMITTED, then this query will return<a name="line.159"></a>
+<span class="sourceLineNo">160</span>   * data from committed transactions only. If a isolation<a name="line.160"></a>
+<span class="sourceLineNo">161</span>   * level is not explicitly set on a Query, then it<a name="line.161"></a>
+<span class="sourceLineNo">162</span>   * is assumed to be READ_COMMITTED.<a name="line.162"></a>
+<span class="sourceLineNo">163</span>   * @param level IsolationLevel for this query<a name="line.163"></a>
+<span class="sourceLineNo">164</span>   */<a name="line.164"></a>
+<span class="sourceLineNo">165</span>  public Query setIsolationLevel(IsolationLevel level) {<a name="line.165"></a>
+<span class="sourceLineNo">166</span>    setAttribute(ISOLATION_LEVEL, level.toBytes());<a name="line.166"></a>
+<span class="sourceLineNo">167</span>    return this;<a name="line.167"></a>
+<span class="sourceLineNo">168</span>  }<a name="line.168"></a>
+<span class="sourceLineNo">169</span><a name="line.169"></a>
+<span class="sourceLineNo">170</span>  /**<a name="line.170"></a>
+<span class="sourceLineNo">171</span>   * @return The isolation level of this query.<a name="line.171"></a>
+<span class="sourceLineNo">172</span>   * If no isolation level was set for this query object,<a name="line.172"></a>
+<span class="sourceLineNo">173</span>   * then it returns READ_COMMITTED.<a name="line.173"></a>
+<span class="sourceLineNo">174</span>   * @return The IsolationLevel for this query<a name="line.174"></a>
+<span class="sourceLineNo">175</span>   */<a name="line.175"></a>
+<span class="sourceLineNo">176</span>  public IsolationLevel getIsolationLevel() {<a name="line.176"></a>
+<span class="sourceLineNo">177</span>    byte[] attr = getAttribute(ISOLATION_LEVEL);<a name="line.177"></a>
+<span class="sourceLineNo">178</span>    return attr == null ? IsolationLevel.READ_COMMITTED :<a name="line.178"></a>
+<span class="sourceLineNo">179</span>                          IsolationLevel.fromBytes(attr);<a name="line.179"></a>
+<span class="sourceLineNo">180</span>  }<a name="line.180"></a>
 <span class="sourceLineNo">181</span><a name="line.181"></a>
-<span class="sourceLineNo">182</span>  /**<a name="line.182"></a>
-<span class="sourceLineNo">183</span>   * Get versions of columns only within the specified timestamp range,<a name="line.183"></a>
-<span class="sourceLineNo">184</span>   * [minStamp, maxStamp) on a per CF bases.  Note, default maximum versions to return is 1.  If<a name="line.184"></a>
-<span class="sourceLineNo">185</span>   * your time range spans more than one version and you want all versions<a name="line.185"></a>
-<span class="sourceLineNo">186</span>   * returned, up the number of versions beyond the default.<a name="line.186"></a>
-<span class="sourceLineNo">187</span>   * Column Family time ranges take precedence over the global time range.<a name="line.187"></a>
-<span class="sourceLineNo">188</span>   *<a name="line.188"></a>
-<span class="sourceLineNo">189</span>   * @param cf       the column family for which you want to restrict<a name="line.189"></a>
-<span class="sourceLineNo">190</span>   * @param minStamp minimum timestamp value, inclusive<a name="line.190"></a>
-<span class="sourceLineNo">191</span>   * @param maxStamp maximum timestamp value, exclusive<a name="line.191"></a>
-<span class="sourceLineNo">192</span>   * @return this<a name="line.192"></a>
-<span class="sourceLineNo">193</span>   */<a name="line.193"></a>
-<span class="sourceLineNo">194</span><a name="line.194"></a>
-<span class="sourceLineNo">195</span>  public Query setColumnFamilyTimeRange(byte[] cf, long minStamp, long maxStamp) {<a name="line.195"></a>
-<span class="sourceLineNo">196</span>    colFamTimeRangeMap.put(cf, new TimeRange(minStamp, maxStamp));<a name="line.196"></a>
-<span class="sourceLineNo">197</span>    return this;<a name="line.197"></a>
-<span class="sourceLineNo">198</span>  }<a name="line.198"></a>
-<span class="sourceLineNo">199</span><a name="line.199"></a>
-<span class="sourceLineNo">200</span>  /**<a name="line.200"></a>
-<span class="sourceLineNo">201</span>   * @return A map of column families to time ranges<a name="line.201"></a>
-<span class="sourceLineNo">202</span>   */<a name="line.202"></a>
-<span class="sourceLineNo">203</span>  public Map&lt;byte[], TimeRange&gt; getColumnFamilyTimeRange() {<a name="line.203"></a>
-<span class="sourceLineNo">204</span>    return this.colFamTimeRangeMap;<a name="line.204"></a>
-<span class="sourceLineNo">205</span>  }<a name="line.205"></a>
-<span class="sourceLineNo">206</span>}<a name="line.206"></a>
+<span class="sourceLineNo">182</span><a name="line.182"></a>
+<span class="sourceLineNo">183</span>  /**<a name="line.183"></a>
+<span class="sourceLineNo">184</span>   * Get versions of columns only within the specified timestamp range,<a name="line.184"></a>
+<span class="sourceLineNo">185</span>   * [minStamp, maxStamp) on a per CF bases.  Note, default maximum versions to return is 1.  If<a name="line.185"></a>
+<span class="sourceLineNo">186</span>   * your time range spans more than one version and you want all versions<a name="line.186"></a>
+<span class="sourceLineNo">187</span>   * returned, up the number of versions beyond the default.<a name="line.187"></a>
+<span class="sourceLineNo">188</span>   * Column Family time ranges take precedence over the global time range.<a name="line.188"></a>
+<span class="sourceLineNo">189</span>   *<a name="line.189"></a>
+<span class="sourceLineNo">190</span>   * @param cf       the column family for which you want to restrict<a name="line.190"></a>
+<span class="sourceLineNo">191</span>   * @param minStamp minimum timestamp value, inclusive<a name="line.191"></a>
+<span class="sourceLineNo">192</span>   * @param maxStamp maximum timestamp value, exclusive<a name="line.192"></a>
+<span class="sourceLineNo">193</span>   * @return this<a name="line.193"></a>
+<span class="sourceLineNo">194</span>   */<a name="line.194"></a>
+<span class="sourceLineNo">195</span><a name="line.195"></a>
+<span class="sourceLineNo">196</span>  public Query setColumnFamilyTimeRange(byte[] cf, long minStamp, long maxStamp) {<a name="line.196"></a>
+<span class="sourceLineNo">197</span>    colFamTimeRangeMap.put(cf, new TimeRange(minStamp, maxStamp));<a name="line.197"></a>
+<span class="sourceLineNo">198</span>    return this;<a name="line.198"></a>
+<span class="sourceLineNo">199</span>  }<a name="line.199"></a>
+<span class="sourceLineNo">200</span><a name="line.200"></a>
+<span class="sourceLineNo">201</span>  /**<a name="line.201"></a>
+<span class="sourceLineNo">202</span>   * @return A map of column families to time ranges<a name="line.202"></a>
+<span class="sourceLineNo">203</span>   */<a name="line.203"></a>
+<span class="sourceLineNo">204</span>  public Map&lt;byte[], TimeRange&gt; getColumnFamilyTimeRange() {<a name="line.204"></a>
+<span class="sourceLineNo">205</span>    return this.colFamTimeRangeMap;<a name="line.205"></a>
+<span class="sourceLineNo">206</span>  }<a name="line.206"></a>
+<span class="sourceLineNo">207</span>}<a name="line.207"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/c7e84622/apidocs/src-html/org/apache/hadoop/hbase/client/Result.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/client/Result.html b/apidocs/src-html/org/apache/hadoop/hbase/client/Result.html
index 72920ba..c1efaa7 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/client/Result.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/client/Result.html
@@ -48,7 +48,7 @@
 <span class="sourceLineNo">040</span>import org.apache.hadoop.hbase.KeyValueUtil;<a name="line.40"></a>
 <span class="sourceLineNo">041</span>import org.apache.hadoop.hbase.classification.InterfaceAudience;<a name="line.41"></a>
 <span class="sourceLineNo">042</span>import org.apache.hadoop.hbase.classification.InterfaceStability;<a name="line.42"></a>
-<span class="sourceLineNo">043</span>import org.apache.hadoop.hbase.protobuf.generated.ClientProtos;<a name="line.43"></a>
+<span class="sourceLineNo">043</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos;<a name="line.43"></a>
 <span class="sourceLineNo">044</span>import org.apache.hadoop.hbase.util.Bytes;<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>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/c7e84622/apidocs/src-html/org/apache/hadoop/hbase/client/Scan.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/client/Scan.html b/apidocs/src-html/org/apache/hadoop/hbase/client/Scan.html
index c8ad36b..274255a 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/client/Scan.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/client/Scan.html
@@ -46,9 +46,9 @@
 <span class="sourceLineNo">038</span>import org.apache.hadoop.hbase.filter.Filter;<a name="line.38"></a>
 <span class="sourceLineNo">039</span>import org.apache.hadoop.hbase.filter.IncompatibleFilterException;<a name="line.39"></a>
 <span class="sourceLineNo">040</span>import org.apache.hadoop.hbase.io.TimeRange;<a name="line.40"></a>
-<span class="sourceLineNo">041</span>import org.apache.hadoop.hbase.protobuf.ProtobufUtil;<a name="line.41"></a>
-<span class="sourceLineNo">042</span>import org.apache.hadoop.hbase.security.access.Permission;<a name="line.42"></a>
-<span class="sourceLineNo">043</span>import org.apache.hadoop.hbase.security.visibility.Authorizations;<a name="line.43"></a>
+<span class="sourceLineNo">041</span>import org.apache.hadoop.hbase.security.access.Permission;<a name="line.41"></a>
+<span class="sourceLineNo">042</span>import org.apache.hadoop.hbase.security.visibility.Authorizations;<a name="line.42"></a>
+<span class="sourceLineNo">043</span>import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;<a name="line.43"></a>
 <span class="sourceLineNo">044</span>import org.apache.hadoop.hbase.util.Bytes;<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>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/c7e84622/apidocs/src-html/org/apache/hadoop/hbase/errorhandling/ForeignException.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/errorhandling/ForeignException.html b/apidocs/src-html/org/apache/hadoop/hbase/errorhandling/ForeignException.html
index f39c974..a746bcc 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/errorhandling/ForeignException.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/errorhandling/ForeignException.html
@@ -31,175 +31,176 @@
 <span class="sourceLineNo">023</span><a name="line.23"></a>
 <span class="sourceLineNo">024</span>import org.apache.hadoop.hbase.classification.InterfaceAudience;<a name="line.24"></a>
 <span class="sourceLineNo">025</span>import org.apache.hadoop.hbase.classification.InterfaceStability;<a name="line.25"></a>
-<span class="sourceLineNo">026</span>import org.apache.hadoop.hbase.protobuf.generated.ErrorHandlingProtos.ForeignExceptionMessage;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>import org.apache.hadoop.hbase.protobuf.generated.ErrorHandlingProtos.GenericExceptionMessage;<a name="line.27"></a>
-<span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.protobuf.generated.ErrorHandlingProtos.StackTraceElementMessage;<a name="line.28"></a>
+<span class="sourceLineNo">026</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.ErrorHandlingProtos.ForeignExceptionMessage;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.ErrorHandlingProtos.GenericExceptionMessage;<a name="line.27"></a>
+<span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.ErrorHandlingProtos.StackTraceElementMessage;<a name="line.28"></a>
 <span class="sourceLineNo">029</span><a name="line.29"></a>
-<span class="sourceLineNo">030</span>import com.google.protobuf.InvalidProtocolBufferException;<a name="line.30"></a>
-<span class="sourceLineNo">031</span><a name="line.31"></a>
-<span class="sourceLineNo">032</span>/**<a name="line.32"></a>
-<span class="sourceLineNo">033</span> * A ForeignException is an exception from another thread or process.<a name="line.33"></a>
-<span class="sourceLineNo">034</span> * &lt;p&gt;<a name="line.34"></a>
-<span class="sourceLineNo">035</span> * ForeignExceptions are sent to 'remote' peers to signal an abort in the face of failures.<a name="line.35"></a>
-<span class="sourceLineNo">036</span> * When serialized for transmission we encode using Protobufs to ensure version compatibility.<a name="line.36"></a>
-<span class="sourceLineNo">037</span> * &lt;p&gt;<a name="line.37"></a>
-<span class="sourceLineNo">038</span> * Foreign exceptions contain a Throwable as its cause.  This can be a "regular" exception<a name="line.38"></a>
-<span class="sourceLineNo">039</span> * generated locally or a ProxyThrowable that is a representation of the original exception<a name="line.39"></a>
-<span class="sourceLineNo">040</span> * created on original 'remote' source.  These ProxyThrowables have their their stacks traces and<a name="line.40"></a>
-<span class="sourceLineNo">041</span> * messages overridden to reflect the original 'remote' exception.  The only way these<a name="line.41"></a>
-<span class="sourceLineNo">042</span> * ProxyThrowables are generated are by this class's {@link #deserialize(byte[])} method.<a name="line.42"></a>
-<span class="sourceLineNo">043</span> */<a name="line.43"></a>
-<span class="sourceLineNo">044</span>@InterfaceAudience.Public<a name="line.44"></a>
-<span class="sourceLineNo">045</span>@InterfaceStability.Evolving<a name="line.45"></a>
-<span class="sourceLineNo">046</span>@SuppressWarnings("serial")<a name="line.46"></a>
-<span class="sourceLineNo">047</span>public class ForeignException extends IOException {<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>   * Name of the throwable's source such as a host or thread name.  Must be non-null.<a name="line.50"></a>
-<span class="sourceLineNo">051</span>   */<a name="line.51"></a>
-<span class="sourceLineNo">052</span>  private final String source;<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>   * Create a new ForeignException that can be serialized.  It is assumed that this came form a<a name="line.55"></a>
-<span class="sourceLineNo">056</span>   * local source.<a name="line.56"></a>
-<span class="sourceLineNo">057</span>   * @param source<a name="line.57"></a>
-<span class="sourceLineNo">058</span>   * @param cause<a name="line.58"></a>
-<span class="sourceLineNo">059</span>   */<a name="line.59"></a>
-<span class="sourceLineNo">060</span>  public ForeignException(String source, Throwable cause) {<a name="line.60"></a>
-<span class="sourceLineNo">061</span>    super(cause);<a name="line.61"></a>
-<span class="sourceLineNo">062</span>    assert source != null;<a name="line.62"></a>
-<span class="sourceLineNo">063</span>    assert cause != null;<a name="line.63"></a>
-<span class="sourceLineNo">064</span>    this.source = source;<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>  /**<a name="line.67"></a>
-<span class="sourceLineNo">068</span>   * Create a new ForeignException that can be serialized.  It is assumed that this is locally<a name="line.68"></a>
-<span class="sourceLineNo">069</span>   * generated.<a name="line.69"></a>
-<span class="sourceLineNo">070</span>   * @param source<a name="line.70"></a>
-<span class="sourceLineNo">071</span>   * @param msg<a name="line.71"></a>
-<span class="sourceLineNo">072</span>   */<a name="line.72"></a>
-<span class="sourceLineNo">073</span>  public ForeignException(String source, String msg) {<a name="line.73"></a>
-<span class="sourceLineNo">074</span>    super(new IllegalArgumentException(msg));<a name="line.74"></a>
-<span class="sourceLineNo">075</span>    this.source = source;<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>  public String getSource() {<a name="line.78"></a>
-<span class="sourceLineNo">079</span>    return source;<a name="line.79"></a>
-<span class="sourceLineNo">080</span>  }<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>   * The cause of a ForeignException can be an exception that was generated on a local in process<a name="line.83"></a>
-<span class="sourceLineNo">084</span>   * thread, or a thread from a 'remote' separate process.<a name="line.84"></a>
-<span class="sourceLineNo">085</span>   *<a name="line.85"></a>
-<span class="sourceLineNo">086</span>   * If the cause is a ProxyThrowable, we know it came from deserialization which usually means<a name="line.86"></a>
-<span class="sourceLineNo">087</span>   * it came from not only another thread, but also from a remote thread.<a name="line.87"></a>
-<span class="sourceLineNo">088</span>   *<a name="line.88"></a>
-<span class="sourceLineNo">089</span>   * @return true if went through deserialization, false if locally generated<a name="line.89"></a>
-<span class="sourceLineNo">090</span>   */<a name="line.90"></a>
-<span class="sourceLineNo">091</span>  public boolean isRemote() {<a name="line.91"></a>
-<span class="sourceLineNo">092</span>    return getCause() instanceof ProxyThrowable;<a name="line.92"></a>
-<span class="sourceLineNo">093</span>  }<a name="line.93"></a>
-<span class="sourceLineNo">094</span><a name="line.94"></a>
-<span class="sourceLineNo">095</span>  @Override<a name="line.95"></a>
-<span class="sourceLineNo">096</span>  public String toString() {<a name="line.96"></a>
-<span class="sourceLineNo">097</span>    String className = getCause().getClass().getName()  ;<a name="line.97"></a>
-<span class="sourceLineNo">098</span>    return className + " via " + getSource() + ":" + getLocalizedMessage();<a name="line.98"></a>
-<span class="sourceLineNo">099</span>  }<a name="line.99"></a>
-<span class="sourceLineNo">100</span><a name="line.100"></a>
-<span class="sourceLineNo">101</span>  /**<a name="line.101"></a>
-<span class="sourceLineNo">102</span>   * Convert a stack trace to list of {@link StackTraceElement}.<a name="line.102"></a>
-<span class="sourceLineNo">103</span>   * @param trace the stack trace to convert to protobuf message<a name="line.103"></a>
-<span class="sourceLineNo">104</span>   * @return &lt;tt&gt;null&lt;/tt&gt; if the passed stack is &lt;tt&gt;null&lt;/tt&gt;.<a name="line.104"></a>
-<span class="sourceLineNo">105</span>   */<a name="line.105"></a>
-<span class="sourceLineNo">106</span>  private static List&lt;StackTraceElementMessage&gt; toStackTraceElementMessages(<a name="line.106"></a>
-<span class="sourceLineNo">107</span>      StackTraceElement[] trace) {<a name="line.107"></a>
-<span class="sourceLineNo">108</span>    // if there is no stack trace, ignore it and just return the message<a name="line.108"></a>
-<span class="sourceLineNo">109</span>    if (trace == null) return null;<a name="line.109"></a>
-<span class="sourceLineNo">110</span>    // build the stack trace for the message<a name="line.110"></a>
-<span class="sourceLineNo">111</span>    List&lt;StackTraceElementMessage&gt; pbTrace =<a name="line.111"></a>
-<span class="sourceLineNo">112</span>        new ArrayList&lt;StackTraceElementMessage&gt;(trace.length);<a name="line.112"></a>
-<span class="sourceLineNo">113</span>    for (StackTraceElement elem : trace) {<a name="line.113"></a>
-<span class="sourceLineNo">114</span>      StackTraceElementMessage.Builder stackBuilder = StackTraceElementMessage.newBuilder();<a name="line.114"></a>
-<span class="sourceLineNo">115</span>      stackBuilder.setDeclaringClass(elem.getClassName());<a name="line.115"></a>
-<span class="sourceLineNo">116</span>      stackBuilder.setFileName(elem.getFileName());<a name="line.116"></a>
-<span class="sourceLineNo">117</span>      stackBuilder.setLineNumber(elem.getLineNumber());<a name="line.117"></a>
-<span class="sourceLineNo">118</span>      stackBuilder.setMethodName(elem.getMethodName());<a name="line.118"></a>
-<span class="sourceLineNo">119</span>      pbTrace.add(stackBuilder.build());<a name="line.119"></a>
-<span class="sourceLineNo">120</span>    }<a name="line.120"></a>
-<span class="sourceLineNo">121</span>    return pbTrace;<a name="line.121"></a>
-<span class="sourceLineNo">122</span>  }<a name="line.122"></a>
-<span class="sourceLineNo">123</span><a name="line.123"></a>
-<span class="sourceLineNo">124</span>  /**<a name="line.124"></a>
-<span class="sourceLineNo">125</span>   * This is a Proxy Throwable that contains the information of the original remote exception<a name="line.125"></a>
-<span class="sourceLineNo">126</span>   */<a name="line.126"></a>
-<span class="sourceLineNo">127</span>  private static class ProxyThrowable extends Throwable {<a name="line.127"></a>
-<span class="sourceLineNo">128</span>    ProxyThrowable(String msg, StackTraceElement[] trace) {<a name="line.128"></a>
-<span class="sourceLineNo">129</span>      super(msg);<a name="line.129"></a>
-<span class="sourceLineNo">130</span>      this.setStackTrace(trace);<a name="line.130"></a>
-<span class="sourceLineNo">131</span>    }<a name="line.131"></a>
-<span class="sourceLineNo">132</span>  }<a name="line.132"></a>
-<span class="sourceLineNo">133</span><a name="line.133"></a>
-<span class="sourceLineNo">134</span>  /**<a name="line.134"></a>
-<span class="sourceLineNo">135</span>   * Converts a ForeignException to an array of bytes.<a name="line.135"></a>
-<span class="sourceLineNo">136</span>   * @param source the name of the external exception source<a name="line.136"></a>
-<span class="sourceLineNo">137</span>   * @param t the "local" external exception (local)<a name="line.137"></a>
-<span class="sourceLineNo">138</span>   * @return protobuf serialized version of ForeignException<a name="line.138"></a>
-<span class="sourceLineNo">139</span>   */<a name="line.139"></a>
-<span class="sourceLineNo">140</span>  public static byte[] serialize(String source, Throwable t) {<a name="line.140"></a>
-<span class="sourceLineNo">141</span>    GenericExceptionMessage.Builder gemBuilder = GenericExceptionMessage.newBuilder();<a name="line.141"></a>
-<span class="sourceLineNo">142</span>    gemBuilder.setClassName(t.getClass().getName());<a name="line.142"></a>
-<span class="sourceLineNo">143</span>    if (t.getMessage() != null) {<a name="line.143"></a>
-<span class="sourceLineNo">144</span>      gemBuilder.setMessage(t.getMessage());<a name="line.144"></a>
-<span class="sourceLineNo">145</span>    }<a name="line.145"></a>
-<span class="sourceLineNo">146</span>    // set the stack trace, if there is one<a name="line.146"></a>
-<span class="sourceLineNo">147</span>    List&lt;StackTraceElementMessage&gt; stack =<a name="line.147"></a>
-<span class="sourceLineNo">148</span>        ForeignException.toStackTraceElementMessages(t.getStackTrace());<a name="line.148"></a>
-<span class="sourceLineNo">149</span>    if (stack != null) {<a name="line.149"></a>
-<span class="sourceLineNo">150</span>      gemBuilder.addAllTrace(stack);<a name="line.150"></a>
-<span class="sourceLineNo">151</span>    }<a name="line.151"></a>
-<span class="sourceLineNo">152</span>    GenericExceptionMessage payload = gemBuilder.build();<a name="line.152"></a>
-<span class="sourceLineNo">153</span>    ForeignExceptionMessage.Builder exception = ForeignExceptionMessage.newBuilder();<a name="line.153"></a>
-<span class="sourceLineNo">154</span>    exception.setGenericException(payload).setSource(source);<a name="line.154"></a>
-<span class="sourceLineNo">155</span>    ForeignExceptionMessage eem = exception.build();<a name="line.155"></a>
-<span class="sourceLineNo">156</span>    return eem.toByteArray();<a name="line.156"></a>
-<span class="sourceLineNo">157</span>  }<a name="line.157"></a>
-<span class="sourceLineNo">158</span><a name="line.158"></a>
-<span class="sourceLineNo">159</span>  /**<a name="line.159"></a>
-<span class="sourceLineNo">160</span>   * Takes a series of bytes and tries to generate an ForeignException instance for it.<a name="line.160"></a>
-<span class="sourceLineNo">161</span>   * @param bytes<a name="line.161"></a>
-<span class="sourceLineNo">162</span>   * @return the ForeignExcpetion instance<a name="line.162"></a>
-<span class="sourceLineNo">163</span>   * @throws InvalidProtocolBufferException if there was deserialization problem this is thrown.<a name="line.163"></a>
+<span class="sourceLineNo">030</span><a name="line.30"></a>
+<span class="sourceLineNo">031</span>/**<a name="line.31"></a>
+<span class="sourceLineNo">032</span> * A ForeignException is an exception from another thread or process.<a name="line.32"></a>
+<span class="sourceLineNo">033</span> * &lt;p&gt;<a name="line.33"></a>
+<span class="sourceLineNo">034</span> * ForeignExceptions are sent to 'remote' peers to signal an abort in the face of failures.<a name="line.34"></a>
+<span class="sourceLineNo">035</span> * When serialized for transmission we encode using Protobufs to ensure version compatibility.<a name="line.35"></a>
+<span class="sourceLineNo">036</span> * &lt;p&gt;<a name="line.36"></a>
+<span class="sourceLineNo">037</span> * Foreign exceptions contain a Throwable as its cause.  This can be a "regular" exception<a name="line.37"></a>
+<span class="sourceLineNo">038</span> * generated locally or a ProxyThrowable that is a representation of the original exception<a name="line.38"></a>
+<span class="sourceLineNo">039</span> * created on original 'remote' source.  These ProxyThrowables have their their stacks traces and<a name="line.39"></a>
+<span class="sourceLineNo">040</span> * messages overridden to reflect the original 'remote' exception.  The only way these<a name="line.40"></a>
+<span class="sourceLineNo">041</span> * ProxyThrowables are generated are by this class's {@link #deserialize(byte[])} method.<a name="line.41"></a>
+<span class="sourceLineNo">042</span> */<a name="line.42"></a>
+<span class="sourceLineNo">043</span>@InterfaceAudience.Public<a name="line.43"></a>
+<span class="sourceLineNo">044</span>@InterfaceStability.Evolving<a name="line.44"></a>
+<span class="sourceLineNo">045</span>@SuppressWarnings("serial")<a name="line.45"></a>
+<span class="sourceLineNo">046</span>public class ForeignException extends IOException {<a name="line.46"></a>
+<span class="sourceLineNo">047</span><a name="line.47"></a>
+<span class="sourceLineNo">048</span>  /**<a name="line.48"></a>
+<span class="sourceLineNo">049</span>   * Name of the throwable's source such as a host or thread name.  Must be non-null.<a name="line.49"></a>
+<span class="sourceLineNo">050</span>   */<a name="line.50"></a>
+<span class="sourceLineNo">051</span>  private final String source;<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>   * Create a new ForeignException that can be serialized.  It is assumed that this came form a<a name="line.54"></a>
+<span class="sourceLineNo">055</span>   * local source.<a name="line.55"></a>
+<span class="sourceLineNo">056</span>   * @param source<a name="line.56"></a>
+<span class="sourceLineNo">057</span>   * @param cause<a name="line.57"></a>
+<span class="sourceLineNo">058</span>   */<a name="line.58"></a>
+<span class="sourceLineNo">059</span>  public ForeignException(String source, Throwable cause) {<a name="line.59"></a>
+<span class="sourceLineNo">060</span>    super(cause);<a name="line.60"></a>
+<span class="sourceLineNo">061</span>    assert source != null;<a name="line.61"></a>
+<span class="sourceLineNo">062</span>    assert cause != null;<a name="line.62"></a>
+<span class="sourceLineNo">063</span>    this.source = source;<a name="line.63"></a>
+<span class="sourceLineNo">064</span>  }<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>   * Create a new ForeignException that can be serialized.  It is assumed that this is locally<a name="line.67"></a>
+<span class="sourceLineNo">068</span>   * generated.<a name="line.68"></a>
+<span class="sourceLineNo">069</span>   * @param source<a name="line.69"></a>
+<span class="sourceLineNo">070</span>   * @param msg<a name="line.70"></a>
+<span class="sourceLineNo">071</span>   */<a name="line.71"></a>
+<span class="sourceLineNo">072</span>  public ForeignException(String source, String msg) {<a name="line.72"></a>
+<span class="sourceLineNo">073</span>    super(new IllegalArgumentException(msg));<a name="line.73"></a>
+<span class="sourceLineNo">074</span>    this.source = source;<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>  public String getSource() {<a name="line.77"></a>
+<span class="sourceLineNo">078</span>    return source;<a name="line.78"></a>
+<span class="sourceLineNo">079</span>  }<a name="line.79"></a>
+<span class="sourceLineNo">080</span><a name="line.80"></a>
+<span class="sourceLineNo">081</span>  /**<a name="line.81"></a>
+<span class="sourceLineNo">082</span>   * The cause of a ForeignException can be an exception that was generated on a local in process<a name="line.82"></a>
+<span class="sourceLineNo">083</span>   * thread, or a thread from a 'remote' separate process.<a name="line.83"></a>
+<span class="sourceLineNo">084</span>   *<a name="line.84"></a>
+<span class="sourceLineNo">085</span>   * If the cause is a ProxyThrowable, we know it came from deserialization which usually means<a name="line.85"></a>
+<span class="sourceLineNo">086</span>   * it came from not only another thread, but also from a remote thread.<a name="line.86"></a>
+<span class="sourceLineNo">087</span>   *<a name="line.87"></a>
+<span class="sourceLineNo">088</span>   * @return true if went through deserialization, false if locally generated<a name="line.88"></a>
+<span class="sourceLineNo">089</span>   */<a name="line.89"></a>
+<span class="sourceLineNo">090</span>  public boolean isRemote() {<a name="line.90"></a>
+<span class="sourceLineNo">091</span>    return getCause() instanceof ProxyThrowable;<a name="line.91"></a>
+<span class="sourceLineNo">092</span>  }<a name="line.92"></a>
+<span class="sourceLineNo">093</span><a name="line.93"></a>
+<span class="sourceLineNo">094</span>  @Override<a name="line.94"></a>
+<span class="sourceLineNo">095</span>  public String toString() {<a name="line.95"></a>
+<span class="sourceLineNo">096</span>    String className = getCause().getClass().getName()  ;<a name="line.96"></a>
+<span class="sourceLineNo">097</span>    return className + " via " + getSource() + ":" + getLocalizedMessage();<a name="line.97"></a>
+<span class="sourceLineNo">098</span>  }<a name="line.98"></a>
+<span class="sourceLineNo">099</span><a name="line.99"></a>
+<span class="sourceLineNo">100</span>  /**<a name="line.100"></a>
+<span class="sourceLineNo">101</span>   * Convert a stack trace to list of {@link StackTraceElement}.<a name="line.101"></a>
+<span class="sourceLineNo">102</span>   * @param trace the stack trace to convert to protobuf message<a name="line.102"></a>
+<span class="sourceLineNo">103</span>   * @return &lt;tt&gt;null&lt;/tt&gt; if the passed stack is &lt;tt&gt;null&lt;/tt&gt;.<a name="line.103"></a>
+<span class="sourceLineNo">104</span>   */<a name="line.104"></a>
+<span class="sourceLineNo">105</span>  private static List&lt;StackTraceElementMessage&gt; toStackTraceElementMessages(<a name="line.105"></a>
+<span class="sourceLineNo">106</span>      StackTraceElement[] trace) {<a name="line.106"></a>
+<span class="sourceLineNo">107</span>    // if there is no stack trace, ignore it and just return the message<a name="line.107"></a>
+<span class="sourceLineNo">108</span>    if (trace == null) return null;<a name="line.108"></a>
+<span class="sourceLineNo">109</span>    // build the stack trace for the message<a name="line.109"></a>
+<span class="sourceLineNo">110</span>    List&lt;StackTraceElementMessage&gt; pbTrace =<a name="line.110"></a>
+<span class="sourceLineNo">111</span>        new ArrayList&lt;StackTraceElementMessage&gt;(trace.length);<a name="line.111"></a>
+<span class="sourceLineNo">112</span>    for (StackTraceElement elem : trace) {<a name="line.112"></a>
+<span class="sourceLineNo">113</span>      StackTraceElementMessage.Builder stackBuilder = StackTraceElementMessage.newBuilder();<a name="line.113"></a>
+<span class="sourceLineNo">114</span>      stackBuilder.setDeclaringClass(elem.getClassName());<a name="line.114"></a>
+<span class="sourceLineNo">115</span>      stackBuilder.setFileName(elem.getFileName());<a name="line.115"></a>
+<span class="sourceLineNo">116</span>      stackBuilder.setLineNumber(elem.getLineNumber());<a name="line.116"></a>
+<span class="sourceLineNo">117</span>      stackBuilder.setMethodName(elem.getMethodName());<a name="line.117"></a>
+<span class="sourceLineNo">118</span>      pbTrace.add(stackBuilder.build());<a name="line.118"></a>
+<span class="sourceLineNo">119</span>    }<a name="line.119"></a>
+<span class="sourceLineNo">120</span>    return pbTrace;<a name="line.120"></a>
+<span class="sourceLineNo">121</span>  }<a name="line.121"></a>
+<span class="sourceLineNo">122</span><a name="line.122"></a>
+<span class="sourceLineNo">123</span>  /**<a name="line.123"></a>
+<span class="sourceLineNo">124</span>   * This is a Proxy Throwable that contains the information of the original remote exception<a name="line.124"></a>
+<span class="sourceLineNo">125</span>   */<a name="line.125"></a>
+<span class="sourceLineNo">126</span>  private static class ProxyThrowable extends Throwable {<a name="line.126"></a>
+<span class="sourceLineNo">127</span>    ProxyThrowable(String msg, StackTraceElement[] trace) {<a name="line.127"></a>
+<span class="sourceLineNo">128</span>      super(msg);<a name="line.128"></a>
+<span class="sourceLineNo">129</span>      this.setStackTrace(trace);<a name="line.129"></a>
+<span class="sourceLineNo">130</span>    }<a name="line.130"></a>
+<span class="sourceLineNo">131</span>  }<a name="line.131"></a>
+<span class="sourceLineNo">132</span><a name="line.132"></a>
+<span class="sourceLineNo">133</span>  /**<a name="line.133"></a>
+<span class="sourceLineNo">134</span>   * Converts a ForeignException to an array of bytes.<a name="line.134"></a>
+<span class="sourceLineNo">135</span>   * @param source the name of the external exception source<a name="line.135"></a>
+<span class="sourceLineNo">136</span>   * @param t the "local" external exception (local)<a name="line.136"></a>
+<span class="sourceLineNo">137</span>   * @return protobuf serialized version of ForeignException<a name="line.137"></a>
+<span class="sourceLineNo">138</span>   */<a name="line.138"></a>
+<span class="sourceLineNo">139</span>  public static byte[] serialize(String source, Throwable t) {<a name="line.139"></a>
+<span class="sourceLineNo">140</span>    GenericExceptionMessage.Builder gemBuilder = GenericExceptionMessage.newBuilder();<a name="line.140"></a>
+<span class="sourceLineNo">141</span>    gemBuilder.setClassName(t.getClass().getName());<a name="line.141"></a>
+<span class="sourceLineNo">142</span>    if (t.getMessage() != null) {<a name="line.142"></a>
+<span class="sourceLineNo">143</span>      gemBuilder.setMessage(t.getMessage());<a name="line.143"></a>
+<span class="sourceLineNo">144</span>    }<a name="line.144"></a>
+<span class="sourceLineNo">145</span>    // set the stack trace, if there is one<a name="line.145"></a>
+<span class="sourceLineNo">146</span>    List&lt;StackTraceElementMessage&gt; stack =<a name="line.146"></a>
+<span class="sourceLineNo">147</span>        ForeignException.toStackTraceElementMessages(t.getStackTrace());<a name="line.147"></a>
+<span class="sourceLineNo">148</span>    if (stack != null) {<a name="line.148"></a>
+<span class="sourceLineNo">149</span>      gemBuilder.addAllTrace(stack);<a name="line.149"></a>
+<span class="sourceLineNo">150</span>    }<a name="line.150"></a>
+<span class="sourceLineNo">151</span>    GenericExceptionMessage payload = gemBuilder.build();<a name="line.151"></a>
+<span class="sourceLineNo">152</span>    ForeignExceptionMessage.Builder exception = ForeignExceptionMessage.newBuilder();<a name="line.152"></a>
+<span class="sourceLineNo">153</span>    exception.setGenericException(payload).setSource(source);<a name="line.153"></a>
+<span class="sourceLineNo">154</span>    ForeignExceptionMessage eem = exception.build();<a name="line.154"></a>
+<span class="sourceLineNo">155</span>    return eem.toByteArray();<a name="line.155"></a>
+<span class="sourceLineNo">156</span>  }<a name="line.156"></a>
+<span class="sourceLineNo">157</span><a name="line.157"></a>
+<span class="sourceLineNo">158</span>  /**<a name="line.158"></a>
+<span class="sourceLineNo">159</span>   * Takes a series of bytes and tries to generate an ForeignException instance for it.<a name="line.159"></a>
+<span class="sourceLineNo">160</span>   * @param bytes<a name="line.160"></a>
+<span class="sourceLineNo">161</span>   * @return the ForeignExcpetion instance<a name="line.161"></a>
+<span class="sourceLineNo">162</span>   * @throws InvalidProtocolBufferException if there was deserialization problem this is thrown.<a name="line.162"></a>
+<span class="sourceLineNo">163</span>   * @throws org.apache.hadoop.hbase.shaded.com.google.protobuf.InvalidProtocolBufferException <a name="line.163"></a>
 <span class="sourceLineNo">164</span>   */<a name="line.164"></a>
-<span class="sourceLineNo">165</span>  public static ForeignException deserialize(byte[] bytes) throws InvalidProtocolBufferException {<a name="line.165"></a>
-<span class="sourceLineNo">166</span>    // figure out the data we need to pass<a name="line.166"></a>
-<span class="sourceLineNo">167</span>    ForeignExceptionMessage eem = ForeignExceptionMessage.parseFrom(bytes);<a name="line.167"></a>
-<span class="sourceLineNo">168</span>    GenericExceptionMessage gem = eem.getGenericException();<a name="line.168"></a>
-<span class="sourceLineNo">169</span>    StackTraceElement [] trace = ForeignException.toStackTrace(gem.getTraceList());<a name="line.169"></a>
-<span class="sourceLineNo">170</span>    ProxyThrowable dfe = new ProxyThrowable(gem.getMessage(), trace);<a name="line.170"></a>
-<span class="sourceLineNo">171</span>    ForeignException e = new ForeignException(eem.getSource(), dfe);<a name="line.171"></a>
-<span class="sourceLineNo">172</span>    return e;<a name="line.172"></a>
-<span class="sourceLineNo">173</span>  }<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>   * Unwind a serialized array of {@link StackTraceElementMessage}s to a<a name="line.176"></a>
-<span class="sourceLineNo">177</span>   * {@link StackTraceElement}s.<a name="line.177"></a>
-<span class="sourceLineNo">178</span>   * @param traceList list that was serialized<a name="line.178"></a>
-<span class="sourceLineNo">179</span>   * @return the deserialized list or &lt;tt&gt;null&lt;/tt&gt; if it couldn't be unwound (e.g. wasn't set on<a name="line.179"></a>
-<span class="sourceLineNo">180</span>   *         the sender).<a name="line.180"></a>
-<span class="sourceLineNo">181</span>   */<a name="line.181"></a>
-<span class="sourceLineNo">182</span>  private static StackTraceElement[] toStackTrace(List&lt;StackTraceElementMessage&gt; traceList) {<a name="line.182"></a>
-<span class="sourceLineNo">183</span>    if (traceList == null || traceList.size() == 0) {<a name="line.183"></a>
-<span class="sourceLineNo">184</span>      return new StackTraceElement[0]; // empty array<a name="line.184"></a>
-<span class="sourceLineNo">185</span>    }<a name="line.185"></a>
-<span class="sourceLineNo">186</span>    StackTraceElement[] trace = new StackTraceElement[traceList.size()];<a name="line.186"></a>
-<span class="sourceLineNo">187</span>    for (int i = 0; i &lt; traceList.size(); i++) {<a name="line.187"></a>
-<span class="sourceLineNo">188</span>      StackTraceElementMessage elem = traceList.get(i);<a name="line.188"></a>
-<span class="sourceLineNo">189</span>      trace[i] = new StackTraceElement(<a name="line.189"></a>
-<span class="sourceLineNo">190</span>          elem.getDeclaringClass(), elem.getMethodName(), elem.getFileName(), elem.getLineNumber());<a name="line.190"></a>
-<span class="sourceLineNo">191</span>    }<a name="line.191"></a>
-<span class="sourceLineNo">192</span>    return trace;<a name="line.192"></a>
-<span class="sourceLineNo">193</span>  }<a name="line.193"></a>
-<span class="sourceLineNo">194</span>}<a name="line.194"></a>
+<span class="sourceLineNo">165</span>  public static ForeignException deserialize(byte[] bytes)<a name="line.165"></a>
+<span class="sourceLineNo">166</span>  throws IOException {<a name="line.166"></a>
+<span class="sourceLineNo">167</span>    // figure out the data we need to pass<a name="line.167"></a>
+<span class="sourceLineNo">168</span>    ForeignExceptionMessage eem = ForeignExceptionMessage.parseFrom(bytes);<a name="line.168"></a>
+<span class="sourceLineNo">169</span>    GenericExceptionMessage gem = eem.getGenericException();<a name="line.169"></a>
+<span class="sourceLineNo">170</span>    StackTraceElement [] trace = ForeignException.toStackTrace(gem.getTraceList());<a name="line.170"></a>
+<span class="sourceLineNo">171</span>    ProxyThrowable dfe = new ProxyThrowable(gem.getMessage(), trace);<a name="line.171"></a>
+<span class="sourceLineNo">172</span>    ForeignException e = new ForeignException(eem.getSource(), dfe);<a name="line.172"></a>
+<span class="sourceLineNo">173</span>    return e;<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>  /**<a name="line.176"></a>
+<span class="sourceLineNo">177</span>   * Unwind a serialized array of {@link StackTraceElementMessage}s to a<a name="line.177"></a>
+<span class="sourceLineNo">178</span>   * {@link StackTraceElement}s.<a name="line.178"></a>
+<span class="sourceLineNo">179</span>   * @param traceList list that was serialized<a name="line.179"></a>
+<span class="sourceLineNo">180</span>   * @return the deserialized list or &lt;tt&gt;null&lt;/tt&gt; if it couldn't be unwound (e.g. wasn't set on<a name="line.180"></a>
+<span class="sourceLineNo">181</span>   *         the sender).<a name="line.181"></a>
+<span class="sourceLineNo">182</span>   */<a name="line.182"></a>
+<span class="sourceLineNo">183</span>  private static StackTraceElement[] toStackTrace(List&lt;StackTraceElementMessage&gt; traceList) {<a name="line.183"></a>
+<span class="sourceLineNo">184</span>    if (traceList == null || traceList.size() == 0) {<a name="line.184"></a>
+<span class="sourceLineNo">185</span>      return new StackTraceElement[0]; // empty array<a name="line.185"></a>
+<span class="sourceLineNo">186</span>    }<a name="line.186"></a>
+<span class="sourceLineNo">187</span>    StackTraceElement[] trace = new StackTraceElement[traceList.size()];<a name="line.187"></a>
+<span class="sourceLineNo">188</span>    for (int i = 0; i &lt; traceList.size(); i++) {<a name="line.188"></a>
+<span class="sourceLineNo">189</span>      StackTraceElementMessage elem = traceList.get(i);<a name="line.189"></a>
+<span class="sourceLineNo">190</span>      trace[i] = new StackTraceElement(<a name="line.190"></a>
+<span class="sourceLineNo">191</span>          elem.getDeclaringClass(), elem.getMethodName(), elem.getFileName(), elem.getLineNumber());<a name="line.191"></a>
+<span class="sourceLineNo">192</span>    }<a name="line.192"></a>
+<span class="sourceLineNo">193</span>    return trace;<a name="line.193"></a>
+<span class="sourceLineNo">194</span>  }<a name="line.194"></a>
+<span class="sourceLineNo">195</span>}<a name="line.195"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/c7e84622/apidocs/src-html/org/apache/hadoop/hbase/filter/BinaryComparator.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/filter/BinaryComparator.html b/apidocs/src-html/org/apache/hadoop/hbase/filter/BinaryComparator.html
index 48031d3..5cc07a0 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/filter/BinaryComparator.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/filter/BinaryComparator.html
@@ -32,20 +32,20 @@
 <span class="sourceLineNo">024</span>import org.apache.hadoop.hbase.classification.InterfaceAudience;<a name="line.24"></a>
 <span class="sourceLineNo">025</span>import org.apache.hadoop.hbase.classification.InterfaceStability;<a name="line.25"></a>
 <span class="sourceLineNo">026</span>import org.apache.hadoop.hbase.exceptions.DeserializationException;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>import org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos;<a name="line.27"></a>
-<span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.util.ByteBufferUtils;<a name="line.28"></a>
-<span class="sourceLineNo">029</span>import org.apache.hadoop.hbase.util.Bytes;<a name="line.29"></a>
-<span class="sourceLineNo">030</span><a name="line.30"></a>
-<span class="sourceLineNo">031</span>import com.google.protobuf.InvalidProtocolBufferException;<a name="line.31"></a>
-<span class="sourceLineNo">032</span><a name="line.32"></a>
-<span class="sourceLineNo">033</span>/**<a name="line.33"></a>
-<span class="sourceLineNo">034</span> * A binary comparator which lexicographically compares against the specified<a name="line.34"></a>
-<span class="sourceLineNo">035</span> * byte array using {@link org.apache.hadoop.hbase.util.Bytes#compareTo(byte[], byte[])}.<a name="line.35"></a>
-<span class="sourceLineNo">036</span> */<a name="line.36"></a>
-<span class="sourceLineNo">037</span>@InterfaceAudience.Public<a name="line.37"></a>
-<span class="sourceLineNo">038</span>@InterfaceStability.Stable<a name="line.38"></a>
-<span class="sourceLineNo">039</span>public class BinaryComparator extends ByteArrayComparable {<a name="line.39"></a>
-<span class="sourceLineNo">040</span><a name="line.40"></a>
+<span class="sourceLineNo">027</span>import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;<a name="line.27"></a>
+<span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.ComparatorProtos;<a name="line.28"></a>
+<span class="sourceLineNo">029</span>import org.apache.hadoop.hbase.util.ByteBufferUtils;<a name="line.29"></a>
+<span class="sourceLineNo">030</span>import org.apache.hadoop.hbase.util.Bytes;<a name="line.30"></a>
+<span class="sourceLineNo">031</span><a name="line.31"></a>
+<span class="sourceLineNo">032</span>import org.apache.hadoop.hbase.shaded.com.google.protobuf.InvalidProtocolBufferException;<a name="line.32"></a>
+<span class="sourceLineNo">033</span><a name="line.33"></a>
+<span class="sourceLineNo">034</span>/**<a name="line.34"></a>
+<span class="sourceLineNo">035</span> * A binary comparator which lexicographically compares against the specified<a name="line.35"></a>
+<span class="sourceLineNo">036</span> * byte array using {@link org.apache.hadoop.hbase.util.Bytes#compareTo(byte[], byte[])}.<a name="line.36"></a>
+<span class="sourceLineNo">037</span> */<a name="line.37"></a>
+<span class="sourceLineNo">038</span>@InterfaceAudience.Public<a name="line.38"></a>
+<span class="sourceLineNo">039</span>@InterfaceStability.Stable<a name="line.39"></a>
+<span class="sourceLineNo">040</span>public class BinaryComparator extends org.apache.hadoop.hbase.filter.ByteArrayComparable {<a name="line.40"></a>
 <span class="sourceLineNo">041</span>  /**<a name="line.41"></a>
 <span class="sourceLineNo">042</span>   * Constructor<a name="line.42"></a>
 <span class="sourceLineNo">043</span>   * @param value value<a name="line.43"></a>
@@ -70,7 +70,7 @@
 <span class="sourceLineNo">062</span>  public byte [] toByteArray() {<a name="line.62"></a>
 <span class="sourceLineNo">063</span>    ComparatorProtos.BinaryComparator.Builder builder =<a name="line.63"></a>
 <span class="sourceLineNo">064</span>      ComparatorProtos.BinaryComparator.newBuilder();<a name="line.64"></a>
-<span class="sourceLineNo">065</span>    builder.setComparable(super.convert());<a name="line.65"></a>
+<span class="sourceLineNo">065</span>    builder.setComparable(ProtobufUtil.toByteArrayComparable(this.value));<a name="line.65"></a>
 <span class="sourceLineNo">066</span>    return builder.build().toByteArray();<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>


Mime
View raw message