Filters
Describes the use of filters with MapR CLI commands.
Some MapR CLI commands use filters, which let you specify large numbers of nodes or volumes by matching specified values in specified fields rather than by typing each name explicitly.
Filters use the following format:
[<field><operator>"<value>"]<and>[<field><operator>"<value>"] ...
field |
Field on which to filter. The field depends on the command with which the filter is used. |
operator |
An operator for that field:
|
value |
Value on which to filter. Wildcards (using |
You can use the wildcard (*
) for partial matches. For example, you can
display all volumes whose owner is root
and whose name begins with
test
as follows:
maprcli volume list -filter [n=="test*"]and[on=="root"]
If you are using the
<
, >
, <=
, or >=
symbols in the filter expression, ensure that you enclose the expression in single or double
quotes. For example, -filter '[quota>=1234]'
or -filter
"[quota>=1234]"