hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [48/51] [partial] hbase-site git commit: Published site at c6a65ba63fce85ac7c4b62b96ef2bbe6c35d2f00.
Date Tue, 04 Sep 2018 14:48:37 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/293abb17/apidocs/src-html/org/apache/hadoop/hbase/filter/FamilyFilter.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/filter/FamilyFilter.html b/apidocs/src-html/org/apache/hadoop/hbase/filter/FamilyFilter.html
index 58e8dfb..db6bbc9 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/filter/FamilyFilter.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/filter/FamilyFilter.html
@@ -29,147 +29,142 @@
 <span class="sourceLineNo">021</span><a name="line.21"></a>
 <span class="sourceLineNo">022</span>import java.io.IOException;<a name="line.22"></a>
 <span class="sourceLineNo">023</span>import java.util.ArrayList;<a name="line.23"></a>
-<span class="sourceLineNo">024</span>import java.util.Objects;<a name="line.24"></a>
-<span class="sourceLineNo">025</span><a name="line.25"></a>
-<span class="sourceLineNo">026</span>import org.apache.hadoop.hbase.Cell;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>import org.apache.hadoop.hbase.CompareOperator;<a name="line.27"></a>
-<span class="sourceLineNo">028</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.28"></a>
-<span class="sourceLineNo">029</span>import org.apache.hadoop.hbase.exceptions.DeserializationException;<a name="line.29"></a>
-<span class="sourceLineNo">030</span>import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;<a name="line.30"></a>
-<span class="sourceLineNo">031</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.FilterProtos;<a name="line.31"></a>
-<span class="sourceLineNo">032</span>import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException;<a name="line.32"></a>
-<span class="sourceLineNo">033</span><a name="line.33"></a>
-<span class="sourceLineNo">034</span>/**<a name="line.34"></a>
-<span class="sourceLineNo">035</span> * &lt;p&gt;<a name="line.35"></a>
-<span class="sourceLineNo">036</span> * This filter is used to filter based on the column family. It takes an<a name="line.36"></a>
-<span class="sourceLineNo">037</span> * operator (equal, greater, not equal, etc) and a byte [] comparator for the<a name="line.37"></a>
-<span class="sourceLineNo">038</span> * column family portion of a key.<a name="line.38"></a>
-<span class="sourceLineNo">039</span> * &lt;/p&gt;&lt;p&gt;<a name="line.39"></a>
-<span class="sourceLineNo">040</span> * This filter can be wrapped with {@link org.apache.hadoop.hbase.filter.WhileMatchFilter} and {@link org.apache.hadoop.hbase.filter.SkipFilter}<a name="line.40"></a>
-<span class="sourceLineNo">041</span> * to add more control.<a name="line.41"></a>
-<span class="sourceLineNo">042</span> * &lt;/p&gt;&lt;p&gt;<a name="line.42"></a>
-<span class="sourceLineNo">043</span> * Multiple filters can be combined using {@link org.apache.hadoop.hbase.filter.FilterList}.<a name="line.43"></a>
-<span class="sourceLineNo">044</span> * &lt;/p&gt;<a name="line.44"></a>
-<span class="sourceLineNo">045</span> * If an already known column family is looked for, use {@link org.apache.hadoop.hbase.client.Get#addFamily(byte[])}<a name="line.45"></a>
-<span class="sourceLineNo">046</span> * directly rather than a filter.<a name="line.46"></a>
-<span class="sourceLineNo">047</span> */<a name="line.47"></a>
-<span class="sourceLineNo">048</span>@InterfaceAudience.Public<a name="line.48"></a>
-<span class="sourceLineNo">049</span>public class FamilyFilter extends CompareFilter {<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>   * Constructor.<a name="line.52"></a>
-<span class="sourceLineNo">053</span>   *<a name="line.53"></a>
-<span class="sourceLineNo">054</span>   * @param familyCompareOp  the compare op for column family matching<a name="line.54"></a>
-<span class="sourceLineNo">055</span>   * @param familyComparator the comparator for column family matching<a name="line.55"></a>
-<span class="sourceLineNo">056</span>   * @deprecated  Since 2.0.0. Will be removed in 3.0.0.<a name="line.56"></a>
-<span class="sourceLineNo">057</span>   *  Use {@link #FamilyFilter(CompareOperator, ByteArrayComparable)}<a name="line.57"></a>
-<span class="sourceLineNo">058</span>   */<a name="line.58"></a>
-<span class="sourceLineNo">059</span>  @Deprecated<a name="line.59"></a>
-<span class="sourceLineNo">060</span>  public FamilyFilter(final CompareOp familyCompareOp,<a name="line.60"></a>
-<span class="sourceLineNo">061</span>                      final ByteArrayComparable familyComparator) {<a name="line.61"></a>
-<span class="sourceLineNo">062</span>      super(familyCompareOp, familyComparator);<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>  /**<a name="line.65"></a>
-<span class="sourceLineNo">066</span>   * Constructor.<a name="line.66"></a>
-<span class="sourceLineNo">067</span>   *<a name="line.67"></a>
-<span class="sourceLineNo">068</span>   * @param op  the compare op for column family matching<a name="line.68"></a>
-<span class="sourceLineNo">069</span>   * @param familyComparator the comparator for column family matching<a name="line.69"></a>
-<span class="sourceLineNo">070</span>   */<a name="line.70"></a>
-<span class="sourceLineNo">071</span>  public FamilyFilter(final CompareOperator op,<a name="line.71"></a>
-<span class="sourceLineNo">072</span>                      final ByteArrayComparable familyComparator) {<a name="line.72"></a>
-<span class="sourceLineNo">073</span>    super(op, familyComparator);<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>  @Deprecated<a name="line.76"></a>
-<span class="sourceLineNo">077</span>  @Override<a name="line.77"></a>
-<span class="sourceLineNo">078</span>  public ReturnCode filterKeyValue(final Cell c) {<a name="line.78"></a>
-<span class="sourceLineNo">079</span>    return filterCell(c);<a name="line.79"></a>
-<span class="sourceLineNo">080</span>  }<a name="line.80"></a>
-<span class="sourceLineNo">081</span><a name="line.81"></a>
-<span class="sourceLineNo">082</span>  @Override<a name="line.82"></a>
-<span class="sourceLineNo">083</span>  public ReturnCode filterCell(final Cell c) {<a name="line.83"></a>
-<span class="sourceLineNo">084</span>    int familyLength = c.getFamilyLength();<a name="line.84"></a>
-<span class="sourceLineNo">085</span>    if (familyLength &gt; 0) {<a name="line.85"></a>
-<span class="sourceLineNo">086</span>      if (compareFamily(getCompareOperator(), this.comparator, c)) {<a name="line.86"></a>
-<span class="sourceLineNo">087</span>        return ReturnCode.NEXT_ROW;<a name="line.87"></a>
-<span class="sourceLineNo">088</span>      }<a name="line.88"></a>
-<span class="sourceLineNo">089</span>    }<a name="line.89"></a>
-<span class="sourceLineNo">090</span>    return ReturnCode.INCLUDE;<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>  public static Filter createFilterFromArguments(ArrayList&lt;byte []&gt; filterArguments) {<a name="line.93"></a>
-<span class="sourceLineNo">094</span>    ArrayList&lt;?&gt; arguments = CompareFilter.extractArguments(filterArguments);<a name="line.94"></a>
-<span class="sourceLineNo">095</span>    CompareOperator compareOp = (CompareOperator)arguments.get(0);<a name="line.95"></a>
-<span class="sourceLineNo">096</span>    ByteArrayComparable comparator = (ByteArrayComparable)arguments.get(1);<a name="line.96"></a>
-<span class="sourceLineNo">097</span>    return new FamilyFilter(compareOp, comparator);<a name="line.97"></a>
-<span class="sourceLineNo">098</span>  }<a name="line.98"></a>
-<span class="sourceLineNo">099</span><a name="line.99"></a>
-<span class="sourceLineNo">100</span>  /**<a name="line.100"></a>
-<span class="sourceLineNo">101</span>   * @return The filter serialized using pb<a name="line.101"></a>
-<span class="sourceLineNo">102</span>   */<a name="line.102"></a>
-<span class="sourceLineNo">103</span>  @Override<a name="line.103"></a>
-<span class="sourceLineNo">104</span>  public byte [] toByteArray() {<a name="line.104"></a>
-<span class="sourceLineNo">105</span>    FilterProtos.FamilyFilter.Builder builder =<a name="line.105"></a>
-<span class="sourceLineNo">106</span>      FilterProtos.FamilyFilter.newBuilder();<a name="line.106"></a>
-<span class="sourceLineNo">107</span>    builder.setCompareFilter(super.convert());<a name="line.107"></a>
-<span class="sourceLineNo">108</span>    return builder.build().toByteArray();<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>   * @param pbBytes A pb serialized {@link FamilyFilter} instance<a name="line.112"></a>
-<span class="sourceLineNo">113</span>   * @return An instance of {@link FamilyFilter} made from &lt;code&gt;bytes&lt;/code&gt;<a name="line.113"></a>
-<span class="sourceLineNo">114</span>   * @throws DeserializationException<a name="line.114"></a>
-<span class="sourceLineNo">115</span>   * @see #toByteArray<a name="line.115"></a>
-<span class="sourceLineNo">116</span>   */<a name="line.116"></a>
-<span class="sourceLineNo">117</span>  public static FamilyFilter parseFrom(final byte [] pbBytes)<a name="line.117"></a>
-<span class="sourceLineNo">118</span>  throws DeserializationException {<a name="line.118"></a>
-<span class="sourceLineNo">119</span>    FilterProtos.FamilyFilter proto;<a name="line.119"></a>
-<span class="sourceLineNo">120</span>    try {<a name="line.120"></a>
-<span class="sourceLineNo">121</span>      proto = FilterProtos.FamilyFilter.parseFrom(pbBytes);<a name="line.121"></a>
-<span class="sourceLineNo">122</span>    } catch (InvalidProtocolBufferException e) {<a name="line.122"></a>
-<span class="sourceLineNo">123</span>      throw new DeserializationException(e);<a name="line.123"></a>
-<span class="sourceLineNo">124</span>    }<a name="line.124"></a>
-<span class="sourceLineNo">125</span>    final CompareOperator valueCompareOp =<a name="line.125"></a>
-<span class="sourceLineNo">126</span>      CompareOperator.valueOf(proto.getCompareFilter().getCompareOp().name());<a name="line.126"></a>
-<span class="sourceLineNo">127</span>    ByteArrayComparable valueComparator = null;<a name="line.127"></a>
-<span class="sourceLineNo">128</span>    try {<a name="line.128"></a>
-<span class="sourceLineNo">129</span>      if (proto.getCompareFilter().hasComparator()) {<a name="line.129"></a>
-<span class="sourceLineNo">130</span>        valueComparator = ProtobufUtil.toComparator(proto.getCompareFilter().getComparator());<a name="line.130"></a>
-<span class="sourceLineNo">131</span>      }<a name="line.131"></a>
-<span class="sourceLineNo">132</span>    } catch (IOException ioe) {<a name="line.132"></a>
-<span class="sourceLineNo">133</span>      throw new DeserializationException(ioe);<a name="line.133"></a>
-<span class="sourceLineNo">134</span>    }<a name="line.134"></a>
-<span class="sourceLineNo">135</span>    return new FamilyFilter(valueCompareOp,valueComparator);<a name="line.135"></a>
-<span class="sourceLineNo">136</span>  }<a name="line.136"></a>
-<span class="sourceLineNo">137</span><a name="line.137"></a>
-<span class="sourceLineNo">138</span>  /**<a name="line.138"></a>
-<span class="sourceLineNo">139</span>   * @return true if and only if the fields of the filter that are serialized<a name="line.139"></a>
-<span class="sourceLineNo">140</span>   * are equal to the corresponding fields in other.  Used for testing.<a name="line.140"></a>
-<span class="sourceLineNo">141</span>   */<a name="line.141"></a>
-<span class="sourceLineNo">142</span>  @Override<a name="line.142"></a>
-<span class="sourceLineNo">143</span>  boolean areSerializedFieldsEqual(Filter o) {<a name="line.143"></a>
-<span class="sourceLineNo">144</span>    if (o == this) return true;<a name="line.144"></a>
-<span class="sourceLineNo">145</span>    if (!(o instanceof FamilyFilter)) return false;<a name="line.145"></a>
-<span class="sourceLineNo">146</span><a name="line.146"></a>
-<span class="sourceLineNo">147</span>    FamilyFilter other = (FamilyFilter)o;<a name="line.147"></a>
-<span class="sourceLineNo">148</span>    return super.areSerializedFieldsEqual(other);<a name="line.148"></a>
-<span class="sourceLineNo">149</span> }<a name="line.149"></a>
-<span class="sourceLineNo">150</span><a name="line.150"></a>
-<span class="sourceLineNo">151</span>  @Override<a name="line.151"></a>
-<span class="sourceLineNo">152</span>  public boolean equals(Object obj) {<a name="line.152"></a>
-<span class="sourceLineNo">153</span>    if (obj == null || (!(obj instanceof FamilyFilter))) {<a name="line.153"></a>
-<span class="sourceLineNo">154</span>      return false;<a name="line.154"></a>
-<span class="sourceLineNo">155</span>    }<a name="line.155"></a>
-<span class="sourceLineNo">156</span>    FamilyFilter f = (FamilyFilter) obj;<a name="line.156"></a>
-<span class="sourceLineNo">157</span>    return this.areSerializedFieldsEqual(f);<a name="line.157"></a>
+<span class="sourceLineNo">024</span><a name="line.24"></a>
+<span class="sourceLineNo">025</span>import org.apache.hadoop.hbase.Cell;<a name="line.25"></a>
+<span class="sourceLineNo">026</span>import org.apache.hadoop.hbase.CompareOperator;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.27"></a>
+<span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.exceptions.DeserializationException;<a name="line.28"></a>
+<span class="sourceLineNo">029</span>import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;<a name="line.29"></a>
+<span class="sourceLineNo">030</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.FilterProtos;<a name="line.30"></a>
+<span class="sourceLineNo">031</span>import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException;<a name="line.31"></a>
+<span class="sourceLineNo">032</span><a name="line.32"></a>
+<span class="sourceLineNo">033</span>/**<a name="line.33"></a>
+<span class="sourceLineNo">034</span> * &lt;p&gt;<a name="line.34"></a>
+<span class="sourceLineNo">035</span> * This filter is used to filter based on the column family. It takes an<a name="line.35"></a>
+<span class="sourceLineNo">036</span> * operator (equal, greater, not equal, etc) and a byte [] comparator for the<a name="line.36"></a>
+<span class="sourceLineNo">037</span> * column family portion of a key.<a name="line.37"></a>
+<span class="sourceLineNo">038</span> * &lt;/p&gt;&lt;p&gt;<a name="line.38"></a>
+<span class="sourceLineNo">039</span> * This filter can be wrapped with {@link org.apache.hadoop.hbase.filter.WhileMatchFilter} and {@link org.apache.hadoop.hbase.filter.SkipFilter}<a name="line.39"></a>
+<span class="sourceLineNo">040</span> * to add more control.<a name="line.40"></a>
+<span class="sourceLineNo">041</span> * &lt;/p&gt;&lt;p&gt;<a name="line.41"></a>
+<span class="sourceLineNo">042</span> * Multiple filters can be combined using {@link org.apache.hadoop.hbase.filter.FilterList}.<a name="line.42"></a>
+<span class="sourceLineNo">043</span> * &lt;/p&gt;<a name="line.43"></a>
+<span class="sourceLineNo">044</span> * If an already known column family is looked for, use {@link org.apache.hadoop.hbase.client.Get#addFamily(byte[])}<a name="line.44"></a>
+<span class="sourceLineNo">045</span> * directly rather than a filter.<a name="line.45"></a>
+<span class="sourceLineNo">046</span> */<a name="line.46"></a>
+<span class="sourceLineNo">047</span>@InterfaceAudience.Public<a name="line.47"></a>
+<span class="sourceLineNo">048</span>public class FamilyFilter extends CompareFilter {<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>   * Constructor.<a name="line.51"></a>
+<span class="sourceLineNo">052</span>   *<a name="line.52"></a>
+<span class="sourceLineNo">053</span>   * @param familyCompareOp  the compare op for column family matching<a name="line.53"></a>
+<span class="sourceLineNo">054</span>   * @param familyComparator the comparator for column family matching<a name="line.54"></a>
+<span class="sourceLineNo">055</span>   * @deprecated  Since 2.0.0. Will be removed in 3.0.0.<a name="line.55"></a>
+<span class="sourceLineNo">056</span>   *  Use {@link #FamilyFilter(CompareOperator, ByteArrayComparable)}<a name="line.56"></a>
+<span class="sourceLineNo">057</span>   */<a name="line.57"></a>
+<span class="sourceLineNo">058</span>  @Deprecated<a name="line.58"></a>
+<span class="sourceLineNo">059</span>  public FamilyFilter(final CompareOp familyCompareOp,<a name="line.59"></a>
+<span class="sourceLineNo">060</span>                      final ByteArrayComparable familyComparator) {<a name="line.60"></a>
+<span class="sourceLineNo">061</span>      super(familyCompareOp, familyComparator);<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>   * Constructor.<a name="line.65"></a>
+<span class="sourceLineNo">066</span>   *<a name="line.66"></a>
+<span class="sourceLineNo">067</span>   * @param op  the compare op for column family matching<a name="line.67"></a>
+<span class="sourceLineNo">068</span>   * @param familyComparator the comparator for column family matching<a name="line.68"></a>
+<span class="sourceLineNo">069</span>   */<a name="line.69"></a>
+<span class="sourceLineNo">070</span>  public FamilyFilter(final CompareOperator op,<a name="line.70"></a>
+<span class="sourceLineNo">071</span>                      final ByteArrayComparable familyComparator) {<a name="line.71"></a>
+<span class="sourceLineNo">072</span>    super(op, familyComparator);<a name="line.72"></a>
+<span class="sourceLineNo">073</span>  }<a name="line.73"></a>
+<span class="sourceLineNo">074</span><a name="line.74"></a>
+<span class="sourceLineNo">075</span>  @Deprecated<a name="line.75"></a>
+<span class="sourceLineNo">076</span>  @Override<a name="line.76"></a>
+<span class="sourceLineNo">077</span>  public ReturnCode filterKeyValue(final Cell c) {<a name="line.77"></a>
+<span class="sourceLineNo">078</span>    return filterCell(c);<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>  @Override<a name="line.81"></a>
+<span class="sourceLineNo">082</span>  public ReturnCode filterCell(final Cell c) {<a name="line.82"></a>
+<span class="sourceLineNo">083</span>    int familyLength = c.getFamilyLength();<a name="line.83"></a>
+<span class="sourceLineNo">084</span>    if (familyLength &gt; 0) {<a name="line.84"></a>
+<span class="sourceLineNo">085</span>      if (compareFamily(getCompareOperator(), this.comparator, c)) {<a name="line.85"></a>
+<span class="sourceLineNo">086</span>        return ReturnCode.NEXT_ROW;<a name="line.86"></a>
+<span class="sourceLineNo">087</span>      }<a name="line.87"></a>
+<span class="sourceLineNo">088</span>    }<a name="line.88"></a>
+<span class="sourceLineNo">089</span>    return ReturnCode.INCLUDE;<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>  public static Filter createFilterFromArguments(ArrayList&lt;byte []&gt; filterArguments) {<a name="line.92"></a>
+<span class="sourceLineNo">093</span>    ArrayList&lt;?&gt; arguments = CompareFilter.extractArguments(filterArguments);<a name="line.93"></a>
+<span class="sourceLineNo">094</span>    CompareOperator compareOp = (CompareOperator)arguments.get(0);<a name="line.94"></a>
+<span class="sourceLineNo">095</span>    ByteArrayComparable comparator = (ByteArrayComparable)arguments.get(1);<a name="line.95"></a>
+<span class="sourceLineNo">096</span>    return new FamilyFilter(compareOp, comparator);<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>   * @return The filter serialized using pb<a name="line.100"></a>
+<span class="sourceLineNo">101</span>   */<a name="line.101"></a>
+<span class="sourceLineNo">102</span>  @Override<a name="line.102"></a>
+<span class="sourceLineNo">103</span>  public byte [] toByteArray() {<a name="line.103"></a>
+<span class="sourceLineNo">104</span>    FilterProtos.FamilyFilter.Builder builder =<a name="line.104"></a>
+<span class="sourceLineNo">105</span>      FilterProtos.FamilyFilter.newBuilder();<a name="line.105"></a>
+<span class="sourceLineNo">106</span>    builder.setCompareFilter(super.convert());<a name="line.106"></a>
+<span class="sourceLineNo">107</span>    return builder.build().toByteArray();<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>   * @param pbBytes A pb serialized {@link FamilyFilter} instance<a name="line.111"></a>
+<span class="sourceLineNo">112</span>   * @return An instance of {@link FamilyFilter} made from &lt;code&gt;bytes&lt;/code&gt;<a name="line.112"></a>
+<span class="sourceLineNo">113</span>   * @throws DeserializationException<a name="line.113"></a>
+<span class="sourceLineNo">114</span>   * @see #toByteArray<a name="line.114"></a>
+<span class="sourceLineNo">115</span>   */<a name="line.115"></a>
+<span class="sourceLineNo">116</span>  public static FamilyFilter parseFrom(final byte [] pbBytes)<a name="line.116"></a>
+<span class="sourceLineNo">117</span>  throws DeserializationException {<a name="line.117"></a>
+<span class="sourceLineNo">118</span>    FilterProtos.FamilyFilter proto;<a name="line.118"></a>
+<span class="sourceLineNo">119</span>    try {<a name="line.119"></a>
+<span class="sourceLineNo">120</span>      proto = FilterProtos.FamilyFilter.parseFrom(pbBytes);<a name="line.120"></a>
+<span class="sourceLineNo">121</span>    } catch (InvalidProtocolBufferException e) {<a name="line.121"></a>
+<span class="sourceLineNo">122</span>      throw new DeserializationException(e);<a name="line.122"></a>
+<span class="sourceLineNo">123</span>    }<a name="line.123"></a>
+<span class="sourceLineNo">124</span>    final CompareOperator valueCompareOp =<a name="line.124"></a>
+<span class="sourceLineNo">125</span>      CompareOperator.valueOf(proto.getCompareFilter().getCompareOp().name());<a name="line.125"></a>
+<span class="sourceLineNo">126</span>    ByteArrayComparable valueComparator = null;<a name="line.126"></a>
+<span class="sourceLineNo">127</span>    try {<a name="line.127"></a>
+<span class="sourceLineNo">128</span>      if (proto.getCompareFilter().hasComparator()) {<a name="line.128"></a>
+<span class="sourceLineNo">129</span>        valueComparator = ProtobufUtil.toComparator(proto.getCompareFilter().getComparator());<a name="line.129"></a>
+<span class="sourceLineNo">130</span>      }<a name="line.130"></a>
+<span class="sourceLineNo">131</span>    } catch (IOException ioe) {<a name="line.131"></a>
+<span class="sourceLineNo">132</span>      throw new DeserializationException(ioe);<a name="line.132"></a>
+<span class="sourceLineNo">133</span>    }<a name="line.133"></a>
+<span class="sourceLineNo">134</span>    return new FamilyFilter(valueCompareOp,valueComparator);<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>  /**<a name="line.137"></a>
+<span class="sourceLineNo">138</span>   * @return true if and only if the fields of the filter that are serialized<a name="line.138"></a>
+<span class="sourceLineNo">139</span>   * are equal to the corresponding fields in other.  Used for testing.<a name="line.139"></a>
+<span class="sourceLineNo">140</span>   */<a name="line.140"></a>
+<span class="sourceLineNo">141</span>  @Override<a name="line.141"></a>
+<span class="sourceLineNo">142</span>  boolean areSerializedFieldsEqual(Filter o) {<a name="line.142"></a>
+<span class="sourceLineNo">143</span>    if (o == this) return true;<a name="line.143"></a>
+<span class="sourceLineNo">144</span>    if (!(o instanceof FamilyFilter)) return false;<a name="line.144"></a>
+<span class="sourceLineNo">145</span><a name="line.145"></a>
+<span class="sourceLineNo">146</span>    FamilyFilter other = (FamilyFilter)o;<a name="line.146"></a>
+<span class="sourceLineNo">147</span>    return super.areSerializedFieldsEqual(other);<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>  @Override<a name="line.150"></a>
+<span class="sourceLineNo">151</span>  public boolean equals(Object obj) {<a name="line.151"></a>
+<span class="sourceLineNo">152</span>    return obj instanceof Filter &amp;&amp; areSerializedFieldsEqual((Filter) obj);<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>  @Override<a name="line.155"></a>
+<span class="sourceLineNo">156</span>  public int hashCode() {<a name="line.156"></a>
+<span class="sourceLineNo">157</span>    return super.hashCode();<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>  @Override<a name="line.160"></a>
-<span class="sourceLineNo">161</span>  public int hashCode() {<a name="line.161"></a>
-<span class="sourceLineNo">162</span>    return Objects.hash(this.getComparator(), this.getCompareOperator());<a name="line.162"></a>
-<span class="sourceLineNo">163</span>  }<a name="line.163"></a>
-<span class="sourceLineNo">164</span>}<a name="line.164"></a>
+<span class="sourceLineNo">159</span>}<a name="line.159"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/293abb17/apidocs/src-html/org/apache/hadoop/hbase/filter/FilterList.Operator.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/filter/FilterList.Operator.html b/apidocs/src-html/org/apache/hadoop/hbase/filter/FilterList.Operator.html
index b025b7e..69ffa90 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/filter/FilterList.Operator.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/filter/FilterList.Operator.html
@@ -285,20 +285,17 @@
 <span class="sourceLineNo">277</span>  public String toString() {<a name="line.277"></a>
 <span class="sourceLineNo">278</span>    return this.filterListBase.toString();<a name="line.278"></a>
 <span class="sourceLineNo">279</span>  }<a name="line.279"></a>
-<span class="sourceLineNo">280</span>  @Override<a name="line.280"></a>
-<span class="sourceLineNo">281</span>  public boolean equals(Object obj) {<a name="line.281"></a>
-<span class="sourceLineNo">282</span>    if (obj == null || (!(obj instanceof FilterList))) {<a name="line.282"></a>
-<span class="sourceLineNo">283</span>      return false;<a name="line.283"></a>
-<span class="sourceLineNo">284</span>    }<a name="line.284"></a>
-<span class="sourceLineNo">285</span>    FilterList f = (FilterList) obj;<a name="line.285"></a>
-<span class="sourceLineNo">286</span>    return this.areSerializedFieldsEqual(f);<a name="line.286"></a>
-<span class="sourceLineNo">287</span>  }<a name="line.287"></a>
-<span class="sourceLineNo">288</span><a name="line.288"></a>
-<span class="sourceLineNo">289</span>  @Override<a name="line.289"></a>
-<span class="sourceLineNo">290</span>  public int hashCode() {<a name="line.290"></a>
-<span class="sourceLineNo">291</span>    return Objects.hash(this.getOperator(), Arrays.hashCode(this.getFilters().toArray()));<a name="line.291"></a>
-<span class="sourceLineNo">292</span>  }<a name="line.292"></a>
-<span class="sourceLineNo">293</span>}<a name="line.293"></a>
+<span class="sourceLineNo">280</span><a name="line.280"></a>
+<span class="sourceLineNo">281</span>  @Override<a name="line.281"></a>
+<span class="sourceLineNo">282</span>  public boolean equals(Object obj) {<a name="line.282"></a>
+<span class="sourceLineNo">283</span>    return obj instanceof Filter &amp;&amp; areSerializedFieldsEqual((Filter) obj);<a name="line.283"></a>
+<span class="sourceLineNo">284</span>  }<a name="line.284"></a>
+<span class="sourceLineNo">285</span><a name="line.285"></a>
+<span class="sourceLineNo">286</span>  @Override<a name="line.286"></a>
+<span class="sourceLineNo">287</span>  public int hashCode() {<a name="line.287"></a>
+<span class="sourceLineNo">288</span>    return Objects.hash(getOperator(), getFilters());<a name="line.288"></a>
+<span class="sourceLineNo">289</span>  }<a name="line.289"></a>
+<span class="sourceLineNo">290</span>}<a name="line.290"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/293abb17/apidocs/src-html/org/apache/hadoop/hbase/filter/FilterList.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/filter/FilterList.html b/apidocs/src-html/org/apache/hadoop/hbase/filter/FilterList.html
index b025b7e..69ffa90 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/filter/FilterList.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/filter/FilterList.html
@@ -285,20 +285,17 @@
 <span class="sourceLineNo">277</span>  public String toString() {<a name="line.277"></a>
 <span class="sourceLineNo">278</span>    return this.filterListBase.toString();<a name="line.278"></a>
 <span class="sourceLineNo">279</span>  }<a name="line.279"></a>
-<span class="sourceLineNo">280</span>  @Override<a name="line.280"></a>
-<span class="sourceLineNo">281</span>  public boolean equals(Object obj) {<a name="line.281"></a>
-<span class="sourceLineNo">282</span>    if (obj == null || (!(obj instanceof FilterList))) {<a name="line.282"></a>
-<span class="sourceLineNo">283</span>      return false;<a name="line.283"></a>
-<span class="sourceLineNo">284</span>    }<a name="line.284"></a>
-<span class="sourceLineNo">285</span>    FilterList f = (FilterList) obj;<a name="line.285"></a>
-<span class="sourceLineNo">286</span>    return this.areSerializedFieldsEqual(f);<a name="line.286"></a>
-<span class="sourceLineNo">287</span>  }<a name="line.287"></a>
-<span class="sourceLineNo">288</span><a name="line.288"></a>
-<span class="sourceLineNo">289</span>  @Override<a name="line.289"></a>
-<span class="sourceLineNo">290</span>  public int hashCode() {<a name="line.290"></a>
-<span class="sourceLineNo">291</span>    return Objects.hash(this.getOperator(), Arrays.hashCode(this.getFilters().toArray()));<a name="line.291"></a>
-<span class="sourceLineNo">292</span>  }<a name="line.292"></a>
-<span class="sourceLineNo">293</span>}<a name="line.293"></a>
+<span class="sourceLineNo">280</span><a name="line.280"></a>
+<span class="sourceLineNo">281</span>  @Override<a name="line.281"></a>
+<span class="sourceLineNo">282</span>  public boolean equals(Object obj) {<a name="line.282"></a>
+<span class="sourceLineNo">283</span>    return obj instanceof Filter &amp;&amp; areSerializedFieldsEqual((Filter) obj);<a name="line.283"></a>
+<span class="sourceLineNo">284</span>  }<a name="line.284"></a>
+<span class="sourceLineNo">285</span><a name="line.285"></a>
+<span class="sourceLineNo">286</span>  @Override<a name="line.286"></a>
+<span class="sourceLineNo">287</span>  public int hashCode() {<a name="line.287"></a>
+<span class="sourceLineNo">288</span>    return Objects.hash(getOperator(), getFilters());<a name="line.288"></a>
+<span class="sourceLineNo">289</span>  }<a name="line.289"></a>
+<span class="sourceLineNo">290</span>}<a name="line.290"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/293abb17/apidocs/src-html/org/apache/hadoop/hbase/filter/FirstKeyOnlyFilter.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/filter/FirstKeyOnlyFilter.html b/apidocs/src-html/org/apache/hadoop/hbase/filter/FirstKeyOnlyFilter.html
index 2036bc9..bcfe1b9 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/filter/FirstKeyOnlyFilter.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/filter/FirstKeyOnlyFilter.html
@@ -28,113 +28,124 @@
 <span class="sourceLineNo">020</span><a name="line.20"></a>
 <span class="sourceLineNo">021</span>import java.io.IOException;<a name="line.21"></a>
 <span class="sourceLineNo">022</span>import java.util.ArrayList;<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.Cell;<a name="line.24"></a>
-<span class="sourceLineNo">025</span>import org.apache.yetus.audience.InterfaceAudience;<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.shaded.protobuf.generated.FilterProtos;<a name="line.27"></a>
-<span class="sourceLineNo">028</span><a name="line.28"></a>
-<span class="sourceLineNo">029</span>import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;<a name="line.29"></a>
-<span class="sourceLineNo">030</span>import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException;<a name="line.30"></a>
-<span class="sourceLineNo">031</span><a name="line.31"></a>
-<span class="sourceLineNo">032</span>/**<a name="line.32"></a>
-<span class="sourceLineNo">033</span> * A filter that will only return the first KV from each row.<a name="line.33"></a>
-<span class="sourceLineNo">034</span> * &lt;p&gt;<a name="line.34"></a>
-<span class="sourceLineNo">035</span> * This filter can be used to more efficiently perform row count operations.<a name="line.35"></a>
-<span class="sourceLineNo">036</span> */<a name="line.36"></a>
-<span class="sourceLineNo">037</span>@InterfaceAudience.Public<a name="line.37"></a>
-<span class="sourceLineNo">038</span>public class FirstKeyOnlyFilter extends FilterBase {<a name="line.38"></a>
-<span class="sourceLineNo">039</span>  private boolean foundKV = false;<a name="line.39"></a>
-<span class="sourceLineNo">040</span><a name="line.40"></a>
-<span class="sourceLineNo">041</span>  public FirstKeyOnlyFilter() {<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>  @Override<a name="line.44"></a>
-<span class="sourceLineNo">045</span>  public void reset() {<a name="line.45"></a>
-<span class="sourceLineNo">046</span>    foundKV = false;<a name="line.46"></a>
-<span class="sourceLineNo">047</span>  }<a name="line.47"></a>
-<span class="sourceLineNo">048</span><a name="line.48"></a>
-<span class="sourceLineNo">049</span>  @Override<a name="line.49"></a>
-<span class="sourceLineNo">050</span>  public boolean filterRowKey(Cell cell) throws IOException {<a name="line.50"></a>
-<span class="sourceLineNo">051</span>    // Impl in FilterBase might do unnecessary copy for Off heap backed Cells.<a name="line.51"></a>
-<span class="sourceLineNo">052</span>    return false;<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>  @Deprecated<a name="line.55"></a>
-<span class="sourceLineNo">056</span>  @Override<a name="line.56"></a>
-<span class="sourceLineNo">057</span>  public ReturnCode filterKeyValue(final Cell c) {<a name="line.57"></a>
-<span class="sourceLineNo">058</span>    return filterCell(c);<a name="line.58"></a>
-<span class="sourceLineNo">059</span>  }<a name="line.59"></a>
-<span class="sourceLineNo">060</span><a name="line.60"></a>
-<span class="sourceLineNo">061</span>  @Override<a name="line.61"></a>
-<span class="sourceLineNo">062</span>  public ReturnCode filterCell(final Cell c) {<a name="line.62"></a>
-<span class="sourceLineNo">063</span>    if(foundKV) return ReturnCode.NEXT_ROW;<a name="line.63"></a>
-<span class="sourceLineNo">064</span>    foundKV = true;<a name="line.64"></a>
-<span class="sourceLineNo">065</span>    return ReturnCode.INCLUDE;<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>  public static Filter createFilterFromArguments(ArrayList&lt;byte []&gt; filterArguments) {<a name="line.68"></a>
-<span class="sourceLineNo">069</span>    Preconditions.checkArgument(filterArguments.isEmpty(),<a name="line.69"></a>
-<span class="sourceLineNo">070</span>                                "Expected 0 but got: %s", filterArguments.size());<a name="line.70"></a>
-<span class="sourceLineNo">071</span>    return new FirstKeyOnlyFilter();<a name="line.71"></a>
-<span class="sourceLineNo">072</span>  }<a name="line.72"></a>
-<span class="sourceLineNo">073</span><a name="line.73"></a>
-<span class="sourceLineNo">074</span>  /**<a name="line.74"></a>
-<span class="sourceLineNo">075</span>   * @return true if first KV has been found.<a name="line.75"></a>
-<span class="sourceLineNo">076</span>   */<a name="line.76"></a>
-<span class="sourceLineNo">077</span>  protected boolean hasFoundKV() {<a name="line.77"></a>
-<span class="sourceLineNo">078</span>    return this.foundKV;<a name="line.78"></a>
-<span class="sourceLineNo">079</span>  }<a name="line.79"></a>
-<span class="sourceLineNo">080</span><a name="line.80"></a>
-<span class="sourceLineNo">081</span>  /**<a name="line.81"></a>
-<span class="sourceLineNo">082</span>   *<a name="line.82"></a>
-<span class="sourceLineNo">083</span>   * @param value update {@link #foundKV} flag with value.<a name="line.83"></a>
-<span class="sourceLineNo">084</span>   */<a name="line.84"></a>
-<span class="sourceLineNo">085</span>  protected void setFoundKV(boolean value) {<a name="line.85"></a>
-<span class="sourceLineNo">086</span>    this.foundKV = value;<a name="line.86"></a>
-<span class="sourceLineNo">087</span>  }<a name="line.87"></a>
-<span class="sourceLineNo">088</span><a name="line.88"></a>
-<span class="sourceLineNo">089</span>  /**<a name="line.89"></a>
-<span class="sourceLineNo">090</span>   * @return The filter serialized using pb<a name="line.90"></a>
-<span class="sourceLineNo">091</span>   */<a name="line.91"></a>
-<span class="sourceLineNo">092</span>  @Override<a name="line.92"></a>
-<span class="sourceLineNo">093</span>  public byte [] toByteArray() {<a name="line.93"></a>
-<span class="sourceLineNo">094</span>    FilterProtos.FirstKeyOnlyFilter.Builder builder =<a name="line.94"></a>
-<span class="sourceLineNo">095</span>      FilterProtos.FirstKeyOnlyFilter.newBuilder();<a name="line.95"></a>
-<span class="sourceLineNo">096</span>    return builder.build().toByteArray();<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>   * @param pbBytes A pb serialized {@link FirstKeyOnlyFilter} instance<a name="line.100"></a>
-<span class="sourceLineNo">101</span>   * @return An instance of {@link FirstKeyOnlyFilter} made from &lt;code&gt;bytes&lt;/code&gt;<a name="line.101"></a>
-<span class="sourceLineNo">102</span>   * @throws org.apache.hadoop.hbase.exceptions.DeserializationException<a name="line.102"></a>
-<span class="sourceLineNo">103</span>   * @see #toByteArray<a name="line.103"></a>
-<span class="sourceLineNo">104</span>   */<a name="line.104"></a>
-<span class="sourceLineNo">105</span>  public static FirstKeyOnlyFilter parseFrom(final byte [] pbBytes)<a name="line.105"></a>
-<span class="sourceLineNo">106</span>  throws DeserializationException {<a name="line.106"></a>
-<span class="sourceLineNo">107</span>    // There is nothing to deserialize.  Why do this at all?<a name="line.107"></a>
-<span class="sourceLineNo">108</span>    try {<a name="line.108"></a>
-<span class="sourceLineNo">109</span>      FilterProtos.FirstKeyOnlyFilter.parseFrom(pbBytes);<a name="line.109"></a>
-<span class="sourceLineNo">110</span>    } catch (InvalidProtocolBufferException e) {<a name="line.110"></a>
-<span class="sourceLineNo">111</span>      throw new DeserializationException(e);<a name="line.111"></a>
-<span class="sourceLineNo">112</span>    }<a name="line.112"></a>
-<span class="sourceLineNo">113</span>    // Just return a new instance.<a name="line.113"></a>
-<span class="sourceLineNo">114</span>    return new FirstKeyOnlyFilter();<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>   * @param o the other filter to compare with<a name="line.118"></a>
-<span class="sourceLineNo">119</span>   * @return true if and only if the fields of the filter that are serialized<a name="line.119"></a>
-<span class="sourceLineNo">120</span>   * are equal to the corresponding fields in other.  Used for testing.<a name="line.120"></a>
-<span class="sourceLineNo">121</span>   */<a name="line.121"></a>
-<span class="sourceLineNo">122</span>  @Override<a name="line.122"></a>
-<span class="sourceLineNo">123</span>  boolean areSerializedFieldsEqual(Filter o) {<a name="line.123"></a>
-<span class="sourceLineNo">124</span>    if (o == this) return true;<a name="line.124"></a>
-<span class="sourceLineNo">125</span>    if (!(o instanceof FirstKeyOnlyFilter)) return false;<a name="line.125"></a>
-<span class="sourceLineNo">126</span><a name="line.126"></a>
-<span class="sourceLineNo">127</span>    return true;<a name="line.127"></a>
-<span class="sourceLineNo">128</span>  }<a name="line.128"></a>
-<span class="sourceLineNo">129</span>}<a name="line.129"></a>
+<span class="sourceLineNo">023</span>import java.util.Objects;<a name="line.23"></a>
+<span class="sourceLineNo">024</span><a name="line.24"></a>
+<span class="sourceLineNo">025</span>import org.apache.hadoop.hbase.Cell;<a name="line.25"></a>
+<span class="sourceLineNo">026</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import org.apache.hadoop.hbase.exceptions.DeserializationException;<a name="line.27"></a>
+<span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.FilterProtos;<a name="line.28"></a>
+<span class="sourceLineNo">029</span><a name="line.29"></a>
+<span class="sourceLineNo">030</span>import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;<a name="line.30"></a>
+<span class="sourceLineNo">031</span>import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException;<a name="line.31"></a>
+<span class="sourceLineNo">032</span><a name="line.32"></a>
+<span class="sourceLineNo">033</span>/**<a name="line.33"></a>
+<span class="sourceLineNo">034</span> * A filter that will only return the first KV from each row.<a name="line.34"></a>
+<span class="sourceLineNo">035</span> * &lt;p&gt;<a name="line.35"></a>
+<span class="sourceLineNo">036</span> * This filter can be used to more efficiently perform row count operations.<a name="line.36"></a>
+<span class="sourceLineNo">037</span> */<a name="line.37"></a>
+<span class="sourceLineNo">038</span>@InterfaceAudience.Public<a name="line.38"></a>
+<span class="sourceLineNo">039</span>public class FirstKeyOnlyFilter extends FilterBase {<a name="line.39"></a>
+<span class="sourceLineNo">040</span>  private boolean foundKV = false;<a name="line.40"></a>
+<span class="sourceLineNo">041</span><a name="line.41"></a>
+<span class="sourceLineNo">042</span>  public FirstKeyOnlyFilter() {<a name="line.42"></a>
+<span class="sourceLineNo">043</span>  }<a name="line.43"></a>
+<span class="sourceLineNo">044</span><a name="line.44"></a>
+<span class="sourceLineNo">045</span>  @Override<a name="line.45"></a>
+<span class="sourceLineNo">046</span>  public void reset() {<a name="line.46"></a>
+<span class="sourceLineNo">047</span>    foundKV = false;<a name="line.47"></a>
+<span class="sourceLineNo">048</span>  }<a name="line.48"></a>
+<span class="sourceLineNo">049</span><a name="line.49"></a>
+<span class="sourceLineNo">050</span>  @Override<a name="line.50"></a>
+<span class="sourceLineNo">051</span>  public boolean filterRowKey(Cell cell) throws IOException {<a name="line.51"></a>
+<span class="sourceLineNo">052</span>    // Impl in FilterBase might do unnecessary copy for Off heap backed Cells.<a name="line.52"></a>
+<span class="sourceLineNo">053</span>    return false;<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>  @Deprecated<a name="line.56"></a>
+<span class="sourceLineNo">057</span>  @Override<a name="line.57"></a>
+<span class="sourceLineNo">058</span>  public ReturnCode filterKeyValue(final Cell c) {<a name="line.58"></a>
+<span class="sourceLineNo">059</span>    return filterCell(c);<a name="line.59"></a>
+<span class="sourceLineNo">060</span>  }<a name="line.60"></a>
+<span class="sourceLineNo">061</span><a name="line.61"></a>
+<span class="sourceLineNo">062</span>  @Override<a name="line.62"></a>
+<span class="sourceLineNo">063</span>  public ReturnCode filterCell(final Cell c) {<a name="line.63"></a>
+<span class="sourceLineNo">064</span>    if(foundKV) return ReturnCode.NEXT_ROW;<a name="line.64"></a>
+<span class="sourceLineNo">065</span>    foundKV = true;<a name="line.65"></a>
+<span class="sourceLineNo">066</span>    return ReturnCode.INCLUDE;<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>  public static Filter createFilterFromArguments(ArrayList&lt;byte []&gt; filterArguments) {<a name="line.69"></a>
+<span class="sourceLineNo">070</span>    Preconditions.checkArgument(filterArguments.isEmpty(),<a name="line.70"></a>
+<span class="sourceLineNo">071</span>                                "Expected 0 but got: %s", filterArguments.size());<a name="line.71"></a>
+<span class="sourceLineNo">072</span>    return new FirstKeyOnlyFilter();<a name="line.72"></a>
+<span class="sourceLineNo">073</span>  }<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>   * @return true if first KV has been found.<a name="line.76"></a>
+<span class="sourceLineNo">077</span>   */<a name="line.77"></a>
+<span class="sourceLineNo">078</span>  protected boolean hasFoundKV() {<a name="line.78"></a>
+<span class="sourceLineNo">079</span>    return this.foundKV;<a name="line.79"></a>
+<span class="sourceLineNo">080</span>  }<a name="line.80"></a>
+<span class="sourceLineNo">081</span><a name="line.81"></a>
+<span class="sourceLineNo">082</span>  /**<a name="line.82"></a>
+<span class="sourceLineNo">083</span>   *<a name="line.83"></a>
+<span class="sourceLineNo">084</span>   * @param value update {@link #foundKV} flag with value.<a name="line.84"></a>
+<span class="sourceLineNo">085</span>   */<a name="line.85"></a>
+<span class="sourceLineNo">086</span>  protected void setFoundKV(boolean value) {<a name="line.86"></a>
+<span class="sourceLineNo">087</span>    this.foundKV = value;<a name="line.87"></a>
+<span class="sourceLineNo">088</span>  }<a name="line.88"></a>
+<span class="sourceLineNo">089</span><a name="line.89"></a>
+<span class="sourceLineNo">090</span>  /**<a name="line.90"></a>
+<span class="sourceLineNo">091</span>   * @return The filter serialized using pb<a name="line.91"></a>
+<span class="sourceLineNo">092</span>   */<a name="line.92"></a>
+<span class="sourceLineNo">093</span>  @Override<a name="line.93"></a>
+<span class="sourceLineNo">094</span>  public byte [] toByteArray() {<a name="line.94"></a>
+<span class="sourceLineNo">095</span>    FilterProtos.FirstKeyOnlyFilter.Builder builder =<a name="line.95"></a>
+<span class="sourceLineNo">096</span>      FilterProtos.FirstKeyOnlyFilter.newBuilder();<a name="line.96"></a>
+<span class="sourceLineNo">097</span>    return builder.build().toByteArray();<a name="line.97"></a>
+<span class="sourceLineNo">098</span>  }<a name="line.98"></a>
+<span class="sourceLineNo">099</span><a name="line.99"></a>
+<span class="sourceLineNo">100</span>  /**<a name="line.100"></a>
+<span class="sourceLineNo">101</span>   * @param pbBytes A pb serialized {@link FirstKeyOnlyFilter} instance<a name="line.101"></a>
+<span class="sourceLineNo">102</span>   * @return An instance of {@link FirstKeyOnlyFilter} made from &lt;code&gt;bytes&lt;/code&gt;<a name="line.102"></a>
+<span class="sourceLineNo">103</span>   * @throws org.apache.hadoop.hbase.exceptions.DeserializationException<a name="line.103"></a>
+<span class="sourceLineNo">104</span>   * @see #toByteArray<a name="line.104"></a>
+<span class="sourceLineNo">105</span>   */<a name="line.105"></a>
+<span class="sourceLineNo">106</span>  public static FirstKeyOnlyFilter parseFrom(final byte [] pbBytes)<a name="line.106"></a>
+<span class="sourceLineNo">107</span>  throws DeserializationException {<a name="line.107"></a>
+<span class="sourceLineNo">108</span>    // There is nothing to deserialize.  Why do this at all?<a name="line.108"></a>
+<span class="sourceLineNo">109</span>    try {<a name="line.109"></a>
+<span class="sourceLineNo">110</span>      FilterProtos.FirstKeyOnlyFilter.parseFrom(pbBytes);<a name="line.110"></a>
+<span class="sourceLineNo">111</span>    } catch (InvalidProtocolBufferException e) {<a name="line.111"></a>
+<span class="sourceLineNo">112</span>      throw new DeserializationException(e);<a name="line.112"></a>
+<span class="sourceLineNo">113</span>    }<a name="line.113"></a>
+<span class="sourceLineNo">114</span>    // Just return a new instance.<a name="line.114"></a>
+<span class="sourceLineNo">115</span>    return new FirstKeyOnlyFilter();<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>   * @param o the other filter to compare with<a name="line.119"></a>
+<span class="sourceLineNo">120</span>   * @return true if and only if the fields of the filter that are serialized<a name="line.120"></a>
+<span class="sourceLineNo">121</span>   * are equal to the corresponding fields in other.  Used for testing.<a name="line.121"></a>
+<span class="sourceLineNo">122</span>   */<a name="line.122"></a>
+<span class="sourceLineNo">123</span>  @Override<a name="line.123"></a>
+<span class="sourceLineNo">124</span>  boolean areSerializedFieldsEqual(Filter o) {<a name="line.124"></a>
+<span class="sourceLineNo">125</span>    if (o == this) return true;<a name="line.125"></a>
+<span class="sourceLineNo">126</span>    if (!(o instanceof FirstKeyOnlyFilter)) return false;<a name="line.126"></a>
+<span class="sourceLineNo">127</span><a name="line.127"></a>
+<span class="sourceLineNo">128</span>    return true;<a name="line.128"></a>
+<span class="sourceLineNo">129</span>  }<a name="line.129"></a>
+<span class="sourceLineNo">130</span><a name="line.130"></a>
+<span class="sourceLineNo">131</span>  @Override<a name="line.131"></a>
+<span class="sourceLineNo">132</span>  public boolean equals(Object obj) {<a name="line.132"></a>
+<span class="sourceLineNo">133</span>    return obj instanceof Filter &amp;&amp; areSerializedFieldsEqual((Filter) obj);<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>  @Override<a name="line.136"></a>
+<span class="sourceLineNo">137</span>  public int hashCode() {<a name="line.137"></a>
+<span class="sourceLineNo">138</span>    return Objects.hashCode(foundKV);<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>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/293abb17/apidocs/src-html/org/apache/hadoop/hbase/filter/FirstKeyValueMatchingQualifiersFilter.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/filter/FirstKeyValueMatchingQualifiersFilter.html b/apidocs/src-html/org/apache/hadoop/hbase/filter/FirstKeyValueMatchingQualifiersFilter.html
index 69ecec9..a4e9982 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/filter/FirstKeyValueMatchingQualifiersFilter.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/filter/FirstKeyValueMatchingQualifiersFilter.html
@@ -145,18 +145,14 @@
 <span class="sourceLineNo">137</span><a name="line.137"></a>
 <span class="sourceLineNo">138</span>  @Override<a name="line.138"></a>
 <span class="sourceLineNo">139</span>  public boolean equals(Object obj) {<a name="line.139"></a>
-<span class="sourceLineNo">140</span>    if (obj == null || (!(obj instanceof FirstKeyValueMatchingQualifiersFilter))) {<a name="line.140"></a>
-<span class="sourceLineNo">141</span>      return false;<a name="line.141"></a>
-<span class="sourceLineNo">142</span>    }<a name="line.142"></a>
-<span class="sourceLineNo">143</span>    FirstKeyValueMatchingQualifiersFilter f = (FirstKeyValueMatchingQualifiersFilter) obj;<a name="line.143"></a>
-<span class="sourceLineNo">144</span>    return this.areSerializedFieldsEqual(f);<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>  @Override<a name="line.147"></a>
-<span class="sourceLineNo">148</span>  public int hashCode() {<a name="line.148"></a>
-<span class="sourceLineNo">149</span>    return Objects.hash(this.qualifiers);<a name="line.149"></a>
-<span class="sourceLineNo">150</span>  }<a name="line.150"></a>
-<span class="sourceLineNo">151</span>}<a name="line.151"></a>
+<span class="sourceLineNo">140</span>    return obj instanceof Filter &amp;&amp; areSerializedFieldsEqual((Filter) obj);<a name="line.140"></a>
+<span class="sourceLineNo">141</span>  }<a name="line.141"></a>
+<span class="sourceLineNo">142</span><a name="line.142"></a>
+<span class="sourceLineNo">143</span>  @Override<a name="line.143"></a>
+<span class="sourceLineNo">144</span>  public int hashCode() {<a name="line.144"></a>
+<span class="sourceLineNo">145</span>    return Objects.hash(this.qualifiers);<a name="line.145"></a>
+<span class="sourceLineNo">146</span>  }<a name="line.146"></a>
+<span class="sourceLineNo">147</span>}<a name="line.147"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/293abb17/apidocs/src-html/org/apache/hadoop/hbase/filter/FuzzyRowFilter.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/filter/FuzzyRowFilter.html b/apidocs/src-html/org/apache/hadoop/hbase/filter/FuzzyRowFilter.html
index d9cda57..3efe1f0 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/filter/FuzzyRowFilter.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/filter/FuzzyRowFilter.html
@@ -658,18 +658,14 @@
 <span class="sourceLineNo">650</span><a name="line.650"></a>
 <span class="sourceLineNo">651</span>  @Override<a name="line.651"></a>
 <span class="sourceLineNo">652</span>  public boolean equals(Object obj) {<a name="line.652"></a>
-<span class="sourceLineNo">653</span>    if (obj == null || (!(obj instanceof FuzzyRowFilter))) {<a name="line.653"></a>
-<span class="sourceLineNo">654</span>      return false;<a name="line.654"></a>
-<span class="sourceLineNo">655</span>    }<a name="line.655"></a>
-<span class="sourceLineNo">656</span>    FuzzyRowFilter f = (FuzzyRowFilter) obj;<a name="line.656"></a>
-<span class="sourceLineNo">657</span>    return this.areSerializedFieldsEqual(f);<a name="line.657"></a>
-<span class="sourceLineNo">658</span>  }<a name="line.658"></a>
-<span class="sourceLineNo">659</span><a name="line.659"></a>
-<span class="sourceLineNo">660</span>  @Override<a name="line.660"></a>
-<span class="sourceLineNo">661</span>  public int hashCode() {<a name="line.661"></a>
-<span class="sourceLineNo">662</span>    return Objects.hash(this.fuzzyKeysData.toArray());<a name="line.662"></a>
-<span class="sourceLineNo">663</span>  }<a name="line.663"></a>
-<span class="sourceLineNo">664</span>}<a name="line.664"></a>
+<span class="sourceLineNo">653</span>    return obj instanceof Filter &amp;&amp; areSerializedFieldsEqual((Filter) obj);<a name="line.653"></a>
+<span class="sourceLineNo">654</span>  }<a name="line.654"></a>
+<span class="sourceLineNo">655</span><a name="line.655"></a>
+<span class="sourceLineNo">656</span>  @Override<a name="line.656"></a>
+<span class="sourceLineNo">657</span>  public int hashCode() {<a name="line.657"></a>
+<span class="sourceLineNo">658</span>    return Objects.hash(this.fuzzyKeysData);<a name="line.658"></a>
+<span class="sourceLineNo">659</span>  }<a name="line.659"></a>
+<span class="sourceLineNo">660</span>}<a name="line.660"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/293abb17/apidocs/src-html/org/apache/hadoop/hbase/filter/InclusiveStopFilter.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/filter/InclusiveStopFilter.html b/apidocs/src-html/org/apache/hadoop/hbase/filter/InclusiveStopFilter.html
index c5cb1c7..11f3bc9 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/filter/InclusiveStopFilter.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/filter/InclusiveStopFilter.html
@@ -28,133 +28,128 @@
 <span class="sourceLineNo">020</span>package org.apache.hadoop.hbase.filter;<a name="line.20"></a>
 <span class="sourceLineNo">021</span><a name="line.21"></a>
 <span class="sourceLineNo">022</span>import java.util.ArrayList;<a name="line.22"></a>
-<span class="sourceLineNo">023</span>import java.util.Objects;<a name="line.23"></a>
-<span class="sourceLineNo">024</span><a name="line.24"></a>
-<span class="sourceLineNo">025</span>import org.apache.hadoop.hbase.Cell;<a name="line.25"></a>
-<span class="sourceLineNo">026</span>import org.apache.hadoop.hbase.CellComparator;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.27"></a>
-<span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.exceptions.DeserializationException;<a name="line.28"></a>
-<span class="sourceLineNo">029</span>import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException;<a name="line.29"></a>
-<span class="sourceLineNo">030</span>import org.apache.hbase.thirdparty.com.google.protobuf.UnsafeByteOperations;<a name="line.30"></a>
-<span class="sourceLineNo">031</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.FilterProtos;<a name="line.31"></a>
-<span class="sourceLineNo">032</span>import org.apache.hadoop.hbase.util.Bytes;<a name="line.32"></a>
-<span class="sourceLineNo">033</span><a name="line.33"></a>
-<span class="sourceLineNo">034</span>import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;<a name="line.34"></a>
-<span class="sourceLineNo">035</span><a name="line.35"></a>
-<span class="sourceLineNo">036</span>/**<a name="line.36"></a>
-<span class="sourceLineNo">037</span> * A Filter that stops after the given row.  There is no "RowStopFilter" because<a name="line.37"></a>
-<span class="sourceLineNo">038</span> * the Scan spec allows you to specify a stop row.<a name="line.38"></a>
-<span class="sourceLineNo">039</span> *<a name="line.39"></a>
-<span class="sourceLineNo">040</span> * Use this filter to include the stop row, eg: [A,Z].<a name="line.40"></a>
-<span class="sourceLineNo">041</span> */<a name="line.41"></a>
-<span class="sourceLineNo">042</span>@InterfaceAudience.Public<a name="line.42"></a>
-<span class="sourceLineNo">043</span>public class InclusiveStopFilter extends FilterBase {<a name="line.43"></a>
-<span class="sourceLineNo">044</span>  private byte [] stopRowKey;<a name="line.44"></a>
-<span class="sourceLineNo">045</span>  private boolean done = false;<a name="line.45"></a>
-<span class="sourceLineNo">046</span><a name="line.46"></a>
-<span class="sourceLineNo">047</span>  public InclusiveStopFilter(final byte [] stopRowKey) {<a name="line.47"></a>
-<span class="sourceLineNo">048</span>    this.stopRowKey = stopRowKey;<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>  public byte[] getStopRowKey() {<a name="line.51"></a>
-<span class="sourceLineNo">052</span>    return this.stopRowKey;<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>  @Deprecated<a name="line.55"></a>
-<span class="sourceLineNo">056</span>  @Override<a name="line.56"></a>
-<span class="sourceLineNo">057</span>  public ReturnCode filterKeyValue(final Cell c) {<a name="line.57"></a>
-<span class="sourceLineNo">058</span>    return filterCell(c);<a name="line.58"></a>
-<span class="sourceLineNo">059</span>  }<a name="line.59"></a>
-<span class="sourceLineNo">060</span><a name="line.60"></a>
-<span class="sourceLineNo">061</span>  @Override<a name="line.61"></a>
-<span class="sourceLineNo">062</span>  public ReturnCode filterCell(final Cell c) {<a name="line.62"></a>
-<span class="sourceLineNo">063</span>    if (done) return ReturnCode.NEXT_ROW;<a name="line.63"></a>
-<span class="sourceLineNo">064</span>    return ReturnCode.INCLUDE;<a name="line.64"></a>
-<span class="sourceLineNo">065</span>  }<a name="line.65"></a>
-<span class="sourceLineNo">066</span><a name="line.66"></a>
-<span class="sourceLineNo">067</span>  @Override<a name="line.67"></a>
-<span class="sourceLineNo">068</span>  public boolean filterRowKey(Cell firstRowCell) {<a name="line.68"></a>
-<span class="sourceLineNo">069</span>    // if stopRowKey is &lt;= buffer, then true, filter row.<a name="line.69"></a>
-<span class="sourceLineNo">070</span>    if (filterAllRemaining()) return true;<a name="line.70"></a>
-<span class="sourceLineNo">071</span>    int cmp = CellComparator.getInstance().compareRows(firstRowCell, stopRowKey, 0, stopRowKey.length);<a name="line.71"></a>
-<span class="sourceLineNo">072</span>    done = reversed ? cmp &lt; 0 : cmp &gt; 0;<a name="line.72"></a>
-<span class="sourceLineNo">073</span>    return done;<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>  @Override<a name="line.76"></a>
-<span class="sourceLineNo">077</span>  public boolean filterAllRemaining() {<a name="line.77"></a>
-<span class="sourceLineNo">078</span>    return done;<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>  public static Filter createFilterFromArguments (ArrayList&lt;byte []&gt; filterArguments) {<a name="line.81"></a>
-<span class="sourceLineNo">082</span>    Preconditions.checkArgument(filterArguments.size() == 1,<a name="line.82"></a>
-<span class="sourceLineNo">083</span>                                "Expected 1 but got: %s", filterArguments.size());<a name="line.83"></a>
-<span class="sourceLineNo">084</span>    byte [] stopRowKey = ParseFilter.removeQuotesFromByteArray(filterArguments.get(0));<a name="line.84"></a>
-<span class="sourceLineNo">085</span>    return new InclusiveStopFilter(stopRowKey);<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>  /**<a name="line.88"></a>
-<span class="sourceLineNo">089</span>   * @return The filter serialized using pb<a name="line.89"></a>
-<span class="sourceLineNo">090</span>   */<a name="line.90"></a>
-<span class="sourceLineNo">091</span>  @Override<a name="line.91"></a>
-<span class="sourceLineNo">092</span>  public byte [] toByteArray() {<a name="line.92"></a>
-<span class="sourceLineNo">093</span>    FilterProtos.InclusiveStopFilter.Builder builder =<a name="line.93"></a>
-<span class="sourceLineNo">094</span>      FilterProtos.InclusiveStopFilter.newBuilder();<a name="line.94"></a>
-<span class="sourceLineNo">095</span>    if (this.stopRowKey != null) builder.setStopRowKey(<a name="line.95"></a>
-<span class="sourceLineNo">096</span>        UnsafeByteOperations.unsafeWrap(this.stopRowKey));<a name="line.96"></a>
-<span class="sourceLineNo">097</span>    return builder.build().toByteArray();<a name="line.97"></a>
-<span class="sourceLineNo">098</span>  }<a name="line.98"></a>
-<span class="sourceLineNo">099</span><a name="line.99"></a>
-<span class="sourceLineNo">100</span>  /**<a name="line.100"></a>
-<span class="sourceLineNo">101</span>   * @param pbBytes A pb serialized {@link InclusiveStopFilter} instance<a name="line.101"></a>
-<span class="sourceLineNo">102</span>   * @return An instance of {@link InclusiveStopFilter} made from &lt;code&gt;bytes&lt;/code&gt;<a name="line.102"></a>
-<span class="sourceLineNo">103</span>   * @throws DeserializationException<a name="line.103"></a>
-<span class="sourceLineNo">104</span>   * @see #toByteArray<a name="line.104"></a>
-<span class="sourceLineNo">105</span>   */<a name="line.105"></a>
-<span class="sourceLineNo">106</span>  public static InclusiveStopFilter parseFrom(final byte [] pbBytes)<a name="line.106"></a>
-<span class="sourceLineNo">107</span>  throws DeserializationException {<a name="line.107"></a>
-<span class="sourceLineNo">108</span>    FilterProtos.InclusiveStopFilter proto;<a name="line.108"></a>
-<span class="sourceLineNo">109</span>    try {<a name="line.109"></a>
-<span class="sourceLineNo">110</span>      proto = FilterProtos.InclusiveStopFilter.parseFrom(pbBytes);<a name="line.110"></a>
-<span class="sourceLineNo">111</span>    } catch (InvalidProtocolBufferException e) {<a name="line.111"></a>
-<span class="sourceLineNo">112</span>      throw new DeserializationException(e);<a name="line.112"></a>
-<span class="sourceLineNo">113</span>    }<a name="line.113"></a>
-<span class="sourceLineNo">114</span>    return new InclusiveStopFilter(proto.hasStopRowKey()?proto.getStopRowKey().toByteArray():null);<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>   * @param o the other filter to compare with<a name="line.118"></a>
-<span class="sourceLineNo">119</span>   * @return true if and only if the fields of the filter that are serialized<a name="line.119"></a>
-<span class="sourceLineNo">120</span>   * are equal to the corresponding fields in other.  Used for testing.<a name="line.120"></a>
-<span class="sourceLineNo">121</span>   */<a name="line.121"></a>
-<span class="sourceLineNo">122</span>  @Override<a name="line.122"></a>
-<span class="sourceLineNo">123</span>  boolean areSerializedFieldsEqual(Filter o) {<a name="line.123"></a>
-<span class="sourceLineNo">124</span>    if (o == this) return true;<a name="line.124"></a>
-<span class="sourceLineNo">125</span>    if (!(o instanceof InclusiveStopFilter)) return false;<a name="line.125"></a>
-<span class="sourceLineNo">126</span><a name="line.126"></a>
-<span class="sourceLineNo">127</span>    InclusiveStopFilter other = (InclusiveStopFilter)o;<a name="line.127"></a>
-<span class="sourceLineNo">128</span>    return Bytes.equals(this.getStopRowKey(), other.getStopRowKey());<a name="line.128"></a>
-<span class="sourceLineNo">129</span>  }<a name="line.129"></a>
-<span class="sourceLineNo">130</span><a name="line.130"></a>
-<span class="sourceLineNo">131</span>  @Override<a name="line.131"></a>
-<span class="sourceLineNo">132</span>  public String toString() {<a name="line.132"></a>
-<span class="sourceLineNo">133</span>    return this.getClass().getSimpleName() + " " + Bytes.toStringBinary(this.stopRowKey);<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>  @Override<a name="line.136"></a>
-<span class="sourceLineNo">137</span>  public boolean equals(Object obj) {<a name="line.137"></a>
-<span class="sourceLineNo">138</span>    if (obj == null || (!(obj instanceof InclusiveStopFilter))) {<a name="line.138"></a>
-<span class="sourceLineNo">139</span>      return false;<a name="line.139"></a>
-<span class="sourceLineNo">140</span>    }<a name="line.140"></a>
-<span class="sourceLineNo">141</span>    InclusiveStopFilter f = (InclusiveStopFilter) obj;<a name="line.141"></a>
-<span class="sourceLineNo">142</span>    return this.areSerializedFieldsEqual(f);<a name="line.142"></a>
+<span class="sourceLineNo">023</span><a name="line.23"></a>
+<span class="sourceLineNo">024</span>import org.apache.hadoop.hbase.Cell;<a name="line.24"></a>
+<span class="sourceLineNo">025</span>import org.apache.hadoop.hbase.CellComparator;<a name="line.25"></a>
+<span class="sourceLineNo">026</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import org.apache.hadoop.hbase.exceptions.DeserializationException;<a name="line.27"></a>
+<span class="sourceLineNo">028</span>import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException;<a name="line.28"></a>
+<span class="sourceLineNo">029</span>import org.apache.hbase.thirdparty.com.google.protobuf.UnsafeByteOperations;<a name="line.29"></a>
+<span class="sourceLineNo">030</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.FilterProtos;<a name="line.30"></a>
+<span class="sourceLineNo">031</span>import org.apache.hadoop.hbase.util.Bytes;<a name="line.31"></a>
+<span class="sourceLineNo">032</span><a name="line.32"></a>
+<span class="sourceLineNo">033</span>import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;<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> * A Filter that stops after the given row.  There is no "RowStopFilter" because<a name="line.36"></a>
+<span class="sourceLineNo">037</span> * the Scan spec allows you to specify a stop row.<a name="line.37"></a>
+<span class="sourceLineNo">038</span> *<a name="line.38"></a>
+<span class="sourceLineNo">039</span> * Use this filter to include the stop row, eg: [A,Z].<a name="line.39"></a>
+<span class="sourceLineNo">040</span> */<a name="line.40"></a>
+<span class="sourceLineNo">041</span>@InterfaceAudience.Public<a name="line.41"></a>
+<span class="sourceLineNo">042</span>public class InclusiveStopFilter extends FilterBase {<a name="line.42"></a>
+<span class="sourceLineNo">043</span>  private byte [] stopRowKey;<a name="line.43"></a>
+<span class="sourceLineNo">044</span>  private boolean done = false;<a name="line.44"></a>
+<span class="sourceLineNo">045</span><a name="line.45"></a>
+<span class="sourceLineNo">046</span>  public InclusiveStopFilter(final byte [] stopRowKey) {<a name="line.46"></a>
+<span class="sourceLineNo">047</span>    this.stopRowKey = stopRowKey;<a name="line.47"></a>
+<span class="sourceLineNo">048</span>  }<a name="line.48"></a>
+<span class="sourceLineNo">049</span><a name="line.49"></a>
+<span class="sourceLineNo">050</span>  public byte[] getStopRowKey() {<a name="line.50"></a>
+<span class="sourceLineNo">051</span>    return this.stopRowKey;<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>  @Deprecated<a name="line.54"></a>
+<span class="sourceLineNo">055</span>  @Override<a name="line.55"></a>
+<span class="sourceLineNo">056</span>  public ReturnCode filterKeyValue(final Cell c) {<a name="line.56"></a>
+<span class="sourceLineNo">057</span>    return filterCell(c);<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>  @Override<a name="line.60"></a>
+<span class="sourceLineNo">061</span>  public ReturnCode filterCell(final Cell c) {<a name="line.61"></a>
+<span class="sourceLineNo">062</span>    if (done) return ReturnCode.NEXT_ROW;<a name="line.62"></a>
+<span class="sourceLineNo">063</span>    return ReturnCode.INCLUDE;<a name="line.63"></a>
+<span class="sourceLineNo">064</span>  }<a name="line.64"></a>
+<span class="sourceLineNo">065</span><a name="line.65"></a>
+<span class="sourceLineNo">066</span>  @Override<a name="line.66"></a>
+<span class="sourceLineNo">067</span>  public boolean filterRowKey(Cell firstRowCell) {<a name="line.67"></a>
+<span class="sourceLineNo">068</span>    // if stopRowKey is &lt;= buffer, then true, filter row.<a name="line.68"></a>
+<span class="sourceLineNo">069</span>    if (filterAllRemaining()) return true;<a name="line.69"></a>
+<span class="sourceLineNo">070</span>    int cmp = CellComparator.getInstance().compareRows(firstRowCell, stopRowKey, 0, stopRowKey.length);<a name="line.70"></a>
+<span class="sourceLineNo">071</span>    done = reversed ? cmp &lt; 0 : cmp &gt; 0;<a name="line.71"></a>
+<span class="sourceLineNo">072</span>    return done;<a name="line.72"></a>
+<span class="sourceLineNo">073</span>  }<a name="line.73"></a>
+<span class="sourceLineNo">074</span><a name="line.74"></a>
+<span class="sourceLineNo">075</span>  @Override<a name="line.75"></a>
+<span class="sourceLineNo">076</span>  public boolean filterAllRemaining() {<a name="line.76"></a>
+<span class="sourceLineNo">077</span>    return done;<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>  public static Filter createFilterFromArguments (ArrayList&lt;byte []&gt; filterArguments) {<a name="line.80"></a>
+<span class="sourceLineNo">081</span>    Preconditions.checkArgument(filterArguments.size() == 1,<a name="line.81"></a>
+<span class="sourceLineNo">082</span>                                "Expected 1 but got: %s", filterArguments.size());<a name="line.82"></a>
+<span class="sourceLineNo">083</span>    byte [] stopRowKey = ParseFilter.removeQuotesFromByteArray(filterArguments.get(0));<a name="line.83"></a>
+<span class="sourceLineNo">084</span>    return new InclusiveStopFilter(stopRowKey);<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 filter serialized using pb<a name="line.88"></a>
+<span class="sourceLineNo">089</span>   */<a name="line.89"></a>
+<span class="sourceLineNo">090</span>  @Override<a name="line.90"></a>
+<span class="sourceLineNo">091</span>  public byte [] toByteArray() {<a name="line.91"></a>
+<span class="sourceLineNo">092</span>    FilterProtos.InclusiveStopFilter.Builder builder =<a name="line.92"></a>
+<span class="sourceLineNo">093</span>      FilterProtos.InclusiveStopFilter.newBuilder();<a name="line.93"></a>
+<span class="sourceLineNo">094</span>    if (this.stopRowKey != null) builder.setStopRowKey(<a name="line.94"></a>
+<span class="sourceLineNo">095</span>        UnsafeByteOperations.unsafeWrap(this.stopRowKey));<a name="line.95"></a>
+<span class="sourceLineNo">096</span>    return builder.build().toByteArray();<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>   * @param pbBytes A pb serialized {@link InclusiveStopFilter} instance<a name="line.100"></a>
+<span class="sourceLineNo">101</span>   * @return An instance of {@link InclusiveStopFilter} made from &lt;code&gt;bytes&lt;/code&gt;<a name="line.101"></a>
+<span class="sourceLineNo">102</span>   * @throws DeserializationException<a name="line.102"></a>
+<span class="sourceLineNo">103</span>   * @see #toByteArray<a name="line.103"></a>
+<span class="sourceLineNo">104</span>   */<a name="line.104"></a>
+<span class="sourceLineNo">105</span>  public static InclusiveStopFilter parseFrom(final byte [] pbBytes)<a name="line.105"></a>
+<span class="sourceLineNo">106</span>  throws DeserializationException {<a name="line.106"></a>
+<span class="sourceLineNo">107</span>    FilterProtos.InclusiveStopFilter proto;<a name="line.107"></a>
+<span class="sourceLineNo">108</span>    try {<a name="line.108"></a>
+<span class="sourceLineNo">109</span>      proto = FilterProtos.InclusiveStopFilter.parseFrom(pbBytes);<a name="line.109"></a>
+<span class="sourceLineNo">110</span>    } catch (InvalidProtocolBufferException e) {<a name="line.110"></a>
+<span class="sourceLineNo">111</span>      throw new DeserializationException(e);<a name="line.111"></a>
+<span class="sourceLineNo">112</span>    }<a name="line.112"></a>
+<span class="sourceLineNo">113</span>    return new InclusiveStopFilter(proto.hasStopRowKey()?proto.getStopRowKey().toByteArray():null);<a name="line.113"></a>
+<span class="sourceLineNo">114</span>  }<a name="line.114"></a>
+<span class="sourceLineNo">115</span><a name="line.115"></a>
+<span class="sourceLineNo">116</span>  /**<a name="line.116"></a>
+<span class="sourceLineNo">117</span>   * @param o the other filter to compare with<a name="line.117"></a>
+<span class="sourceLineNo">118</span>   * @return true if and only if the fields of the filter that are serialized<a name="line.118"></a>
+<span class="sourceLineNo">119</span>   * are equal to the corresponding fields in other.  Used for testing.<a name="line.119"></a>
+<span class="sourceLineNo">120</span>   */<a name="line.120"></a>
+<span class="sourceLineNo">121</span>  @Override<a name="line.121"></a>
+<span class="sourceLineNo">122</span>  boolean areSerializedFieldsEqual(Filter o) {<a name="line.122"></a>
+<span class="sourceLineNo">123</span>    if (o == this) return true;<a name="line.123"></a>
+<span class="sourceLineNo">124</span>    if (!(o instanceof InclusiveStopFilter)) return false;<a name="line.124"></a>
+<span class="sourceLineNo">125</span><a name="line.125"></a>
+<span class="sourceLineNo">126</span>    InclusiveStopFilter other = (InclusiveStopFilter)o;<a name="line.126"></a>
+<span class="sourceLineNo">127</span>    return Bytes.equals(this.getStopRowKey(), other.getStopRowKey());<a name="line.127"></a>
+<span class="sourceLineNo">128</span>  }<a name="line.128"></a>
+<span class="sourceLineNo">129</span><a name="line.129"></a>
+<span class="sourceLineNo">130</span>  @Override<a name="line.130"></a>
+<span class="sourceLineNo">131</span>  public String toString() {<a name="line.131"></a>
+<span class="sourceLineNo">132</span>    return this.getClass().getSimpleName() + " " + Bytes.toStringBinary(this.stopRowKey);<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>  @Override<a name="line.135"></a>
+<span class="sourceLineNo">136</span>  public boolean equals(Object obj) {<a name="line.136"></a>
+<span class="sourceLineNo">137</span>    return obj instanceof Filter &amp;&amp; areSerializedFieldsEqual((Filter) obj);<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>  @Override<a name="line.140"></a>
+<span class="sourceLineNo">141</span>  public int hashCode() {<a name="line.141"></a>
+<span class="sourceLineNo">142</span>    return Bytes.hashCode(this.stopRowKey);<a name="line.142"></a>
 <span class="sourceLineNo">143</span>  }<a name="line.143"></a>
-<span class="sourceLineNo">144</span><a name="line.144"></a>
-<span class="sourceLineNo">145</span>  @Override<a name="line.145"></a>
-<span class="sourceLineNo">146</span>  public int hashCode() {<a name="line.146"></a>
-<span class="sourceLineNo">147</span>    return Objects.hash(Bytes.hashCode(this.stopRowKey));<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">144</span>}<a name="line.144"></a>
 
 
 


Mime
View raw message