HBASE-1567 cant serialize new filters
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@787910 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e121a78192
commit
44d6294ed7
|
@ -220,6 +220,7 @@ Release 0.20.0 - Unreleased
|
|||
filterSaysStop() - could result in NPE or excessive scanning
|
||||
HBASE-1564 in UI make host addresses all look the same -- not IP sometimes
|
||||
and host at others
|
||||
HBASE-1567 cant serialize new filters
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-1089 Add count of regions on filesystem to master UI; add percentage
|
||||
|
|
|
@ -46,6 +46,11 @@ import org.apache.hadoop.hbase.client.Result;
|
|||
import org.apache.hadoop.hbase.client.Scan;
|
||||
import org.apache.hadoop.hbase.filter.RowFilterInterface;
|
||||
import org.apache.hadoop.hbase.filter.RowFilterSet;
|
||||
import org.apache.hadoop.hbase.filter.RowWhileMatchFilter;
|
||||
import org.apache.hadoop.hbase.filter.RowPrefixFilter;
|
||||
import org.apache.hadoop.hbase.filter.PageFilter;
|
||||
import org.apache.hadoop.hbase.filter.RowInclusiveStopFilter;
|
||||
import org.apache.hadoop.hbase.filter.ColumnCountGetFilter;
|
||||
import org.apache.hadoop.hbase.io.HbaseMapWritable;
|
||||
import org.apache.hadoop.io.MapWritable;
|
||||
import org.apache.hadoop.io.ObjectWritable;
|
||||
|
@ -139,7 +144,12 @@ public class HbaseObjectWritable implements Writable, Configurable {
|
|||
addToMap(Result.class, code++);
|
||||
addToMap(Result[].class, code++);
|
||||
addToMap(Scan.class, code++);
|
||||
|
||||
|
||||
addToMap(RowWhileMatchFilter.class, code++);
|
||||
addToMap(RowPrefixFilter.class, code++);
|
||||
addToMap(PageFilter.class, code++);
|
||||
addToMap(RowInclusiveStopFilter.class, code++);
|
||||
addToMap(ColumnCountGetFilter.class, code++);
|
||||
}
|
||||
|
||||
private Class<?> declaredClass;
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.apache.hadoop.hbase.HBaseConfiguration;
|
|||
import org.apache.hadoop.hbase.HConstants;
|
||||
import org.apache.hadoop.hbase.filter.RowFilterInterface;
|
||||
import org.apache.hadoop.hbase.filter.StopRowFilter;
|
||||
import org.apache.hadoop.hbase.filter.RowPrefixFilter;
|
||||
import org.apache.hadoop.io.Text;
|
||||
import org.apache.hadoop.io.WritableComparator;
|
||||
|
||||
|
@ -79,6 +80,10 @@ public class TestHbaseObjectWritable extends TestCase {
|
|||
obj = doType(conf, new StopRowFilter(HConstants.EMPTY_BYTE_ARRAY),
|
||||
RowFilterInterface.class);
|
||||
assertTrue(obj instanceof StopRowFilter);
|
||||
// Check that filters can be serialized
|
||||
obj = doType(conf, new RowPrefixFilter(HConstants.EMPTY_BYTE_ARRAY),
|
||||
RowPrefixFilter.class);
|
||||
assertTrue(obj instanceof RowPrefixFilter);
|
||||
}
|
||||
|
||||
private Object doType(final HBaseConfiguration conf, final Object value,
|
||||
|
|
Loading…
Reference in New Issue