@@ -50,7 +50,7 @@ public class ObHTableFilter extends AbstractPayload {
5050 private int maxVersions = 1 ;
5151 private int limitPerRowPerCf = -1 ; // -1 means unlimited
5252 private int offsetPerRowPerCf = 0 ; // -1 means unlimited
53- private String filterString ;
53+ private ObBytesString filterString = null ;
5454
5555 /*
5656 * Encode.
@@ -95,7 +95,7 @@ public byte[] encode() {
9595 System .arraycopy (Serialization .encodeVi32 (offsetPerRowPerCf ), 0 , bytes , idx , len );
9696 idx += len ;
9797 len = Serialization .getNeedBytes (filterString );
98- System .arraycopy (Serialization .encodeVString (filterString ), 0 , bytes , idx , len );
98+ System .arraycopy (Serialization .encodeBytesString (filterString ), 0 , bytes , idx , len );
9999 idx += len ;
100100
101101 return bytes ;
@@ -120,7 +120,7 @@ public Object decode(ByteBuf buf) {
120120 this .maxVersions = Serialization .decodeVi32 (buf );
121121 this .limitPerRowPerCf = Serialization .decodeVi32 (buf );
122122 this .offsetPerRowPerCf = Serialization .decodeVi32 (buf );
123- this .filterString = Serialization .decodeVString (buf );
123+ this .filterString = Serialization .decodeBytesString (buf );
124124
125125 return this ;
126126 }
@@ -262,14 +262,17 @@ public void setOffsetPerRowPerCf(int offsetPerRowPerCf) {
262262 /*
263263 * Get filter string.
264264 */
265- public String getFilterString () {
266- return filterString ;
265+ public byte [] getFilterString () {
266+ return filterString . bytes ;
267267 }
268268
269269 /*
270270 * Set filter string.
271271 */
272- public void setFilterString (String filterString ) {
273- this .filterString = filterString ;
272+ public void setFilterString (byte [] filterString ) {
273+ if (this .filterString == null ) {
274+ this .filterString = new ObBytesString ();
275+ }
276+ this .filterString .bytes = filterString ;
274277 }
275278}
0 commit comments