Package org.apache.hadoop.mapred.join
Class Parser
java.lang.Object
org.apache.hadoop.mapred.join.Parser
Very simple shift-reduce parser for join expressions.
This should be sufficient for the user extension permitted now, but ought to
be replaced with a parser generator if more complex grammars are supported.
In particular, this "shift-reduce" parser has no states. Each set
of formals requires a different internal node type, which is responsible for
interpreting the list of tokens it receives. This is sufficient for the
current grammar, but it has several annoying properties that might inhibit
extension. In particular, parenthesis are always function calls; an
algebraic or filter grammar would not only require a node type, but must
also work around the internals of this parser.
For most other cases, adding classes to the hierarchy- particularly by
extending JoinRecordReader and MultiFilterRecordReader- is fairly
straightforward. One need only override the relevant method(s) (usually only
CompositeRecordReader.combine(java.lang.Object[], org.apache.hadoop.mapred.join.TupleWritable)) and include a property to map its
value to an identifier in the parser.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classTagged-union type for tokens from the join expression.static enum -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Parser
public Parser()
-