Database Reference
In-Depth Information
Query
Parser layer
Pig Latin parser
SPARQL parser
(…)
Logical plan generator/optimizer
Query analyzer
Pig Latin plan
generator
NTGA plan
generator
JOIN
TG_GroupBy
TG_Join
LOAD
SPLIT
STORE
TG_GroupFilter
LOAD
STORE
JOIN
Logical-to-physical plan translator
MapReduceJob compiler
Hadoop job tracker
FIGURE 6.8
Overall data flow and architecture of RAPID+.
parameters, the query analyzer routes the execution flow either into the Pig Latin/
NTGA logical plan generator. These generators compile the given SSE tree into the
logical plan with Pig Latin/NTGA operators. The Logical-to-Physical plan transla-
tor and Job Compiler are also extended to recognize NTGA operators and compile
the NTGA-based plan into the corresponding physical/MapReduce Plan. (Details
can be found in [7]).
6.6.2 sParQl Q uery C omPilation in raPiD+
RAPID+ follows similar query compile process to the one used in Pig.
Example 6.2: Query Compilation Process with NTGA Operators
Here, we specifically describe the case that executes a SPARQL query with
NTGA operators. We use the same example query with the two star patterns
( SJ 1 and SJ 2) shown in Section 6.3. Figure 6.9a-c show the translations from
the logical plan to the MapReduce one. Once the query is parsed into the
SSE tree by the SPARQL parser, the NTGA plan generator traverses the tree
and generates corresponding logical plan. The plan starts with the operator
LOTGLoadFilter corresponding to TG _ LoadFilter in NTGA. The opera-
tor LOTGGroupBy and LOTGGroupFilter are then connected, which corre-
spond to TG _ GroupBy and TG _ GroupFilter , respectively. To join the two
stars ( SJ 1 and SJ 2), the logical operator LOTGJoin is connected, which imple-
ments the operator TG _ Join . As a next step, the logical plan is compiled into
the physical one. In this process, a common theme is to coalesce operators
Search WWH ::




Custom Search