http://git-wip-us.apache.org/repos/asf/hbase-site/blob/5c0cc30a/apidocs/overview-tree.html ---------------------------------------------------------------------- diff --git a/apidocs/overview-tree.html b/apidocs/overview-tree.html index 3f23fa9..4ee39bb 100644 --- a/apidocs/overview-tree.html +++ b/apidocs/overview-tree.html @@ -825,23 +825,23 @@ <ul> <li type="circle">org.apache.hadoop.hbase.util.<a href="org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util"><span class="strong">Order</span></a></li> <li type="circle">org.apache.hadoop.hbase.<a href="org/apache/hadoop/hbase/KeepDeletedCells.html" title="enum in org.apache.hadoop.hbase"><span class="strong">KeepDeletedCells</span></a></li> -<li type="circle">org.apache.hadoop.hbase.io.encoding.<a href="org/apache/hadoop/hbase/io/encoding/DataBlockEncoding.html" title="enum in org.apache.hadoop.hbase.io.encoding"><span class="strong">DataBlockEncoding</span></a></li> <li type="circle">org.apache.hadoop.hbase.filter.<a href="org/apache/hadoop/hbase/filter/Filter.ReturnCode.html" title="enum in org.apache.hadoop.hbase.filter"><span class="strong">Filter.ReturnCode</span></a></li> -<li type="circle">org.apache.hadoop.hbase.filter.<a href="org/apache/hadoop/hbase/filter/BitComparator.BitwiseOp.html" title="enum in org.apache.hadoop.hbase.filter"><span class="strong">BitComparator.BitwiseOp</span></a></li> -<li type="circle">org.apache.hadoop.hbase.filter.<a href="org/apache/hadoop/hbase/filter/FilterList.Operator.html" title="enum in org.apache.hadoop.hbase.filter"><span class="strong">FilterList.Operator</span></a></li> <li type="circle">org.apache.hadoop.hbase.filter.<a href="org/apache/hadoop/hbase/filter/RegexStringComparator.EngineType.html" title="enum in org.apache.hadoop.hbase.filter"><span class="strong">RegexStringComparator.EngineType</span></a></li> <li type="circle">org.apache.hadoop.hbase.filter.<a href="org/apache/hadoop/hbase/filter/CompareFilter.CompareOp.html" title="enum in org.apache.hadoop.hbase.filter"><span class="strong">CompareFilter.CompareOp</span></a></li> -<li type="circle">org.apache.hadoop.hbase.client.<a href="org/apache/hadoop/hbase/client/Durability.html" title="enum in org.apache.hadoop.hbase.client"><span class="strong">Durability</span></a></li> +<li type="circle">org.apache.hadoop.hbase.filter.<a href="org/apache/hadoop/hbase/filter/BitComparator.BitwiseOp.html" title="enum in org.apache.hadoop.hbase.filter"><span class="strong">BitComparator.BitwiseOp</span></a></li> +<li type="circle">org.apache.hadoop.hbase.filter.<a href="org/apache/hadoop/hbase/filter/FilterList.Operator.html" title="enum in org.apache.hadoop.hbase.filter"><span class="strong">FilterList.Operator</span></a></li> +<li type="circle">org.apache.hadoop.hbase.io.encoding.<a href="org/apache/hadoop/hbase/io/encoding/DataBlockEncoding.html" title="enum in org.apache.hadoop.hbase.io.encoding"><span class="strong">DataBlockEncoding</span></a></li> +<li type="circle">org.apache.hadoop.hbase.quotas.<a href="org/apache/hadoop/hbase/quotas/QuotaType.html" title="enum in org.apache.hadoop.hbase.quotas"><span class="strong">QuotaType</span></a></li> +<li type="circle">org.apache.hadoop.hbase.quotas.<a href="org/apache/hadoop/hbase/quotas/QuotaScope.html" title="enum in org.apache.hadoop.hbase.quotas"><span class="strong">QuotaScope</span></a></li> +<li type="circle">org.apache.hadoop.hbase.quotas.<a href="org/apache/hadoop/hbase/quotas/ThrottlingException.Type.html" title="enum in org.apache.hadoop.hbase.quotas"><span class="strong">ThrottlingException.Type</span></a></li> +<li type="circle">org.apache.hadoop.hbase.quotas.<a href="org/apache/hadoop/hbase/quotas/ThrottleType.html" title="enum in org.apache.hadoop.hbase.quotas"><span class="strong">ThrottleType</span></a></li> +<li type="circle">org.apache.hadoop.hbase.regionserver.<a href="org/apache/hadoop/hbase/regionserver/BloomType.html" title="enum in org.apache.hadoop.hbase.regionserver"><span class="strong">BloomType</span></a></li> <li type="circle">org.apache.hadoop.hbase.client.<a href="org/apache/hadoop/hbase/client/IsolationLevel.html" title="enum in org.apache.hadoop.hbase.client"><span class="strong">IsolationLevel</span></a></li> +<li type="circle">org.apache.hadoop.hbase.client.<a href="org/apache/hadoop/hbase/client/Durability.html" title="enum in org.apache.hadoop.hbase.client"><span class="strong">Durability</span></a></li> <li type="circle">org.apache.hadoop.hbase.client.<a href="org/apache/hadoop/hbase/client/Admin.CompactType.html" title="enum in org.apache.hadoop.hbase.client"><span class="strong">Admin.CompactType</span></a></li> <li type="circle">org.apache.hadoop.hbase.client.<a href="org/apache/hadoop/hbase/client/Admin.MasterSwitchType.html" title="enum in org.apache.hadoop.hbase.client"><span class="strong">Admin.MasterSwitchType</span></a></li> <li type="circle">org.apache.hadoop.hbase.client.<a href="org/apache/hadoop/hbase/client/Consistency.html" title="enum in org.apache.hadoop.hbase.client"><span class="strong">Consistency</span></a></li> <li type="circle">org.apache.hadoop.hbase.client.security.<a href="org/apache/hadoop/hbase/client/security/SecurityCapability.html" title="enum in org.apache.hadoop.hbase.client.security"><span class="strong">SecurityCapability</span></a></li> -<li type="circle">org.apache.hadoop.hbase.regionserver.<a href="org/apache/hadoop/hbase/regionserver/BloomType.html" title="enum in org.apache.hadoop.hbase.regionserver"><span class="strong">BloomType</span></a></li> -<li type="circle">org.apache.hadoop.hbase.quotas.<a href="org/apache/hadoop/hbase/quotas/ThrottlingException.Type.html" title="enum in org.apache.hadoop.hbase.quotas"><span class="strong">ThrottlingException.Type</span></a></li> -<li type="circle">org.apache.hadoop.hbase.quotas.<a href="org/apache/hadoop/hbase/quotas/QuotaType.html" title="enum in org.apache.hadoop.hbase.quotas"><span class="strong">QuotaType</span></a></li> -<li type="circle">org.apache.hadoop.hbase.quotas.<a href="org/apache/hadoop/hbase/quotas/QuotaScope.html" title="enum in org.apache.hadoop.hbase.quotas"><span class="strong">QuotaScope</span></a></li> -<li type="circle">org.apache.hadoop.hbase.quotas.<a href="org/apache/hadoop/hbase/quotas/ThrottleType.html" title="enum in org.apache.hadoop.hbase.quotas"><span class="strong">ThrottleType</span></a></li> </ul> </li> </ul>
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/5c0cc30a/apidocs/src-html/org/apache/hadoop/hbase/io/TimeRange.html ---------------------------------------------------------------------- diff --git a/apidocs/src-html/org/apache/hadoop/hbase/io/TimeRange.html b/apidocs/src-html/org/apache/hadoop/hbase/io/TimeRange.html index 75af40f..01ec142 100644 --- a/apidocs/src-html/org/apache/hadoop/hbase/io/TimeRange.html +++ b/apidocs/src-html/org/apache/hadoop/hbase/io/TimeRange.html @@ -44,155 +44,163 @@ <span class="sourceLineNo">036</span>@InterfaceAudience.Public<a name="line.36"></a> <span class="sourceLineNo">037</span>@InterfaceStability.Stable<a name="line.37"></a> <span class="sourceLineNo">038</span>public class TimeRange {<a name="line.38"></a> -<span class="sourceLineNo">039</span> private long minStamp = 0L;<a name="line.39"></a> -<span class="sourceLineNo">040</span> private long maxStamp = Long.MAX_VALUE;<a name="line.40"></a> -<span class="sourceLineNo">041</span> private boolean allTime = false;<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> * Default constructor.<a name="line.44"></a> -<span class="sourceLineNo">045</span> * Represents interval [0, Long.MAX_VALUE) (allTime)<a name="line.45"></a> -<span class="sourceLineNo">046</span> */<a name="line.46"></a> -<span class="sourceLineNo">047</span> public TimeRange() {<a name="line.47"></a> -<span class="sourceLineNo">048</span> allTime = true;<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> /**<a name="line.51"></a> -<span class="sourceLineNo">052</span> * Represents interval [minStamp, Long.MAX_VALUE)<a name="line.52"></a> -<span class="sourceLineNo">053</span> * @param minStamp the minimum timestamp value, inclusive<a name="line.53"></a> -<span class="sourceLineNo">054</span> */<a name="line.54"></a> -<span class="sourceLineNo">055</span> public TimeRange(long minStamp) {<a name="line.55"></a> -<span class="sourceLineNo">056</span> this.minStamp = minStamp;<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> * Represents interval [minStamp, Long.MAX_VALUE)<a name="line.60"></a> -<span class="sourceLineNo">061</span> * @param minStamp the minimum timestamp value, inclusive<a name="line.61"></a> -<span class="sourceLineNo">062</span> */<a name="line.62"></a> -<span class="sourceLineNo">063</span> public TimeRange(byte [] minStamp) {<a name="line.63"></a> -<span class="sourceLineNo">064</span> this.minStamp = Bytes.toLong(minStamp);<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> * Represents interval [minStamp, maxStamp)<a name="line.68"></a> -<span class="sourceLineNo">069</span> * @param minStamp the minimum timestamp, inclusive<a name="line.69"></a> -<span class="sourceLineNo">070</span> * @param maxStamp the maximum timestamp, exclusive<a name="line.70"></a> -<span class="sourceLineNo">071</span> * @throws IllegalArgumentException<a name="line.71"></a> -<span class="sourceLineNo">072</span> */<a name="line.72"></a> -<span class="sourceLineNo">073</span> public TimeRange(long minStamp, long maxStamp) {<a name="line.73"></a> -<span class="sourceLineNo">074</span> if (minStamp < 0 || maxStamp < 0) {<a name="line.74"></a> -<span class="sourceLineNo">075</span> throw new IllegalArgumentException("Timestamp cannot be negative. minStamp:" + minStamp<a name="line.75"></a> -<span class="sourceLineNo">076</span> + ", maxStamp:" + maxStamp);<a name="line.76"></a> -<span class="sourceLineNo">077</span> }<a name="line.77"></a> -<span class="sourceLineNo">078</span> if(maxStamp < minStamp) {<a name="line.78"></a> -<span class="sourceLineNo">079</span> throw new IllegalArgumentException("maxStamp is smaller than minStamp");<a name="line.79"></a> -<span class="sourceLineNo">080</span> }<a name="line.80"></a> -<span class="sourceLineNo">081</span> this.minStamp = minStamp;<a name="line.81"></a> -<span class="sourceLineNo">082</span> this.maxStamp = maxStamp;<a name="line.82"></a> -<span class="sourceLineNo">083</span> }<a name="line.83"></a> -<span class="sourceLineNo">084</span><a name="line.84"></a> -<span class="sourceLineNo">085</span> /**<a name="line.85"></a> -<span class="sourceLineNo">086</span> * Represents interval [minStamp, maxStamp)<a name="line.86"></a> -<span class="sourceLineNo">087</span> * @param minStamp the minimum timestamp, inclusive<a name="line.87"></a> -<span class="sourceLineNo">088</span> * @param maxStamp the maximum timestamp, exclusive<a name="line.88"></a> -<span class="sourceLineNo">089</span> * @throws IOException<a name="line.89"></a> -<span class="sourceLineNo">090</span> */<a name="line.90"></a> -<span class="sourceLineNo">091</span> public TimeRange(byte [] minStamp, byte [] maxStamp)<a name="line.91"></a> -<span class="sourceLineNo">092</span> throws IOException {<a name="line.92"></a> -<span class="sourceLineNo">093</span> this(Bytes.toLong(minStamp), Bytes.toLong(maxStamp));<a name="line.93"></a> -<span class="sourceLineNo">094</span> }<a name="line.94"></a> -<span class="sourceLineNo">095</span><a name="line.95"></a> -<span class="sourceLineNo">096</span> /**<a name="line.96"></a> -<span class="sourceLineNo">097</span> * @return the smallest timestamp that should be considered<a name="line.97"></a> +<span class="sourceLineNo">039</span> private static final long MIN_TIME = 0L;<a name="line.39"></a> +<span class="sourceLineNo">040</span> private static final long MAX_TIME = Long.MAX_VALUE;<a name="line.40"></a> +<span class="sourceLineNo">041</span> private long minStamp = MIN_TIME;<a name="line.41"></a> +<span class="sourceLineNo">042</span> private long maxStamp = MAX_TIME;<a name="line.42"></a> +<span class="sourceLineNo">043</span> private boolean allTime = false;<a name="line.43"></a> +<span class="sourceLineNo">044</span><a name="line.44"></a> +<span class="sourceLineNo">045</span> /**<a name="line.45"></a> +<span class="sourceLineNo">046</span> * Default constructor.<a name="line.46"></a> +<span class="sourceLineNo">047</span> * Represents interval [0, Long.MAX_VALUE) (allTime)<a name="line.47"></a> +<span class="sourceLineNo">048</span> */<a name="line.48"></a> +<span class="sourceLineNo">049</span> public TimeRange() {<a name="line.49"></a> +<span class="sourceLineNo">050</span> allTime = true;<a name="line.50"></a> +<span class="sourceLineNo">051</span> }<a name="line.51"></a> +<span class="sourceLineNo">052</span><a name="line.52"></a> +<span class="sourceLineNo">053</span> /**<a name="line.53"></a> +<span class="sourceLineNo">054</span> * Represents interval [minStamp, Long.MAX_VALUE)<a name="line.54"></a> +<span class="sourceLineNo">055</span> * @param minStamp the minimum timestamp value, inclusive<a name="line.55"></a> +<span class="sourceLineNo">056</span> */<a name="line.56"></a> +<span class="sourceLineNo">057</span> public TimeRange(long minStamp) {<a name="line.57"></a> +<span class="sourceLineNo">058</span> this.minStamp = minStamp;<a name="line.58"></a> +<span class="sourceLineNo">059</span> if (this.minStamp == MIN_TIME){<a name="line.59"></a> +<span class="sourceLineNo">060</span> this.allTime = true;<a name="line.60"></a> +<span class="sourceLineNo">061</span> }<a name="line.61"></a> +<span class="sourceLineNo">062</span> }<a name="line.62"></a> +<span class="sourceLineNo">063</span><a name="line.63"></a> +<span class="sourceLineNo">064</span> /**<a name="line.64"></a> +<span class="sourceLineNo">065</span> * Represents interval [minStamp, Long.MAX_VALUE)<a name="line.65"></a> +<span class="sourceLineNo">066</span> * @param minStamp the minimum timestamp value, inclusive<a name="line.66"></a> +<span class="sourceLineNo">067</span> */<a name="line.67"></a> +<span class="sourceLineNo">068</span> public TimeRange(byte [] minStamp) {<a name="line.68"></a> +<span class="sourceLineNo">069</span> this.minStamp = Bytes.toLong(minStamp);<a name="line.69"></a> +<span class="sourceLineNo">070</span> }<a name="line.70"></a> +<span class="sourceLineNo">071</span><a name="line.71"></a> +<span class="sourceLineNo">072</span> /**<a name="line.72"></a> +<span class="sourceLineNo">073</span> * Represents interval [minStamp, maxStamp)<a name="line.73"></a> +<span class="sourceLineNo">074</span> * @param minStamp the minimum timestamp, inclusive<a name="line.74"></a> +<span class="sourceLineNo">075</span> * @param maxStamp the maximum timestamp, exclusive<a name="line.75"></a> +<span class="sourceLineNo">076</span> * @throws IllegalArgumentException<a name="line.76"></a> +<span class="sourceLineNo">077</span> */<a name="line.77"></a> +<span class="sourceLineNo">078</span> public TimeRange(long minStamp, long maxStamp) {<a name="line.78"></a> +<span class="sourceLineNo">079</span> if (minStamp < 0 || maxStamp < 0) {<a name="line.79"></a> +<span class="sourceLineNo">080</span> throw new IllegalArgumentException("Timestamp cannot be negative. minStamp:" + minStamp<a name="line.80"></a> +<span class="sourceLineNo">081</span> + ", maxStamp:" + maxStamp);<a name="line.81"></a> +<span class="sourceLineNo">082</span> }<a name="line.82"></a> +<span class="sourceLineNo">083</span> if(maxStamp < minStamp) {<a name="line.83"></a> +<span class="sourceLineNo">084</span> throw new IllegalArgumentException("maxStamp is smaller than minStamp");<a name="line.84"></a> +<span class="sourceLineNo">085</span> }<a name="line.85"></a> +<span class="sourceLineNo">086</span> this.minStamp = minStamp;<a name="line.86"></a> +<span class="sourceLineNo">087</span> this.maxStamp = maxStamp;<a name="line.87"></a> +<span class="sourceLineNo">088</span> if (this.minStamp == MIN_TIME && this.maxStamp == MAX_TIME){<a name="line.88"></a> +<span class="sourceLineNo">089</span> this.allTime = true;<a name="line.89"></a> +<span class="sourceLineNo">090</span> }<a name="line.90"></a> +<span class="sourceLineNo">091</span> }<a name="line.91"></a> +<span class="sourceLineNo">092</span><a name="line.92"></a> +<span class="sourceLineNo">093</span> /**<a name="line.93"></a> +<span class="sourceLineNo">094</span> * Represents interval [minStamp, maxStamp)<a name="line.94"></a> +<span class="sourceLineNo">095</span> * @param minStamp the minimum timestamp, inclusive<a name="line.95"></a> +<span class="sourceLineNo">096</span> * @param maxStamp the maximum timestamp, exclusive<a name="line.96"></a> +<span class="sourceLineNo">097</span> * @throws IOException<a name="line.97"></a> <span class="sourceLineNo">098</span> */<a name="line.98"></a> -<span class="sourceLineNo">099</span> public long getMin() {<a name="line.99"></a> -<span class="sourceLineNo">100</span> return minStamp;<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> * @return the biggest timestamp that should be considered<a name="line.104"></a> -<span class="sourceLineNo">105</span> */<a name="line.105"></a> -<span class="sourceLineNo">106</span> public long getMax() {<a name="line.106"></a> -<span class="sourceLineNo">107</span> return maxStamp;<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> /**<a name="line.110"></a> -<span class="sourceLineNo">111</span> * Check if it is for all time<a name="line.111"></a> -<span class="sourceLineNo">112</span> * @return true if it is for all time<a name="line.112"></a> +<span class="sourceLineNo">099</span> public TimeRange(byte [] minStamp, byte [] maxStamp)<a name="line.99"></a> +<span class="sourceLineNo">100</span> throws IOException {<a name="line.100"></a> +<span class="sourceLineNo">101</span> this(Bytes.toLong(minStamp), Bytes.toLong(maxStamp));<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> * @return the smallest timestamp that should be considered<a name="line.105"></a> +<span class="sourceLineNo">106</span> */<a name="line.106"></a> +<span class="sourceLineNo">107</span> public long getMin() {<a name="line.107"></a> +<span class="sourceLineNo">108</span> return minStamp;<a name="line.108"></a> +<span class="sourceLineNo">109</span> }<a name="line.109"></a> +<span class="sourceLineNo">110</span><a name="line.110"></a> +<span class="sourceLineNo">111</span> /**<a name="line.111"></a> +<span class="sourceLineNo">112</span> * @return the biggest timestamp that should be considered<a name="line.112"></a> <span class="sourceLineNo">113</span> */<a name="line.113"></a> -<span class="sourceLineNo">114</span> public boolean isAllTime() {<a name="line.114"></a> -<span class="sourceLineNo">115</span> return allTime;<a name="line.115"></a> +<span class="sourceLineNo">114</span> public long getMax() {<a name="line.114"></a> +<span class="sourceLineNo">115</span> return maxStamp;<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> /**<a name="line.118"></a> -<span class="sourceLineNo">119</span> * Check if the specified timestamp is within this TimeRange.<a name="line.119"></a> -<span class="sourceLineNo">120</span> * <p><a name="line.120"></a> -<span class="sourceLineNo">121</span> * Returns true if within interval [minStamp, maxStamp), false<a name="line.121"></a> -<span class="sourceLineNo">122</span> * if not.<a name="line.122"></a> -<span class="sourceLineNo">123</span> * @param bytes timestamp to check<a name="line.123"></a> -<span class="sourceLineNo">124</span> * @param offset offset into the bytes<a name="line.124"></a> -<span class="sourceLineNo">125</span> * @return true if within TimeRange, false if not<a name="line.125"></a> -<span class="sourceLineNo">126</span> */<a name="line.126"></a> -<span class="sourceLineNo">127</span> public boolean withinTimeRange(byte [] bytes, int offset) {<a name="line.127"></a> -<span class="sourceLineNo">128</span> if(allTime) return true;<a name="line.128"></a> -<span class="sourceLineNo">129</span> return withinTimeRange(Bytes.toLong(bytes, offset));<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> * Check if the specified timestamp is within this TimeRange.<a name="line.133"></a> -<span class="sourceLineNo">134</span> * <p><a name="line.134"></a> -<span class="sourceLineNo">135</span> * Returns true if within interval [minStamp, maxStamp), false<a name="line.135"></a> -<span class="sourceLineNo">136</span> * if not.<a name="line.136"></a> -<span class="sourceLineNo">137</span> * @param timestamp timestamp to check<a name="line.137"></a> -<span class="sourceLineNo">138</span> * @return true if within TimeRange, false if not<a name="line.138"></a> -<span class="sourceLineNo">139</span> */<a name="line.139"></a> -<span class="sourceLineNo">140</span> public boolean withinTimeRange(long timestamp) {<a name="line.140"></a> -<span class="sourceLineNo">141</span> if(allTime) return true;<a name="line.141"></a> -<span class="sourceLineNo">142</span> // check if >= minStamp<a name="line.142"></a> -<span class="sourceLineNo">143</span> return (minStamp <= timestamp && timestamp < maxStamp);<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> * Check if the specified timestamp is within this TimeRange.<a name="line.147"></a> -<span class="sourceLineNo">148</span> * <p><a name="line.148"></a> -<span class="sourceLineNo">149</span> * Returns true if within interval [minStamp, maxStamp), false<a name="line.149"></a> -<span class="sourceLineNo">150</span> * if not.<a name="line.150"></a> -<span class="sourceLineNo">151</span> * @param timestamp timestamp to check<a name="line.151"></a> -<span class="sourceLineNo">152</span> * @return true if within TimeRange, false if not<a name="line.152"></a> -<span class="sourceLineNo">153</span> */<a name="line.153"></a> -<span class="sourceLineNo">154</span> public boolean withinOrAfterTimeRange(long timestamp) {<a name="line.154"></a> -<span class="sourceLineNo">155</span> if(allTime) return true;<a name="line.155"></a> -<span class="sourceLineNo">156</span> // check if >= minStamp<a name="line.156"></a> -<span class="sourceLineNo">157</span> return (timestamp >= minStamp);<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> /**<a name="line.160"></a> -<span class="sourceLineNo">161</span> * Compare the timestamp to timerange<a name="line.161"></a> -<span class="sourceLineNo">162</span> * @param timestamp<a name="line.162"></a> -<span class="sourceLineNo">163</span> * @return -1 if timestamp is less than timerange,<a name="line.163"></a> -<span class="sourceLineNo">164</span> * 0 if timestamp is within timerange,<a name="line.164"></a> -<span class="sourceLineNo">165</span> * 1 if timestamp is greater than timerange<a name="line.165"></a> -<span class="sourceLineNo">166</span> */<a name="line.166"></a> -<span class="sourceLineNo">167</span> public int compare(long timestamp) {<a name="line.167"></a> -<span class="sourceLineNo">168</span> if (allTime) return 0;<a name="line.168"></a> -<span class="sourceLineNo">169</span> if (timestamp < minStamp) {<a name="line.169"></a> -<span class="sourceLineNo">170</span> return -1;<a name="line.170"></a> -<span class="sourceLineNo">171</span> } else if (timestamp >= maxStamp) {<a name="line.171"></a> -<span class="sourceLineNo">172</span> return 1;<a name="line.172"></a> -<span class="sourceLineNo">173</span> } else {<a name="line.173"></a> -<span class="sourceLineNo">174</span> return 0;<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><a name="line.177"></a> -<span class="sourceLineNo">178</span> @Override<a name="line.178"></a> -<span class="sourceLineNo">179</span> public String toString() {<a name="line.179"></a> -<span class="sourceLineNo">180</span> StringBuilder sb = new StringBuilder();<a name="line.180"></a> -<span class="sourceLineNo">181</span> sb.append("maxStamp=");<a name="line.181"></a> -<span class="sourceLineNo">182</span> sb.append(this.maxStamp);<a name="line.182"></a> -<span class="sourceLineNo">183</span> sb.append(", minStamp=");<a name="line.183"></a> -<span class="sourceLineNo">184</span> sb.append(this.minStamp);<a name="line.184"></a> -<span class="sourceLineNo">185</span> return sb.toString();<a name="line.185"></a> -<span class="sourceLineNo">186</span> }<a name="line.186"></a> -<span class="sourceLineNo">187</span>}<a name="line.187"></a> +<span class="sourceLineNo">119</span> * Check if it is for all time<a name="line.119"></a> +<span class="sourceLineNo">120</span> * @return true if it is for all time<a name="line.120"></a> +<span class="sourceLineNo">121</span> */<a name="line.121"></a> +<span class="sourceLineNo">122</span> public boolean isAllTime() {<a name="line.122"></a> +<span class="sourceLineNo">123</span> return allTime;<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> * Check if the specified timestamp is within this TimeRange.<a name="line.127"></a> +<span class="sourceLineNo">128</span> * <p><a name="line.128"></a> +<span class="sourceLineNo">129</span> * Returns true if within interval [minStamp, maxStamp), false<a name="line.129"></a> +<span class="sourceLineNo">130</span> * if not.<a name="line.130"></a> +<span class="sourceLineNo">131</span> * @param bytes timestamp to check<a name="line.131"></a> +<span class="sourceLineNo">132</span> * @param offset offset into the bytes<a name="line.132"></a> +<span class="sourceLineNo">133</span> * @return true if within TimeRange, false if not<a name="line.133"></a> +<span class="sourceLineNo">134</span> */<a name="line.134"></a> +<span class="sourceLineNo">135</span> public boolean withinTimeRange(byte [] bytes, int offset) {<a name="line.135"></a> +<span class="sourceLineNo">136</span> if(allTime) return true;<a name="line.136"></a> +<span class="sourceLineNo">137</span> return withinTimeRange(Bytes.toLong(bytes, offset));<a name="line.137"></a> +<span class="sourceLineNo">138</span> }<a name="line.138"></a> +<span class="sourceLineNo">139</span><a name="line.139"></a> +<span class="sourceLineNo">140</span> /**<a name="line.140"></a> +<span class="sourceLineNo">141</span> * Check if the specified timestamp is within this TimeRange.<a name="line.141"></a> +<span class="sourceLineNo">142</span> * <p><a name="line.142"></a> +<span class="sourceLineNo">143</span> * Returns true if within interval [minStamp, maxStamp), false<a name="line.143"></a> +<span class="sourceLineNo">144</span> * if not.<a name="line.144"></a> +<span class="sourceLineNo">145</span> * @param timestamp timestamp to check<a name="line.145"></a> +<span class="sourceLineNo">146</span> * @return true if within TimeRange, false if not<a name="line.146"></a> +<span class="sourceLineNo">147</span> */<a name="line.147"></a> +<span class="sourceLineNo">148</span> public boolean withinTimeRange(long timestamp) {<a name="line.148"></a> +<span class="sourceLineNo">149</span> if(allTime) return true;<a name="line.149"></a> +<span class="sourceLineNo">150</span> // check if >= minStamp<a name="line.150"></a> +<span class="sourceLineNo">151</span> return (minStamp <= timestamp && timestamp < maxStamp);<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> * Check if the specified timestamp is within this TimeRange.<a name="line.155"></a> +<span class="sourceLineNo">156</span> * <p><a name="line.156"></a> +<span class="sourceLineNo">157</span> * Returns true if within interval [minStamp, maxStamp), false<a name="line.157"></a> +<span class="sourceLineNo">158</span> * if not.<a name="line.158"></a> +<span class="sourceLineNo">159</span> * @param timestamp timestamp to check<a name="line.159"></a> +<span class="sourceLineNo">160</span> * @return true if within TimeRange, false if not<a name="line.160"></a> +<span class="sourceLineNo">161</span> */<a name="line.161"></a> +<span class="sourceLineNo">162</span> public boolean withinOrAfterTimeRange(long timestamp) {<a name="line.162"></a> +<span class="sourceLineNo">163</span> if(allTime) return true;<a name="line.163"></a> +<span class="sourceLineNo">164</span> // check if >= minStamp<a name="line.164"></a> +<span class="sourceLineNo">165</span> return (timestamp >= minStamp);<a name="line.165"></a> +<span class="sourceLineNo">166</span> }<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> * Compare the timestamp to timerange<a name="line.169"></a> +<span class="sourceLineNo">170</span> * @param timestamp<a name="line.170"></a> +<span class="sourceLineNo">171</span> * @return -1 if timestamp is less than timerange,<a name="line.171"></a> +<span class="sourceLineNo">172</span> * 0 if timestamp is within timerange,<a name="line.172"></a> +<span class="sourceLineNo">173</span> * 1 if timestamp is greater than timerange<a name="line.173"></a> +<span class="sourceLineNo">174</span> */<a name="line.174"></a> +<span class="sourceLineNo">175</span> public int compare(long timestamp) {<a name="line.175"></a> +<span class="sourceLineNo">176</span> if (allTime) return 0;<a name="line.176"></a> +<span class="sourceLineNo">177</span> if (timestamp < minStamp) {<a name="line.177"></a> +<span class="sourceLineNo">178</span> return -1;<a name="line.178"></a> +<span class="sourceLineNo">179</span> } else if (timestamp >= maxStamp) {<a name="line.179"></a> +<span class="sourceLineNo">180</span> return 1;<a name="line.180"></a> +<span class="sourceLineNo">181</span> } else {<a name="line.181"></a> +<span class="sourceLineNo">182</span> return 0;<a name="line.182"></a> +<span class="sourceLineNo">183</span> }<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> @Override<a name="line.186"></a> +<span class="sourceLineNo">187</span> public String toString() {<a name="line.187"></a> +<span class="sourceLineNo">188</span> StringBuilder sb = new StringBuilder();<a name="line.188"></a> +<span class="sourceLineNo">189</span> sb.append("maxStamp=");<a name="line.189"></a> +<span class="sourceLineNo">190</span> sb.append(this.maxStamp);<a name="line.190"></a> +<span class="sourceLineNo">191</span> sb.append(", minStamp=");<a name="line.191"></a> +<span class="sourceLineNo">192</span> sb.append(this.minStamp);<a name="line.192"></a> +<span class="sourceLineNo">193</span> return sb.toString();<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/5c0cc30a/book.html ---------------------------------------------------------------------- diff --git a/book.html b/book.html index 0ab20df..1ff8353 100644 --- a/book.html +++ b/book.html @@ -33282,7 +33282,7 @@ The server will return cellblocks compressed using this same compressor as long <div id="footer"> <div id="footer-text"> Version 2.0.0-SNAPSHOT<br> -Last updated 2016-04-11 14:30:43 UTC +Last updated 2016-04-12 14:34:01 UTC </div> </div> </body> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/5c0cc30a/bulk-loads.html ---------------------------------------------------------------------- diff --git a/bulk-loads.html b/bulk-loads.html index 4f3257b..7f1b248 100644 --- a/bulk-loads.html +++ b/bulk-loads.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20160411" /> + <meta name="Date-Revision-yyyymmdd" content="20160412" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Bulk Loads in Apache HBase (TM) @@ -305,7 +305,7 @@ under the License. --> <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2016-04-11</li> + <li id="publishDate" class="pull-right">Last Published: 2016-04-12</li> </p> </div>