Details
-
Sub-task
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
None
-
None
-
None
Description
Improve the usability of filters by making them specifiable or executable using a little query language.
For example:
col("entry:price") > 3 && (col("entry:name") = "ABC" || col("entry:name") = "XYZ")
Can be implemented as a little language compiler that takes filter specifications as input and builds the requisite hierarchy of filter API classes and actions as emitted java code.
Compiler can be a utility class, something like:
Scan scan = new Scan(); scan.addFamily(Bytes.toBytes("entry")); // ... scan.setFilter(Filter.compile("col(\"entry:price\") > 3 && (col(\"entry:name\") = \"ABC\" || col(\"entry:name\") = \"XYZ\"")); // ...
or even something like
Scan scan = Filter.compileScan("col(\"entry:price\") > 3 && (col(\"entry:name\") = \"ABC\" || col(\"entry:name\") = \"XYZ\"")); // ...
Can also be implemented using JRuby snippets sent to the regionserver for execution, but this has troublesome security implications.
Attachments
Issue Links
- is related to
-
HBASE-2396 Coprocessors: Server side dynamic scripting language execution
- Closed
-
HBASE-1696 [stargate] support specification of filters for scanners
- Closed