public static FilterAdapter buildAdapter ( ) { FilterAdapter adapter = new FilterAdapter ( ) ; adapter . addFilterAdapter ( ColumnPrefixFilter . class , new ColumnPrefixFilterAdapter ( ) ) ; adapter . addFilterAdapter ( ColumnRangeFilter . class , new ColumnRangeFilterAdapter ( ) ) ; adapter . addFilterAdapter ( KeyOnlyFilter . class , new KeyOnlyFilterAdapter ( ) ) ; adapter . addFilterAdapter ( MultipleColumnPrefixFilter . class , new MultipleColumnPrefixFilterAdapter ( ) ) ; adapter . addFilterAdapter ( TimestampsFilter . class , new TimestampsFilterAdapter ( ) ) ; adapter . addFilterAdapter ( TimestampRangeFilter . class , new TimestampRangeFilterAdapter ( ) ) ; ValueFilterAdapter valueFilterAdapter = new ValueFilterAdapter ( ) ; adapter . addFilterAdapter ( ValueFilter . class , valueFilterAdapter ) ; SingleColumnValueFilterAdapter scvfa = new SingleColumnValueFilterAdapter ( valueFilterAdapter ) ; adapter . addFilterAdapter ( SingleColumnValueFilter . class , scvfa ) ; adapter . addFilterAdapter ( SingleColumnValueExcludeFilter . class , new SingleColumnValueExcludeFilterAdapter ( scvfa ) ) ; adapter . addFilterAdapter ( ColumnPaginationFilter . class , new ColumnPaginationFilterAdapter ( ) ) ; adapter . addFilterAdapter ( FirstKeyOnlyFilter . class , new FirstKeyOnlyFilterAdapter ( ) ) ; adapter . addFilterAdapter ( ColumnCountGetFilter . class , new ColumnCountGetFilterAdapter ( ) ) ; adapter . addFilterAdapter ( RandomRowFilter . class , new RandomRowFilterAdapter ( ) ) ; adapter . addFilterAdapter ( PrefixFilter . class , new PrefixFilterAdapter ( ) ) ; adapter . addFilterAdapter ( QualifierFilter . class , new QualifierFilterAdapter ( ) ) ; adapter . addFilterAdapter ( PageFilter . class , new PageFilterAdapter ( ) ) ; adapter . addFilterAdapter ( WhileMatchFilter . class , new WhileMatchFilterAdapter ( adapter ) ) ; adapter . addFilterAdapter ( org . apache . hadoop . hbase . filter . RowFilter . class , new RowFilterAdapter ( ) ) ; adapter . addFilterAdapter ( FuzzyRowFilter . class , new FuzzyRowFilterAdapter ( ) ) ; adapter . addFilterAdapter ( FamilyFilter . class , new FamilyFilterAdapter ( ) ) ; adapter . addFilterAdapter ( BigtableFilter . class , new BigtableFilterAdapter ( ) ) ; // MultiRowRangeFilter only exists in hbase >= 1.1 try { adapter . addFilterAdapter ( org . apache . hadoop . hbase . filter . MultiRowRangeFilter . class , new MultiRowRangeFilterAdapter ( ) ) ; } catch ( NoClassDefFoundError ignored ) { } // Passing the FilterAdapter in to the FilterListAdapter is a bit // unfortunate, but makes adapting the FilterList's subfilters simpler. FilterListAdapter filterListAdapter = new FilterListAdapter ( adapter ) ; // FilterList implements UnsupportedStatusCollector so it should // be used when possible (third parameter to addFilterAdapter()). adapter . addFilterAdapter ( FilterList . class , filterListAdapter , filterListAdapter ) ; return adapter ; }
Create a new FilterAdapter