HBASE-7095 Cannot set 'lenAsVal' for KeyOnlyFilter from shell (Aditya)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1405657 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
867ff9fc69
commit
571a8a3e62
|
@ -51,9 +51,13 @@ public class KeyOnlyFilter extends FilterBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Filter createFilterFromArguments(ArrayList<byte []> filterArguments) {
|
public static Filter createFilterFromArguments(ArrayList<byte []> filterArguments) {
|
||||||
Preconditions.checkArgument(filterArguments.size() == 0,
|
Preconditions.checkArgument((filterArguments.size() == 0 || filterArguments.size() == 1),
|
||||||
"Expected: 0 but got: %s", filterArguments.size());
|
"Expected: 0 or 1 but got: %s", filterArguments.size());
|
||||||
return new KeyOnlyFilter();
|
KeyOnlyFilter filter = new KeyOnlyFilter();
|
||||||
|
if (filterArguments.size() == 1) {
|
||||||
|
filter.lenAsVal = ParseFilter.convertByteArrayToBoolean(filterArguments.get(0));
|
||||||
|
}
|
||||||
|
return filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue