hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
Subject svn commit: r1567263 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/filter/CompoundRowPrefixFilter.java
Date Tue, 11 Feb 2014 18:28:16 GMT
Author: liyin
Date: Tue Feb 11 18:28:16 2014
New Revision: 1567263

URL: http://svn.apache.org/r1567263
Log:
[HBASE-10027] Removing serde of derivable variables in CompoundRowPrefixFilter.

Author: manukranthk

Summary: Removes serde of currentRowPrefix, done, and currentPrefixIndex since they are derrivable
variables.

Test Plan: Run TestCompoundRowPrefixFilter.

Reviewers: liyintang, adela

Reviewed By: liyintang

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D1147032

Task ID: 3548003

Modified:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/filter/CompoundRowPrefixFilter.java

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/filter/CompoundRowPrefixFilter.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/filter/CompoundRowPrefixFilter.java?rev=1567263&r1=1567262&r2=1567263&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/filter/CompoundRowPrefixFilter.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/filter/CompoundRowPrefixFilter.java
Tue Feb 11 18:28:16 2014
@@ -128,21 +128,17 @@ public class CompoundRowPrefixFilter ext
   @Override
   public void readFields(DataInput in) throws IOException {
     int numRowPrefixes = in.readInt();
-    this.curRowPrefix = Bytes.readByteArray(in);
-    this.curPrefixIndex = in.readInt();
-    this.done = in.readBoolean();
     this.rowPrefixes = new ArrayList<byte[]>(numRowPrefixes);
     for (int i = 0; i < numRowPrefixes; i++) {
       rowPrefixes.add(Bytes.readByteArray(in));
     }
+    Preconditions.checkArgument(rowPrefixes.size() > 0);
+    this.resetFilterProgress();
   }
 
   @Override
   public void write(DataOutput out) throws IOException {
     out.writeInt(this.rowPrefixes.size());
-    Bytes.writeByteArray(out, this.curRowPrefix);
-    out.writeInt(this.curPrefixIndex);
-    out.writeBoolean(this.done);
     for (byte[] row : this.rowPrefixes) {
       Bytes.writeByteArray(out, row);
     }



Mime
View raw message