hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [19/52] [partial] hbase-site git commit: Published site at 61220e4d7c8d7e5fb8ed3bbe2469bc86632c48de.
Date Wed, 07 Dec 2016 18:24:25 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/d9f3c819/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 13eb321..8c761aa 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/client/Query.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/client/Query.html
@@ -25,229 +25,265 @@
 <span class="sourceLineNo">017</span> */<a name="line.17"></a>
 <span class="sourceLineNo">018</span>package org.apache.hadoop.hbase.client;<a name="line.18"></a>
 <span class="sourceLineNo">019</span><a name="line.19"></a>
-<span class="sourceLineNo">020</span>import java.util.Map;<a name="line.20"></a>
-<span class="sourceLineNo">021</span><a name="line.21"></a>
-<span class="sourceLineNo">022</span>import com.google.common.collect.Maps;<a name="line.22"></a>
-<span class="sourceLineNo">023</span>import org.apache.hadoop.hbase.classification.InterfaceAudience;<a name="line.23"></a>
-<span class="sourceLineNo">024</span>import org.apache.hadoop.hbase.classification.InterfaceStability;<a name="line.24"></a>
-<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.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>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>  protected Boolean loadColumnFamiliesOnDemand = null;<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">020</span>import java.io.IOException;<a name="line.20"></a>
+<span class="sourceLineNo">021</span>import java.util.Map;<a name="line.21"></a>
+<span class="sourceLineNo">022</span><a name="line.22"></a>
+<span class="sourceLineNo">023</span>import com.google.common.collect.Maps;<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.exceptions.DeserializationException;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import org.apache.hadoop.hbase.filter.Filter;<a name="line.27"></a>
+<span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.io.TimeRange;<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">030</span>import org.apache.hadoop.hbase.security.access.AccessControlUtil;<a name="line.30"></a>
+<span class="sourceLineNo">031</span>import org.apache.hadoop.hbase.security.access.Permission;<a name="line.31"></a>
+<span class="sourceLineNo">032</span>import org.apache.hadoop.hbase.security.visibility.Authorizations;<a name="line.32"></a>
+<span class="sourceLineNo">033</span>import org.apache.hadoop.hbase.security.visibility.VisibilityConstants;<a name="line.33"></a>
+<span class="sourceLineNo">034</span>import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;<a name="line.34"></a>
+<span class="sourceLineNo">035</span><a name="line.35"></a>
+<span class="sourceLineNo">036</span>import com.google.common.collect.ArrayListMultimap;<a name="line.36"></a>
+<span class="sourceLineNo">037</span>import com.google.common.collect.ListMultimap;<a name="line.37"></a>
+<span class="sourceLineNo">038</span>import org.apache.hadoop.hbase.util.Bytes;<a name="line.38"></a>
+<span class="sourceLineNo">039</span><a name="line.39"></a>
+<span class="sourceLineNo">040</span>@InterfaceAudience.Public<a name="line.40"></a>
+<span class="sourceLineNo">041</span>@InterfaceStability.Evolving<a name="line.41"></a>
+<span class="sourceLineNo">042</span>public abstract class Query extends OperationWithAttributes {<a name="line.42"></a>
+<span class="sourceLineNo">043</span>  private static final String ISOLATION_LEVEL = "_isolationlevel_";<a name="line.43"></a>
+<span class="sourceLineNo">044</span>  protected Filter filter = null;<a name="line.44"></a>
+<span class="sourceLineNo">045</span>  protected int targetReplicaId = -1;<a name="line.45"></a>
+<span class="sourceLineNo">046</span>  protected Consistency consistency = Consistency.STRONG;<a name="line.46"></a>
+<span class="sourceLineNo">047</span>  protected Map&lt;byte[], TimeRange&gt; colFamTimeRangeMap = Maps.newTreeMap(Bytes.BYTES_COMPARATOR);<a name="line.47"></a>
+<span class="sourceLineNo">048</span>  protected Boolean loadColumnFamiliesOnDemand = null;<a name="line.48"></a>
+<span class="sourceLineNo">049</span>  protected TimeRange tr = new TimeRange();<a name="line.49"></a>
+<span class="sourceLineNo">050</span>  /**<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>  public Filter getFilter() {<a name="line.53"></a>
+<span class="sourceLineNo">054</span>    return filter;<a name="line.54"></a>
+<span class="sourceLineNo">055</span>  }<a name="line.55"></a>
+<span class="sourceLineNo">056</span><a name="line.56"></a>
+<span class="sourceLineNo">057</span>  /**<a name="line.57"></a>
+<span class="sourceLineNo">058</span>   * Apply the specified server-side filter when performing the Query.<a name="line.58"></a>
+<span class="sourceLineNo">059</span>   * Only {@link Filter#filterKeyValue(Cell)} is called AFTER all tests<a name="line.59"></a>
+<span class="sourceLineNo">060</span>   * for ttl, column match, deletes and max versions have been run.<a name="line.60"></a>
+<span class="sourceLineNo">061</span>   * @param filter filter to run on the server<a name="line.61"></a>
+<span class="sourceLineNo">062</span>   * @return this for invocation chaining<a name="line.62"></a>
+<span class="sourceLineNo">063</span>   */<a name="line.63"></a>
+<span class="sourceLineNo">064</span>  public Query setFilter(Filter filter) {<a name="line.64"></a>
+<span class="sourceLineNo">065</span>    this.filter = filter;<a name="line.65"></a>
+<span class="sourceLineNo">066</span>    return this;<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>  /**<a name="line.69"></a>
+<span class="sourceLineNo">070</span>   * @return TimeRange<a name="line.70"></a>
+<span class="sourceLineNo">071</span>   */<a name="line.71"></a>
+<span class="sourceLineNo">072</span>  public TimeRange getTimeRange() {<a name="line.72"></a>
+<span class="sourceLineNo">073</span>    return tr;<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>   * Sets the TimeRange to be used by this Query<a name="line.77"></a>
+<span class="sourceLineNo">078</span>   * @param tr TimeRange<a name="line.78"></a>
+<span class="sourceLineNo">079</span>   * @return Query<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>   * Set the value indicating whether loading CFs on demand should be allowed (cluster<a name="line.183"></a>
-<span class="sourceLineNo">184</span>   * default is false). On-demand CF loading doesn't load column families until necessary, e.g.<a name="line.184"></a>
-<span class="sourceLineNo">185</span>   * if you filter on one column, the other column family data will be loaded only for the rows<a name="line.185"></a>
-<span class="sourceLineNo">186</span>   * that are included in result, not all rows like in normal case.<a name="line.186"></a>
-<span class="sourceLineNo">187</span>   * With column-specific filters, like SingleColumnValueFilter w/filterIfMissing == true,<a name="line.187"></a>
-<span class="sourceLineNo">188</span>   * this can deliver huge perf gains when there's a cf with lots of data; however, it can<a name="line.188"></a>
-<span class="sourceLineNo">189</span>   * also lead to some inconsistent results, as follows:<a name="line.189"></a>
-<span class="sourceLineNo">190</span>   * - if someone does a concurrent update to both column families in question you may get a row<a name="line.190"></a>
-<span class="sourceLineNo">191</span>   *   that never existed, e.g. for { rowKey = 5, { cat_videos =&amp;gt; 1 }, { video =&amp;gt; "my cat" } }<a name="line.191"></a>
-<span class="sourceLineNo">192</span>   *   someone puts rowKey 5 with { cat_videos =&amp;gt; 0 }, { video =&amp;gt; "my dog" }, concurrent scan<a name="line.192"></a>
-<span class="sourceLineNo">193</span>   *   filtering on "cat_videos == 1" can get { rowKey = 5, { cat_videos =&amp;gt; 1 },<a name="line.193"></a>
-<span class="sourceLineNo">194</span>   *   { video =&amp;gt; "my dog" } }.<a name="line.194"></a>
-<span class="sourceLineNo">195</span>   * - if there's a concurrent split and you have more than 2 column families, some rows may be<a name="line.195"></a>
-<span class="sourceLineNo">196</span>   *   missing some column families.<a name="line.196"></a>
-<span class="sourceLineNo">197</span>   */<a name="line.197"></a>
-<span class="sourceLineNo">198</span>  public Query setLoadColumnFamiliesOnDemand(boolean value) {<a name="line.198"></a>
-<span class="sourceLineNo">199</span>    this.loadColumnFamiliesOnDemand = value;<a name="line.199"></a>
-<span class="sourceLineNo">200</span>    return this;<a name="line.200"></a>
-<span class="sourceLineNo">201</span>  }<a name="line.201"></a>
-<span class="sourceLineNo">202</span><a name="line.202"></a>
-<span class="sourceLineNo">203</span>  /**<a name="line.203"></a>
-<span class="sourceLineNo">204</span>   * Get the raw loadColumnFamiliesOnDemand setting; if it's not set, can be null.<a name="line.204"></a>
-<span class="sourceLineNo">205</span>   */<a name="line.205"></a>
-<span class="sourceLineNo">206</span>  public Boolean getLoadColumnFamiliesOnDemandValue() {<a name="line.206"></a>
-<span class="sourceLineNo">207</span>    return this.loadColumnFamiliesOnDemand;<a name="line.207"></a>
-<span class="sourceLineNo">208</span>  }<a name="line.208"></a>
-<span class="sourceLineNo">209</span><a name="line.209"></a>
-<span class="sourceLineNo">210</span>  /**<a name="line.210"></a>
-<span class="sourceLineNo">211</span>   * Get the logical value indicating whether on-demand CF loading should be allowed.<a name="line.211"></a>
-<span class="sourceLineNo">212</span>   */<a name="line.212"></a>
-<span class="sourceLineNo">213</span>  public boolean doLoadColumnFamiliesOnDemand() {<a name="line.213"></a>
-<span class="sourceLineNo">214</span>    return (this.loadColumnFamiliesOnDemand != null)<a name="line.214"></a>
-<span class="sourceLineNo">215</span>      &amp;&amp; this.loadColumnFamiliesOnDemand;<a name="line.215"></a>
-<span class="sourceLineNo">216</span>  }<a name="line.216"></a>
-<span class="sourceLineNo">217</span><a name="line.217"></a>
-<span class="sourceLineNo">218</span>  /**<a name="line.218"></a>
-<span class="sourceLineNo">219</span>   * Get versions of columns only within the specified timestamp range,<a name="line.219"></a>
-<span class="sourceLineNo">220</span>   * [minStamp, maxStamp) on a per CF bases.  Note, default maximum versions to return is 1.  If<a name="line.220"></a>
-<span class="sourceLineNo">221</span>   * your time range spans more than one version and you want all versions<a name="line.221"></a>
-<span class="sourceLineNo">222</span>   * returned, up the number of versions beyond the default.<a name="line.222"></a>
-<span class="sourceLineNo">223</span>   * Column Family time ranges take precedence over the global time range.<a name="line.223"></a>
-<span class="sourceLineNo">224</span>   *<a name="line.224"></a>
-<span class="sourceLineNo">225</span>   * @param cf       the column family for which you want to restrict<a name="line.225"></a>
-<span class="sourceLineNo">226</span>   * @param minStamp minimum timestamp value, inclusive<a name="line.226"></a>
-<span class="sourceLineNo">227</span>   * @param maxStamp maximum timestamp value, exclusive<a name="line.227"></a>
-<span class="sourceLineNo">228</span>   * @return this<a name="line.228"></a>
+<span class="sourceLineNo">081</span>  public Query setTimeRange(TimeRange tr) {<a name="line.81"></a>
+<span class="sourceLineNo">082</span>    this.tr = tr;<a name="line.82"></a>
+<span class="sourceLineNo">083</span>    return this;<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>   * Sets the TimeRange to be used by this Query<a name="line.87"></a>
+<span class="sourceLineNo">088</span>   * [minStamp, maxStamp).<a name="line.88"></a>
+<span class="sourceLineNo">089</span>   * @param minStamp minimum timestamp value, inclusive<a name="line.89"></a>
+<span class="sourceLineNo">090</span>   * @param maxStamp maximum timestamp value, exclusive<a name="line.90"></a>
+<span class="sourceLineNo">091</span>   * @throws IOException<a name="line.91"></a>
+<span class="sourceLineNo">092</span>   * @return this for invocation chaining<a name="line.92"></a>
+<span class="sourceLineNo">093</span>   */<a name="line.93"></a>
+<span class="sourceLineNo">094</span>  public Query setTimeRange(long minStamp, long maxStamp) throws IOException {<a name="line.94"></a>
+<span class="sourceLineNo">095</span>    tr = new TimeRange(minStamp, maxStamp);<a name="line.95"></a>
+<span class="sourceLineNo">096</span>    return this;<a name="line.96"></a>
+<span class="sourceLineNo">097</span>  }<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>   * Sets the authorizations to be used by this Query<a name="line.100"></a>
+<span class="sourceLineNo">101</span>   * @param authorizations<a name="line.101"></a>
+<span class="sourceLineNo">102</span>   */<a name="line.102"></a>
+<span class="sourceLineNo">103</span>  public Query setAuthorizations(Authorizations authorizations) {<a name="line.103"></a>
+<span class="sourceLineNo">104</span>    this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, ProtobufUtil<a name="line.104"></a>
+<span class="sourceLineNo">105</span>        .toAuthorizations(authorizations).toByteArray());<a name="line.105"></a>
+<span class="sourceLineNo">106</span>    return this;<a name="line.106"></a>
+<span class="sourceLineNo">107</span>  }<a name="line.107"></a>
+<span class="sourceLineNo">108</span><a name="line.108"></a>
+<span class="sourceLineNo">109</span>  /**<a name="line.109"></a>
+<span class="sourceLineNo">110</span>   * @return The authorizations this Query is associated with.<a name="line.110"></a>
+<span class="sourceLineNo">111</span>   * @throws DeserializationException<a name="line.111"></a>
+<span class="sourceLineNo">112</span>   */<a name="line.112"></a>
+<span class="sourceLineNo">113</span>  public Authorizations getAuthorizations() throws DeserializationException {<a name="line.113"></a>
+<span class="sourceLineNo">114</span>    byte[] authorizationsBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY);<a name="line.114"></a>
+<span class="sourceLineNo">115</span>    if (authorizationsBytes == null) return null;<a name="line.115"></a>
+<span class="sourceLineNo">116</span>    return ProtobufUtil.toAuthorizations(authorizationsBytes);<a name="line.116"></a>
+<span class="sourceLineNo">117</span>  }<a name="line.117"></a>
+<span class="sourceLineNo">118</span><a name="line.118"></a>
+<span class="sourceLineNo">119</span>  /**<a name="line.119"></a>
+<span class="sourceLineNo">120</span>   * @return The serialized ACL for this operation, or null if none<a name="line.120"></a>
+<span class="sourceLineNo">121</span>   */<a name="line.121"></a>
+<span class="sourceLineNo">122</span>  public byte[] getACL() {<a name="line.122"></a>
+<span class="sourceLineNo">123</span>    return getAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL);<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>  /**<a name="line.126"></a>
+<span class="sourceLineNo">127</span>   * @param user User short name<a name="line.127"></a>
+<span class="sourceLineNo">128</span>   * @param perms Permissions for the user<a name="line.128"></a>
+<span class="sourceLineNo">129</span>   */<a name="line.129"></a>
+<span class="sourceLineNo">130</span>  public Query setACL(String user, Permission perms) {<a name="line.130"></a>
+<span class="sourceLineNo">131</span>    setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,<a name="line.131"></a>
+<span class="sourceLineNo">132</span>      AccessControlUtil.toUsersAndPermissions(user, perms).toByteArray());<a name="line.132"></a>
+<span class="sourceLineNo">133</span>    return this;<a name="line.133"></a>
+<span class="sourceLineNo">134</span>  }<a name="line.134"></a>
+<span class="sourceLineNo">135</span><a name="line.135"></a>
+<span class="sourceLineNo">136</span>  /**<a name="line.136"></a>
+<span class="sourceLineNo">137</span>   * @param perms A map of permissions for a user or users<a name="line.137"></a>
+<span class="sourceLineNo">138</span>   */<a name="line.138"></a>
+<span class="sourceLineNo">139</span>  public Query setACL(Map&lt;String, Permission&gt; perms) {<a name="line.139"></a>
+<span class="sourceLineNo">140</span>    ListMultimap&lt;String, Permission&gt; permMap = ArrayListMultimap.create();<a name="line.140"></a>
+<span class="sourceLineNo">141</span>    for (Map.Entry&lt;String, Permission&gt; entry : perms.entrySet()) {<a name="line.141"></a>
+<span class="sourceLineNo">142</span>      permMap.put(entry.getKey(), entry.getValue());<a name="line.142"></a>
+<span class="sourceLineNo">143</span>    }<a name="line.143"></a>
+<span class="sourceLineNo">144</span>    setAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL,<a name="line.144"></a>
+<span class="sourceLineNo">145</span>        AccessControlUtil.toUsersAndPermissions(permMap).toByteArray());<a name="line.145"></a>
+<span class="sourceLineNo">146</span>    return this;<a name="line.146"></a>
+<span class="sourceLineNo">147</span>  }<a name="line.147"></a>
+<span class="sourceLineNo">148</span><a name="line.148"></a>
+<span class="sourceLineNo">149</span>  /**<a name="line.149"></a>
+<span class="sourceLineNo">150</span>   * Returns the consistency level for this operation<a name="line.150"></a>
+<span class="sourceLineNo">151</span>   * @return the consistency level<a name="line.151"></a>
+<span class="sourceLineNo">152</span>   */<a name="line.152"></a>
+<span class="sourceLineNo">153</span>  public Consistency getConsistency() {<a name="line.153"></a>
+<span class="sourceLineNo">154</span>    return consistency;<a name="line.154"></a>
+<span class="sourceLineNo">155</span>  }<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>   * Sets the consistency level for this operation<a name="line.158"></a>
+<span class="sourceLineNo">159</span>   * @param consistency the consistency level<a name="line.159"></a>
+<span class="sourceLineNo">160</span>   */<a name="line.160"></a>
+<span class="sourceLineNo">161</span>  public Query setConsistency(Consistency consistency) {<a name="line.161"></a>
+<span class="sourceLineNo">162</span>    this.consistency = consistency;<a name="line.162"></a>
+<span class="sourceLineNo">163</span>    return this;<a name="line.163"></a>
+<span class="sourceLineNo">164</span>  }<a name="line.164"></a>
+<span class="sourceLineNo">165</span><a name="line.165"></a>
+<span class="sourceLineNo">166</span>  /**<a name="line.166"></a>
+<span class="sourceLineNo">167</span>   * Specify region replica id where Query will fetch data from. Use this together with<a name="line.167"></a>
+<span class="sourceLineNo">168</span>   * {@link #setConsistency(Consistency)} passing {@link Consistency#TIMELINE} to read data from<a name="line.168"></a>
+<span class="sourceLineNo">169</span>   * a specific replicaId.<a name="line.169"></a>
+<span class="sourceLineNo">170</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.170"></a>
+<span class="sourceLineNo">171</span>   * @param Id<a name="line.171"></a>
+<span class="sourceLineNo">172</span>   */<a name="line.172"></a>
+<span class="sourceLineNo">173</span>  public Query setReplicaId(int Id) {<a name="line.173"></a>
+<span class="sourceLineNo">174</span>    this.targetReplicaId = Id;<a name="line.174"></a>
+<span class="sourceLineNo">175</span>    return this;<a name="line.175"></a>
+<span class="sourceLineNo">176</span>  }<a name="line.176"></a>
+<span class="sourceLineNo">177</span><a name="line.177"></a>
+<span class="sourceLineNo">178</span>  /**<a name="line.178"></a>
+<span class="sourceLineNo">179</span>   * Returns region replica id where Query will fetch data from.<a name="line.179"></a>
+<span class="sourceLineNo">180</span>   * @return region replica id or -1 if not set.<a name="line.180"></a>
+<span class="sourceLineNo">181</span>   */<a name="line.181"></a>
+<span class="sourceLineNo">182</span>  public int getReplicaId() {<a name="line.182"></a>
+<span class="sourceLineNo">183</span>    return this.targetReplicaId;<a name="line.183"></a>
+<span class="sourceLineNo">184</span>  }<a name="line.184"></a>
+<span class="sourceLineNo">185</span><a name="line.185"></a>
+<span class="sourceLineNo">186</span>  /**<a name="line.186"></a>
+<span class="sourceLineNo">187</span>   * Set the isolation level for this query. If the<a name="line.187"></a>
+<span class="sourceLineNo">188</span>   * isolation level is set to READ_UNCOMMITTED, then<a name="line.188"></a>
+<span class="sourceLineNo">189</span>   * this query will return data from committed and<a name="line.189"></a>
+<span class="sourceLineNo">190</span>   * uncommitted transactions. If the isolation level<a name="line.190"></a>
+<span class="sourceLineNo">191</span>   * is set to READ_COMMITTED, then this query will return<a name="line.191"></a>
+<span class="sourceLineNo">192</span>   * data from committed transactions only. If a isolation<a name="line.192"></a>
+<span class="sourceLineNo">193</span>   * level is not explicitly set on a Query, then it<a name="line.193"></a>
+<span class="sourceLineNo">194</span>   * is assumed to be READ_COMMITTED.<a name="line.194"></a>
+<span class="sourceLineNo">195</span>   * @param level IsolationLevel for this query<a name="line.195"></a>
+<span class="sourceLineNo">196</span>   */<a name="line.196"></a>
+<span class="sourceLineNo">197</span>  public Query setIsolationLevel(IsolationLevel level) {<a name="line.197"></a>
+<span class="sourceLineNo">198</span>    setAttribute(ISOLATION_LEVEL, level.toBytes());<a name="line.198"></a>
+<span class="sourceLineNo">199</span>    return this;<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>  /**<a name="line.202"></a>
+<span class="sourceLineNo">203</span>   * @return The isolation level of this query.<a name="line.203"></a>
+<span class="sourceLineNo">204</span>   * If no isolation level was set for this query object,<a name="line.204"></a>
+<span class="sourceLineNo">205</span>   * then it returns READ_COMMITTED.<a name="line.205"></a>
+<span class="sourceLineNo">206</span>   * @return The IsolationLevel for this query<a name="line.206"></a>
+<span class="sourceLineNo">207</span>   */<a name="line.207"></a>
+<span class="sourceLineNo">208</span>  public IsolationLevel getIsolationLevel() {<a name="line.208"></a>
+<span class="sourceLineNo">209</span>    byte[] attr = getAttribute(ISOLATION_LEVEL);<a name="line.209"></a>
+<span class="sourceLineNo">210</span>    return attr == null ? IsolationLevel.READ_COMMITTED :<a name="line.210"></a>
+<span class="sourceLineNo">211</span>                          IsolationLevel.fromBytes(attr);<a name="line.211"></a>
+<span class="sourceLineNo">212</span>  }<a name="line.212"></a>
+<span class="sourceLineNo">213</span><a name="line.213"></a>
+<span class="sourceLineNo">214</span>  /**<a name="line.214"></a>
+<span class="sourceLineNo">215</span>   * Set the value indicating whether loading CFs on demand should be allowed (cluster<a name="line.215"></a>
+<span class="sourceLineNo">216</span>   * default is false). On-demand CF loading doesn't load column families until necessary, e.g.<a name="line.216"></a>
+<span class="sourceLineNo">217</span>   * if you filter on one column, the other column family data will be loaded only for the rows<a name="line.217"></a>
+<span class="sourceLineNo">218</span>   * that are included in result, not all rows like in normal case.<a name="line.218"></a>
+<span class="sourceLineNo">219</span>   * With column-specific filters, like SingleColumnValueFilter w/filterIfMissing == true,<a name="line.219"></a>
+<span class="sourceLineNo">220</span>   * this can deliver huge perf gains when there's a cf with lots of data; however, it can<a name="line.220"></a>
+<span class="sourceLineNo">221</span>   * also lead to some inconsistent results, as follows:<a name="line.221"></a>
+<span class="sourceLineNo">222</span>   * - if someone does a concurrent update to both column families in question you may get a row<a name="line.222"></a>
+<span class="sourceLineNo">223</span>   *   that never existed, e.g. for { rowKey = 5, { cat_videos =&amp;gt; 1 }, { video =&amp;gt; "my cat" } }<a name="line.223"></a>
+<span class="sourceLineNo">224</span>   *   someone puts rowKey 5 with { cat_videos =&amp;gt; 0 }, { video =&amp;gt; "my dog" }, concurrent scan<a name="line.224"></a>
+<span class="sourceLineNo">225</span>   *   filtering on "cat_videos == 1" can get { rowKey = 5, { cat_videos =&amp;gt; 1 },<a name="line.225"></a>
+<span class="sourceLineNo">226</span>   *   { video =&amp;gt; "my dog" } }.<a name="line.226"></a>
+<span class="sourceLineNo">227</span>   * - if there's a concurrent split and you have more than 2 column families, some rows may be<a name="line.227"></a>
+<span class="sourceLineNo">228</span>   *   missing some column families.<a name="line.228"></a>
 <span class="sourceLineNo">229</span>   */<a name="line.229"></a>
-<span class="sourceLineNo">230</span><a name="line.230"></a>
-<span class="sourceLineNo">231</span>  public Query setColumnFamilyTimeRange(byte[] cf, long minStamp, long maxStamp) {<a name="line.231"></a>
-<span class="sourceLineNo">232</span>    colFamTimeRangeMap.put(cf, new TimeRange(minStamp, maxStamp));<a name="line.232"></a>
-<span class="sourceLineNo">233</span>    return this;<a name="line.233"></a>
-<span class="sourceLineNo">234</span>  }<a name="line.234"></a>
-<span class="sourceLineNo">235</span><a name="line.235"></a>
-<span class="sourceLineNo">236</span>  /**<a name="line.236"></a>
-<span class="sourceLineNo">237</span>   * @return A map of column families to time ranges<a name="line.237"></a>
-<span class="sourceLineNo">238</span>   */<a name="line.238"></a>
-<span class="sourceLineNo">239</span>  public Map&lt;byte[], TimeRange&gt; getColumnFamilyTimeRange() {<a name="line.239"></a>
-<span class="sourceLineNo">240</span>    return this.colFamTimeRangeMap;<a name="line.240"></a>
-<span class="sourceLineNo">241</span>  }<a name="line.241"></a>
-<span class="sourceLineNo">242</span>}<a name="line.242"></a>
+<span class="sourceLineNo">230</span>  public Query setLoadColumnFamiliesOnDemand(boolean value) {<a name="line.230"></a>
+<span class="sourceLineNo">231</span>    this.loadColumnFamiliesOnDemand = value;<a name="line.231"></a>
+<span class="sourceLineNo">232</span>    return this;<a name="line.232"></a>
+<span class="sourceLineNo">233</span>  }<a name="line.233"></a>
+<span class="sourceLineNo">234</span><a name="line.234"></a>
+<span class="sourceLineNo">235</span>  /**<a name="line.235"></a>
+<span class="sourceLineNo">236</span>   * Get the raw loadColumnFamiliesOnDemand setting; if it's not set, can be null.<a name="line.236"></a>
+<span class="sourceLineNo">237</span>   */<a name="line.237"></a>
+<span class="sourceLineNo">238</span>  public Boolean getLoadColumnFamiliesOnDemandValue() {<a name="line.238"></a>
+<span class="sourceLineNo">239</span>    return this.loadColumnFamiliesOnDemand;<a name="line.239"></a>
+<span class="sourceLineNo">240</span>  }<a name="line.240"></a>
+<span class="sourceLineNo">241</span><a name="line.241"></a>
+<span class="sourceLineNo">242</span>  /**<a name="line.242"></a>
+<span class="sourceLineNo">243</span>   * Get the logical value indicating whether on-demand CF loading should be allowed.<a name="line.243"></a>
+<span class="sourceLineNo">244</span>   */<a name="line.244"></a>
+<span class="sourceLineNo">245</span>  public boolean doLoadColumnFamiliesOnDemand() {<a name="line.245"></a>
+<span class="sourceLineNo">246</span>    return (this.loadColumnFamiliesOnDemand != null)<a name="line.246"></a>
+<span class="sourceLineNo">247</span>      &amp;&amp; this.loadColumnFamiliesOnDemand;<a name="line.247"></a>
+<span class="sourceLineNo">248</span>  }<a name="line.248"></a>
+<span class="sourceLineNo">249</span><a name="line.249"></a>
+<span class="sourceLineNo">250</span>  /**<a name="line.250"></a>
+<span class="sourceLineNo">251</span>   * Get versions of columns only within the specified timestamp range,<a name="line.251"></a>
+<span class="sourceLineNo">252</span>   * [minStamp, maxStamp) on a per CF bases.  Note, default maximum versions to return is 1.  If<a name="line.252"></a>
+<span class="sourceLineNo">253</span>   * your time range spans more than one version and you want all versions<a name="line.253"></a>
+<span class="sourceLineNo">254</span>   * returned, up the number of versions beyond the default.<a name="line.254"></a>
+<span class="sourceLineNo">255</span>   * Column Family time ranges take precedence over the global time range.<a name="line.255"></a>
+<span class="sourceLineNo">256</span>   *<a name="line.256"></a>
+<span class="sourceLineNo">257</span>   * @param cf       the column family for which you want to restrict<a name="line.257"></a>
+<span class="sourceLineNo">258</span>   * @param minStamp minimum timestamp value, inclusive<a name="line.258"></a>
+<span class="sourceLineNo">259</span>   * @param maxStamp maximum timestamp value, exclusive<a name="line.259"></a>
+<span class="sourceLineNo">260</span>   * @return this<a name="line.260"></a>
+<span class="sourceLineNo">261</span>   */<a name="line.261"></a>
+<span class="sourceLineNo">262</span>  public Query setColumnFamilyTimeRange(byte[] cf, long minStamp, long maxStamp) {<a name="line.262"></a>
+<span class="sourceLineNo">263</span>    colFamTimeRangeMap.put(cf, new TimeRange(minStamp, maxStamp));<a name="line.263"></a>
+<span class="sourceLineNo">264</span>    return this;<a name="line.264"></a>
+<span class="sourceLineNo">265</span>  }<a name="line.265"></a>
+<span class="sourceLineNo">266</span><a name="line.266"></a>
+<span class="sourceLineNo">267</span>  public Query setColumnFamilyTimeRange(byte[] cf, TimeRange tr) {<a name="line.267"></a>
+<span class="sourceLineNo">268</span>    colFamTimeRangeMap.put(cf, tr);<a name="line.268"></a>
+<span class="sourceLineNo">269</span>    return this;<a name="line.269"></a>
+<span class="sourceLineNo">270</span>  }<a name="line.270"></a>
+<span class="sourceLineNo">271</span><a name="line.271"></a>
+<span class="sourceLineNo">272</span>  /**<a name="line.272"></a>
+<span class="sourceLineNo">273</span>   * @return A map of column families to time ranges<a name="line.273"></a>
+<span class="sourceLineNo">274</span>   */<a name="line.274"></a>
+<span class="sourceLineNo">275</span>  public Map&lt;byte[], TimeRange&gt; getColumnFamilyTimeRange() {<a name="line.275"></a>
+<span class="sourceLineNo">276</span>    return this.colFamTimeRangeMap;<a name="line.276"></a>
+<span class="sourceLineNo">277</span>  }<a name="line.277"></a>
+<span class="sourceLineNo">278</span>}<a name="line.278"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/d9f3c819/apidocs/src-html/org/apache/hadoop/hbase/client/ResultScanner.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/client/ResultScanner.html b/apidocs/src-html/org/apache/hadoop/hbase/client/ResultScanner.html
index b4a82d7..d9a4a9a 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/client/ResultScanner.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/client/ResultScanner.html
@@ -28,45 +28,103 @@
 <span class="sourceLineNo">020</span><a name="line.20"></a>
 <span class="sourceLineNo">021</span>import java.io.Closeable;<a name="line.21"></a>
 <span class="sourceLineNo">022</span>import java.io.IOException;<a name="line.22"></a>
-<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><a name="line.26"></a>
-<span class="sourceLineNo">027</span>/**<a name="line.27"></a>
-<span class="sourceLineNo">028</span> * Interface for client-side scanning.<a name="line.28"></a>
-<span class="sourceLineNo">029</span> * Go to {@link Table} to obtain instances.<a name="line.29"></a>
-<span class="sourceLineNo">030</span> */<a name="line.30"></a>
-<span class="sourceLineNo">031</span>@InterfaceAudience.Public<a name="line.31"></a>
-<span class="sourceLineNo">032</span>@InterfaceStability.Stable<a name="line.32"></a>
-<span class="sourceLineNo">033</span>public interface ResultScanner extends Closeable, Iterable&lt;Result&gt; {<a name="line.33"></a>
-<span class="sourceLineNo">034</span><a name="line.34"></a>
-<span class="sourceLineNo">035</span>  /**<a name="line.35"></a>
-<span class="sourceLineNo">036</span>   * Grab the next row's worth of values. The scanner will return a Result.<a name="line.36"></a>
-<span class="sourceLineNo">037</span>   * @return Result object if there is another row, null if the scanner is<a name="line.37"></a>
-<span class="sourceLineNo">038</span>   * exhausted.<a name="line.38"></a>
-<span class="sourceLineNo">039</span>   * @throws IOException e<a name="line.39"></a>
-<span class="sourceLineNo">040</span>   */<a name="line.40"></a>
-<span class="sourceLineNo">041</span>  Result next() throws IOException;<a name="line.41"></a>
-<span class="sourceLineNo">042</span><a name="line.42"></a>
-<span class="sourceLineNo">043</span>  /**<a name="line.43"></a>
-<span class="sourceLineNo">044</span>   * @param nbRows number of rows to return<a name="line.44"></a>
-<span class="sourceLineNo">045</span>   * @return Between zero and nbRows results<a name="line.45"></a>
-<span class="sourceLineNo">046</span>   * @throws IOException e<a name="line.46"></a>
-<span class="sourceLineNo">047</span>   */<a name="line.47"></a>
-<span class="sourceLineNo">048</span>  Result [] next(int nbRows) throws IOException;<a name="line.48"></a>
-<span class="sourceLineNo">049</span><a name="line.49"></a>
-<span class="sourceLineNo">050</span>  /**<a name="line.50"></a>
-<span class="sourceLineNo">051</span>   * Closes the scanner and releases any resources it has allocated<a name="line.51"></a>
-<span class="sourceLineNo">052</span>   */<a name="line.52"></a>
-<span class="sourceLineNo">053</span>  @Override<a name="line.53"></a>
-<span class="sourceLineNo">054</span>  void close();<a name="line.54"></a>
-<span class="sourceLineNo">055</span><a name="line.55"></a>
-<span class="sourceLineNo">056</span>  /**<a name="line.56"></a>
-<span class="sourceLineNo">057</span>   * Allow the client to renew the scanner's lease on the server.<a name="line.57"></a>
-<span class="sourceLineNo">058</span>   * @return true if the lease was successfully renewed, false otherwise.<a name="line.58"></a>
-<span class="sourceLineNo">059</span>   */<a name="line.59"></a>
-<span class="sourceLineNo">060</span>  boolean renewLease();<a name="line.60"></a>
-<span class="sourceLineNo">061</span>}<a name="line.61"></a>
+<span class="sourceLineNo">023</span>import java.io.UncheckedIOException;<a name="line.23"></a>
+<span class="sourceLineNo">024</span>import java.util.ArrayList;<a name="line.24"></a>
+<span class="sourceLineNo">025</span>import java.util.Iterator;<a name="line.25"></a>
+<span class="sourceLineNo">026</span>import java.util.List;<a name="line.26"></a>
+<span class="sourceLineNo">027</span><a name="line.27"></a>
+<span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.classification.InterfaceAudience;<a name="line.28"></a>
+<span class="sourceLineNo">029</span>import org.apache.hadoop.hbase.classification.InterfaceStability;<a name="line.29"></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> * Interface for client-side scanning. Go to {@link Table} to obtain instances.<a name="line.32"></a>
+<span class="sourceLineNo">033</span> */<a name="line.33"></a>
+<span class="sourceLineNo">034</span>@InterfaceAudience.Public<a name="line.34"></a>
+<span class="sourceLineNo">035</span>@InterfaceStability.Stable<a name="line.35"></a>
+<span class="sourceLineNo">036</span>public interface ResultScanner extends Closeable, Iterable&lt;Result&gt; {<a name="line.36"></a>
+<span class="sourceLineNo">037</span><a name="line.37"></a>
+<span class="sourceLineNo">038</span>  @Override<a name="line.38"></a>
+<span class="sourceLineNo">039</span>  default Iterator&lt;Result&gt; iterator() {<a name="line.39"></a>
+<span class="sourceLineNo">040</span>    return new Iterator&lt;Result&gt;() {<a name="line.40"></a>
+<span class="sourceLineNo">041</span>      // The next RowResult, possibly pre-read<a name="line.41"></a>
+<span class="sourceLineNo">042</span>      Result next = null;<a name="line.42"></a>
+<span class="sourceLineNo">043</span><a name="line.43"></a>
+<span class="sourceLineNo">044</span>      // return true if there is another item pending, false if there isn't.<a name="line.44"></a>
+<span class="sourceLineNo">045</span>      // this method is where the actual advancing takes place, but you need<a name="line.45"></a>
+<span class="sourceLineNo">046</span>      // to call next() to consume it. hasNext() will only advance if there<a name="line.46"></a>
+<span class="sourceLineNo">047</span>      // isn't a pending next().<a name="line.47"></a>
+<span class="sourceLineNo">048</span>      @Override<a name="line.48"></a>
+<span class="sourceLineNo">049</span>      public boolean hasNext() {<a name="line.49"></a>
+<span class="sourceLineNo">050</span>        if (next != null) {<a name="line.50"></a>
+<span class="sourceLineNo">051</span>          return true;<a name="line.51"></a>
+<span class="sourceLineNo">052</span>        }<a name="line.52"></a>
+<span class="sourceLineNo">053</span>        try {<a name="line.53"></a>
+<span class="sourceLineNo">054</span>          return (next = ResultScanner.this.next()) != null;<a name="line.54"></a>
+<span class="sourceLineNo">055</span>        } catch (IOException e) {<a name="line.55"></a>
+<span class="sourceLineNo">056</span>          throw new UncheckedIOException(e);<a name="line.56"></a>
+<span class="sourceLineNo">057</span>        }<a name="line.57"></a>
+<span class="sourceLineNo">058</span>      }<a name="line.58"></a>
+<span class="sourceLineNo">059</span><a name="line.59"></a>
+<span class="sourceLineNo">060</span>      // get the pending next item and advance the iterator. returns null if<a name="line.60"></a>
+<span class="sourceLineNo">061</span>      // there is no next item.<a name="line.61"></a>
+<span class="sourceLineNo">062</span>      @Override<a name="line.62"></a>
+<span class="sourceLineNo">063</span>      public Result next() {<a name="line.63"></a>
+<span class="sourceLineNo">064</span>        // since hasNext() does the real advancing, we call this to determine<a name="line.64"></a>
+<span class="sourceLineNo">065</span>        // if there is a next before proceeding.<a name="line.65"></a>
+<span class="sourceLineNo">066</span>        if (!hasNext()) {<a name="line.66"></a>
+<span class="sourceLineNo">067</span>          return null;<a name="line.67"></a>
+<span class="sourceLineNo">068</span>        }<a name="line.68"></a>
+<span class="sourceLineNo">069</span><a name="line.69"></a>
+<span class="sourceLineNo">070</span>        // if we get to here, then hasNext() has given us an item to return.<a name="line.70"></a>
+<span class="sourceLineNo">071</span>        // we want to return the item and then null out the next pointer, so<a name="line.71"></a>
+<span class="sourceLineNo">072</span>        // we use a temporary variable.<a name="line.72"></a>
+<span class="sourceLineNo">073</span>        Result temp = next;<a name="line.73"></a>
+<span class="sourceLineNo">074</span>        next = null;<a name="line.74"></a>
+<span class="sourceLineNo">075</span>        return temp;<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>  }<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>   * Grab the next row's worth of values. The scanner will return a Result.<a name="line.81"></a>
+<span class="sourceLineNo">082</span>   * @return Result object if there is another row, null if the scanner is exhausted.<a name="line.82"></a>
+<span class="sourceLineNo">083</span>   * @throws IOException e<a name="line.83"></a>
+<span class="sourceLineNo">084</span>   */<a name="line.84"></a>
+<span class="sourceLineNo">085</span>  Result next() throws IOException;<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>   * Get nbRows rows. How many RPCs are made is determined by the {@link Scan#setCaching(int)}<a name="line.88"></a>
+<span class="sourceLineNo">089</span>   * setting (or hbase.client.scanner.caching in hbase-site.xml).<a name="line.89"></a>
+<span class="sourceLineNo">090</span>   * @param nbRows number of rows to return<a name="line.90"></a>
+<span class="sourceLineNo">091</span>   * @return Between zero and nbRows rowResults. Scan is done if returned array is of zero-length<a name="line.91"></a>
+<span class="sourceLineNo">092</span>   *         (We never return null).<a name="line.92"></a>
+<span class="sourceLineNo">093</span>   * @throws IOException<a name="line.93"></a>
+<span class="sourceLineNo">094</span>   */<a name="line.94"></a>
+<span class="sourceLineNo">095</span>  default Result[] next(int nbRows) throws IOException {<a name="line.95"></a>
+<span class="sourceLineNo">096</span>    List&lt;Result&gt; resultSets = new ArrayList&lt;&gt;(nbRows);<a name="line.96"></a>
+<span class="sourceLineNo">097</span>    for (int i = 0; i &lt; nbRows; i++) {<a name="line.97"></a>
+<span class="sourceLineNo">098</span>      Result next = next();<a name="line.98"></a>
+<span class="sourceLineNo">099</span>      if (next != null) {<a name="line.99"></a>
+<span class="sourceLineNo">100</span>        resultSets.add(next);<a name="line.100"></a>
+<span class="sourceLineNo">101</span>      } else {<a name="line.101"></a>
+<span class="sourceLineNo">102</span>        break;<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>    return resultSets.toArray(new Result[0]);<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>
+<span class="sourceLineNo">108</span>  /**<a name="line.108"></a>
+<span class="sourceLineNo">109</span>   * Closes the scanner and releases any resources it has allocated<a name="line.109"></a>
+<span class="sourceLineNo">110</span>   */<a name="line.110"></a>
+<span class="sourceLineNo">111</span>  @Override<a name="line.111"></a>
+<span class="sourceLineNo">112</span>  void close();<a name="line.112"></a>
+<span class="sourceLineNo">113</span><a name="line.113"></a>
+<span class="sourceLineNo">114</span>  /**<a name="line.114"></a>
+<span class="sourceLineNo">115</span>   * Allow the client to renew the scanner's lease on the server.<a name="line.115"></a>
+<span class="sourceLineNo">116</span>   * @return true if the lease was successfully renewed, false otherwise.<a name="line.116"></a>
+<span class="sourceLineNo">117</span>   */<a name="line.117"></a>
+<span class="sourceLineNo">118</span>  boolean renewLease();<a name="line.118"></a>
+<span class="sourceLineNo">119</span>}<a name="line.119"></a>
 
 
 


Mime
View raw message