--- src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift 2013-02-07 16:01:02.000000000 +0100 +++ hbase-thrift2/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift 2013-02-07 17:20:25.000000000 +0100 @@ -41,6 +41,35 @@ } /** +* Represents a server side filter +* +*/ +struct TFilter { + 1: required string className, + 2: required list arguments +} + + +/** + * Specify boolean operator for TFilterList: + * - MUST_PASS_ALL means AND boolean operation + * - MUST_PASS_ONE means OR boolean operation + */ +enum TFilterListOperator { + MUST_PASS_ALL = 0, + MUST_PASS_ONE = 1 +} + +/** +* Represents a server side filter list +* +*/ +struct TFilterList { + 1: required TFilterListOperator operator, + 2: required list filters +} + +/** * Represents a single cell and its value. */ struct TColumnValue { @@ -90,7 +119,7 @@ * If you specify a time range and a timestamp the range is ignored. * Timestamps on TColumns are ignored. * - * TODO: Filter, Locks + * TODO: Locks */ struct TGet { 1: required binary row, @@ -100,6 +129,8 @@ 4: optional TTimeRange timeRange, 5: optional i32 maxVersions, + + 6: optional TFilterList filters } /** @@ -174,6 +205,7 @@ 4: optional i32 caching, 5: optional i32 maxVersions=1, 6: optional TTimeRange timeRange, + 7: optional TFilterList filters } // @@ -373,7 +405,11 @@ /** the scan object to get a Scanner for */ 2: required TScan scan, - ) throws (1: TIOError io) + ) throws ( + 1: TIOError io, + /** if the filters configuration is invalid */ + 2: TIllegalArgument ia + ) /** * Grabs multiple rows from a Scanner.