merge with upstream master

Project: http://git-wip-us.apache.org/repos/asf/vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/vxquery/commit/b4bb8490
Tree: http://git-wip-us.apache.org/repos/asf/vxquery/tree/b4bb8490
Diff: http://git-wip-us.apache.org/repos/asf/vxquery/diff/b4bb8490

Branch: refs/heads/steven/hdfs
Commit: b4bb84900258cd8d03b7f566017142b924b72e29
Parents: 45c3843 7fc0d93
Author: efikalti <[email protected]>
Authored: Tue Aug 18 18:22:15 2015 +0300
Committer: efikalti <[email protected]>
Committed: Tue Aug 18 18:22:15 2015 +0300

----------------------------------------------------------------------
 doap.rdf                                        |    4 +-
 src/site/apt/cluster_installation.apt           |  149 -
 src/site/apt/development_contribution.apt       |  122 +
 src/site/apt/development_site_update.apt        |   80 +
 src/site/apt/development_xml_document.apt       |  607 ++
 src/site/apt/development_xml_node_details.apt   |   36 +-
 src/site/apt/user_cluster_installation.apt      |  149 +
 src/site/site.xml                               |   17 +-
 .../src/main/resources/exrt/README.md           |   29 +
 .../src/main/resources/exrt/queries/q01.xq      |   31 +
 .../src/main/resources/exrt/queries/q02.xq      |   27 +
 .../src/main/resources/exrt/queries/q03.xq      |   47 +
 .../src/main/resources/exrt/queries/q04.xq      |  118 +
 .../exrt/queries/q04_without_reconstruction.xq  |   21 +
 .../src/main/resources/exrt/queries/q05.xq      |   23 +
 .../src/main/resources/exrt/queries/q06.xq      |   22 +
 .../src/main/resources/exrt/queries/q07.xq      |   22 +
 .../src/main/resources/exrt/queries/q08.xq      |   25 +
 .../src/main/resources/exrt/queries/q09.xq      |   25 +
 .../other_systems/mrql_scripts/clear.sh         |   24 -
 .../other_systems/mrql_scripts/clear_hadoop.sh  |   24 +
 .../other_systems/mrql_scripts/clear_hadoop2.sh |   22 +
 .../mrql_scripts/run_group_test.sh              |   36 +-
 .../mrql_scripts/run_mrql_tests.sh              |    7 +-
 .../src/main/resources/xmark/README.md          |   41 +
 .../xmark/data/categories/micro_categories.xml  |   68 +
 .../xmark/data/catgraph/micro_catgraph.xml      |   24 +
 .../closed_auctions/micro_closed_auctions.xml   |  188 +
 .../data/open_auctions/micro_open_auctions.xml  |  154 +
 .../xmark/data/people/micro_people.xml          |   31 +
 .../xmark/data/regions/micro_regions.xml        |  394 ++
 .../src/main/resources/xmark/queries/q01.xq     |   23 +
 .../src/main/resources/xmark/queries/q02.xq     |   22 +
 .../src/main/resources/xmark/queries/q03.xq     |   26 +
 .../src/main/resources/xmark/queries/q04.xq     |   26 +
 .../src/main/resources/xmark/queries/q05.xq     |   25 +
 .../src/main/resources/xmark/queries/q06.xq     |   22 +
 .../src/main/resources/xmark/queries/q07.xq     |   22 +
 .../src/main/resources/xmark/queries/q08.xq     |   28 +
 .../src/main/resources/xmark/queries/q09.xq     |   33 +
 .../src/main/resources/xmark/queries/q10.xq     |   46 +
 .../src/main/resources/xmark/queries/q11.xq     |   27 +
 .../src/main/resources/xmark/queries/q12.xq     |   28 +
 .../src/main/resources/xmark/queries/q13.xq     |   22 +
 .../src/main/resources/xmark/queries/q14.xq     |   23 +
 .../src/main/resources/xmark/queries/q15.xq     |   29 +
 .../src/main/resources/xmark/queries/q16.xq     |   30 +
 .../src/main/resources/xmark/queries/q17.xq     |   23 +
 .../src/main/resources/xmark/queries/q18.xq     |   28 +
 .../src/main/resources/xmark/queries/q19.xq     |   24 +
 .../src/main/resources/xmark/queries/q20.xq     |   58 +
 .../java/org/apache/vxquery/cli/VXQuery.java    |  144 +-
 .../compiler/rewriter/RewriteRuleset.java       |   51 +-
 .../rules/ConsolidateDescandantChild.java       |  104 +
 .../rewriter/rules/ConsolidateUnnestsRule.java  |   79 +-
 .../rules/ConvertAssignToUnnestRule.java        |   31 +-
 .../ConvertFromAlgebricksExpressionsRule.java   |  103 +-
 .../ConvertToAlgebricksExpressionsRule.java     |  117 +-
 .../rules/InlineNestedVariablesRule.java        |   97 -
 .../rules/ReplaceSourceMapInDocExpression.java  |  168 +
 .../ExtractFunctionsFromJoinConditionRule.java  |  141 +
 .../InlineNestedVariablesRule.java              |   97 +
 ...oveFreeVariableOperatorOutOfSubplanRule.java |  178 +
 .../rewriter/rules/util/ExpressionToolbox.java  |   34 +-
 .../vxquery/context/StaticContextImpl.java      |    5 +-
 .../accessors/nodes/AbstractNodePointable.java  |   29 +
 .../accessors/nodes/AttributeNodePointable.java |   12 +-
 .../accessors/nodes/DocumentNodePointable.java  |   12 +-
 .../accessors/nodes/ElementNodePointable.java   |    5 +-
 .../accessors/nodes/PINodePointable.java        |   12 +-
 .../nodes/TextOrCommentNodePointable.java       |   13 +-
 .../vxquery/functions/builtin-operators.xml     |   14 +-
 .../metadata/VXQueryMetadataProvider.java       |    4 +
 ...GeneralComparisonScalarEvaluatorFactory.java |   12 +-
 .../IfThenElseScalarEvaluatorFactory.java       |   37 +-
 .../AbstractNodePositionalCheckEvaluator.java   |   58 +
 .../ElementNodeConstructorScalarEvaluator.java  |  115 +-
 .../functions/node/OpNodeAfterEvaluator.java    |   33 +
 .../node/OpNodeAfterEvaluatorFactory.java       |   41 +
 .../functions/node/OpNodeBeforeEvaluator.java   |   33 +
 .../node/OpNodeBeforeEvaluatorFactory.java      |   41 +
 .../step/DescendantOrSelfPathStepUnnesting.java |   33 +-
 .../strings/FnStringScalarEvaluatorFactory.java |   14 +-
 .../vxquery/serializer/XMLSerializer.java       |    9 +-
 .../vxquery/xmlparser/SAXContentHandler.java    |   20 +-
 .../query/VXQueryCompilationListener.java       |  115 +
 .../xmlquery/query/XMLQueryCompiler.java        |   10 +-
 .../xmlquery/translator/XMLQueryTranslator.java |   66 +-
 vxquery-xtest/pom.xml                           |  384 +-
 vxquery-xtest/results/xqts.txt                  | 1628 ++---
 .../vxquery/xtest/AbstractTestCaseFactory.java  |    7 +
 .../org/apache/vxquery/xtest/TestRunner.java    |   26 +-
 .../org/apache/vxquery/xtest/XTestOptions.java  |   46 +-
 .../vxquery/xtest/AbstractXQueryTest.java       |   78 +
 .../org/apache/vxquery/xtest/VXQueryTest.java   |   77 +-
 .../apache/vxquery/xtest/VXQueryXMarkTest.java  |   55 +
 .../org/apache/vxquery/xtest/XMarkTest.java     |   56 +
 .../java/org/apache/vxquery/xtest/XQTSTest.java |   56 +
 .../ExpectedTestResults/Simple/fn_doc.txt       |    1 +
 .../ExpectedTestResults/XMark/Modified/q01.txt  |    1 +
 .../ExpectedTestResults/XMark/Modified/q02.txt  |   25 +
 .../ExpectedTestResults/XMark/Modified/q03.txt  |    8 +
 .../ExpectedTestResults/XMark/Modified/q04.txt  |    1 +
 .../ExpectedTestResults/XMark/Modified/q05.txt  |    1 +
 .../ExpectedTestResults/XMark/Modified/q06.txt  |    1 +
 .../ExpectedTestResults/XMark/Modified/q07.txt  |    1 +
 .../ExpectedTestResults/XMark/Modified/q08.txt  |   53 +
 .../ExpectedTestResults/XMark/Modified/q09.txt  |   83 +
 .../ExpectedTestResults/XMark/Modified/q10.txt  |  440 ++
 .../ExpectedTestResults/XMark/Modified/q11.txt  |   53 +
 .../ExpectedTestResults/XMark/Modified/q12.txt  |   12 +
 .../ExpectedTestResults/XMark/Modified/q13.txt  |   55 +
 .../ExpectedTestResults/XMark/Modified/q14.txt  |    1 +
 .../ExpectedTestResults/XMark/Modified/q15.txt  |    3 +
 .../ExpectedTestResults/XMark/Modified/q16.txt  |    1 +
 .../ExpectedTestResults/XMark/Modified/q17.txt  |   27 +
 .../ExpectedTestResults/XMark/Modified/q18.txt  |    1 +
 .../ExpectedTestResults/XMark/Modified/q19.txt  |   44 +
 .../ExpectedTestResults/XMark/Modified/q20.txt  |    6 +
 .../ExpectedTestResults/XMark/Original/q01.txt  |    1 +
 .../ExpectedTestResults/XMark/Original/q02.txt  |   25 +
 .../ExpectedTestResults/XMark/Original/q03.txt  |    8 +
 .../ExpectedTestResults/XMark/Original/q04.txt  |    1 +
 .../ExpectedTestResults/XMark/Original/q05.txt  |    1 +
 .../ExpectedTestResults/XMark/Original/q06.txt  |    1 +
 .../ExpectedTestResults/XMark/Original/q07.txt  |    1 +
 .../ExpectedTestResults/XMark/Original/q08.txt  |   53 +
 .../ExpectedTestResults/XMark/Original/q09.txt  |   83 +
 .../ExpectedTestResults/XMark/Original/q10.txt  |  440 ++
 .../ExpectedTestResults/XMark/Original/q11.txt  |   53 +
 .../ExpectedTestResults/XMark/Original/q12.txt  |   12 +
 .../ExpectedTestResults/XMark/Original/q13.txt  |   55 +
 .../ExpectedTestResults/XMark/Original/q14.txt  |    1 +
 .../ExpectedTestResults/XMark/Original/q15.txt  |    3 +
 .../ExpectedTestResults/XMark/Original/q16.txt  |    1 +
 .../ExpectedTestResults/XMark/Original/q17.txt  |   27 +
 .../ExpectedTestResults/XMark/Original/q18.txt  |    1 +
 .../ExpectedTestResults/XMark/Original/q19.txt  |   44 +
 .../ExpectedTestResults/XMark/Original/q20.txt  |    6 +
 .../XMark/Original/simple_query1.txt            |    1 +
 .../XMark/Original/simple_query2.txt            |    4 +
 .../Queries/XQuery/Ghcnd/Partition-1/q01.xq     |    2 +-
 .../Queries/XQuery/Ghcnd/Partition-2/q01.xq     |    2 +-
 .../Queries/XQuery/Ghcnd/Partition-4/q01.xq     |    2 +-
 .../resources/Queries/XQuery/Simple/fn_doc.xq   |   19 +
 .../Queries/XQuery/XMark/Modified/q01.xq        |   23 +
 .../Queries/XQuery/XMark/Modified/q02.xq        |   22 +
 .../Queries/XQuery/XMark/Modified/q03.xq        |   26 +
 .../Queries/XQuery/XMark/Modified/q04.xq        |   26 +
 .../Queries/XQuery/XMark/Modified/q05.xq        |   25 +
 .../Queries/XQuery/XMark/Modified/q06.xq        |   22 +
 .../Queries/XQuery/XMark/Modified/q07.xq        |   22 +
 .../Queries/XQuery/XMark/Modified/q08.xq        |   28 +
 .../Queries/XQuery/XMark/Modified/q09.xq        |   33 +
 .../Queries/XQuery/XMark/Modified/q10.xq        |   46 +
 .../Queries/XQuery/XMark/Modified/q11.xq        |   27 +
 .../Queries/XQuery/XMark/Modified/q12.xq        |   28 +
 .../Queries/XQuery/XMark/Modified/q13.xq        |   22 +
 .../Queries/XQuery/XMark/Modified/q14.xq        |   23 +
 .../Queries/XQuery/XMark/Modified/q15.xq        |   29 +
 .../Queries/XQuery/XMark/Modified/q16.xq        |   30 +
 .../Queries/XQuery/XMark/Modified/q17.xq        |   23 +
 .../Queries/XQuery/XMark/Modified/q18.xq        |   28 +
 .../Queries/XQuery/XMark/Modified/q19.xq        |   24 +
 .../Queries/XQuery/XMark/Modified/q20.xq        |   58 +
 .../Queries/XQuery/XMark/Original/q01.xq        |   27 +
 .../Queries/XQuery/XMark/Original/q02.xq        |   22 +
 .../Queries/XQuery/XMark/Original/q03.xq        |   26 +
 .../Queries/XQuery/XMark/Original/q04.xq        |   27 +
 .../Queries/XQuery/XMark/Original/q05.xq        |   25 +
 .../Queries/XQuery/XMark/Original/q06.xq        |   21 +
 .../Queries/XQuery/XMark/Original/q07.xq        |   23 +
 .../Queries/XQuery/XMark/Original/q08.xq        |   26 +
 .../Queries/XQuery/XMark/Original/q09.xq        |   31 +
 .../Queries/XQuery/XMark/Original/q10.xq        |   46 +
 .../Queries/XQuery/XMark/Original/q11.xq        |   26 +
 .../Queries/XQuery/XMark/Original/q12.xq        |   27 +
 .../Queries/XQuery/XMark/Original/q13.xq        |   22 +
 .../Queries/XQuery/XMark/Original/q14.xq        |   23 +
 .../Queries/XQuery/XMark/Original/q15.xq        |   30 +
 .../Queries/XQuery/XMark/Original/q16.xq        |   30 +
 .../Queries/XQuery/XMark/Original/q17.xq        |   23 +
 .../Queries/XQuery/XMark/Original/q18.xq        |   28 +
 .../Queries/XQuery/XMark/Original/q19.xq        |   24 +
 .../Queries/XQuery/XMark/Original/q20.xq        |   45 +
 .../TestSources/XMark/SingleFile/auction.xml    | 5760 ++++++++++++++++++
 .../SplitFiles/categories/micro_categories.xml  |   56 +
 .../SplitFiles/catgraph/micro_catgraph.xml      |   23 +
 .../closed_auctions/micro_closed_auctions.xml   | 1192 ++++
 .../open_auctions/micro_open_auctions.xml       | 1944 ++++++
 .../XMark/SplitFiles/people/micro_people.xml    |  855 +++
 .../XMark/SplitFiles/regions/micro_regions.xml  | 2365 +++++++
 .../src/test/resources/VXQueryCatalog.xml       |   19 +-
 .../resources/VXQuerySingleAlternateCatalog.xml |    3 +-
 .../src/test/resources/VXQuerySingleCatalog.xml |    2 +-
 .../src/test/resources/VXQueryXMarkCatalog.xml  |   77 +
 .../src/test/resources/XMarkCatalog.xml         |   61 +
 .../FunctionsAndOperatorsOnNumericsQueries.xml  |    2 +-
 ...nctionsAndOperatorsThatGenerateSequences.xml |   28 +
 .../resources/cat/GhcndPartition2Queries.xml    |    2 +-
 .../cat/GhcndRecordsPartition2Queries.xml       |    5 +
 .../cat/GhcndRecordsPartition4Queries.xml       |    5 +
 .../test/resources/cat/SingleAlternateQuery.xml |    2 +-
 .../src/test/resources/cat/SingleQuery.xml      |    2 -
 .../test/resources/cat/XMarkOriginalQueries.xml |  123 +
 .../src/test/resources/cat/XMarkQueries.xml     |  123 +
 206 files changed, 21307 insertions(+), 1756 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/vxquery/blob/b4bb8490/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
----------------------------------------------------------------------
diff --cc 
vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
index 1affeed,c3d0358..1afdead
--- 
a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
+++ 
b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
@@@ -116,8 -128,10 +129,11 @@@ public class RewriteRuleset 
          normalization.add(new SetCollectionDataSourceRule());
          normalization.add(new IntroduceCollectionRule());
          normalization.add(new RemoveUnusedAssignAndAggregateRule());
 +        normalization.add(new CollectionWithTagRule());
  
+         normalization.add(new ConsolidateDescandantChild());
+ 
+         normalization.add(new ReplaceSourceMapInDocExpression());
          // Adds child steps to the data source scan.
          // TODO Replace consolidate with a new child function that takes 
multiple paths.
          //        normalization.add(new ConsolidateUnnestsRule());

http://git-wip-us.apache.org/repos/asf/vxquery/blob/b4bb8490/vxquery-xtest/pom.xml
----------------------------------------------------------------------
diff --cc vxquery-xtest/pom.xml
index 44a4f67,9e83fd7..fa7cac2
--- a/vxquery-xtest/pom.xml
+++ b/vxquery-xtest/pom.xml
@@@ -1,214 -1,213 +1,228 @@@
- <!-- Licensed to the Apache Software Foundation (ASF) under one or more 
contributor 
-       license agreements. See the NOTICE file distributed with this work for 
additional 
-       information regarding copyright ownership. The ASF licenses this file 
to 
-       You under the Apache License, Version 2.0 (the "License"); you may not 
use 
-       this file except in compliance with the License. You may obtain a copy 
of 
-       the License at http://www.apache.org/licenses/LICENSE-2.0 Unless 
required 
-       by applicable law or agreed to in writing, software distributed under 
the 
-       License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 
CONDITIONS 
-       OF ANY KIND, either express or implied. See the License for the 
specific 
-       language governing permissions and limitations under the License. -->
- <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
-       <modelVersion>4.0.0</modelVersion>
- 
-       <parent>
-               <groupId>org.apache.vxquery</groupId>
-               <artifactId>apache-vxquery</artifactId>
-               <version>0.6-SNAPSHOT</version>
-       </parent>
- 
-       <artifactId>apache-vxquery-xtest</artifactId>
-       <packaging>jar</packaging>
-       <name>VXQuery XTest</name>
-       <description>Apache VXQuery Test Driver</description>
- 
-       <distributionManagement>
-               <site>
-                       <id>vxquery.website</id>
-                       <name>VXQuery Website</name>
-                       <url>file:../site/vxquery-xtest/</url>
-               </site>
-       </distributionManagement>
- 
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.codehaus.mojo</groupId>
-                               
<artifactId>appassembler-maven-plugin</artifactId>
-                               <version>1.3</version>
-                               <executions>
-                                       <execution>
-                                               <configuration>
-                                                       <programs>
-                                                               <program>
-                                                                       
<mainClass>org.apache.vxquery.xtest.Main</mainClass>
-                                                                       
<name>xtest</name>
-                                                               </program>
-                                                               <program>
-                                                                       
<mainClass>org.apache.vxquery.xtest.util.DiskPerformance</mainClass>
-                                                                       
<name>diskperformance</name>
-                                                               </program>
-                                                       </programs>
-                                                       
<repositoryLayout>flat</repositoryLayout>
-                                                       
<repositoryName>lib</repositoryName>
-                                               </configuration>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       <goal>assemble</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <artifactId>maven-resources-plugin</artifactId>
-                               <executions>
-                                       <execution>
-                                               <id>copy-xtest-scripts</id>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       
<goal>copy-resources</goal>
-                                               </goals>
-                                               <configuration>
-                                                       
<outputDirectory>target/appassembler/bin</outputDirectory>
-                                                       <resources>
-                                                               <resource>
-                                                                       
<directory>src/main/resources/scripts</directory>
-                                                               </resource>
-                                                       </resources>
-                                               </configuration>
-                                       </execution>
-                                       <execution>
-                                               <id>copy-xtest-conf</id>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       
<goal>copy-resources</goal>
-                                               </goals>
-                                               <configuration>
-                                                       
<outputDirectory>target/appassembler/conf</outputDirectory>
-                                                       <resources>
-                                                               <resource>
-                                                                       
<directory>src/main/resources/conf</directory>
-                                                               </resource>
-                                                       </resources>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <artifactId>maven-antrun-plugin</artifactId>
-                               <executions>
-                                       <execution>
-                                               <id>generate-site</id>
-                                               <phase>none</phase>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-surefire-plugin</artifactId>
-                               <configuration>
-                                       <!-- 
<argLine>-agentpath:"${yourkit.home}/bin/mac/libyjpagent.jnilib=sampling"</argLine>
 -->
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
- 
-       <dependencies>
-               <dependency>
-                       <groupId>org.apache.vxquery</groupId>
-                       <artifactId>apache-vxquery-core</artifactId>
-                       <version>0.6-SNAPSHOT</version>
-               </dependency>
+ <!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
  
-               <dependency>
-                       <groupId>edu.uci.ics.hyracks</groupId>
-                       <artifactId>hyracks-api</artifactId>
-               </dependency>
+       http://www.apache.org/licenses/LICENSE-2.0
  
-               <dependency>
-                       <groupId>edu.uci.ics.hyracks</groupId>
-                       <artifactId>hyracks-client</artifactId>
-               </dependency>
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ -->
+ <project
+     xmlns="http://maven.apache.org/POM/4.0.0";
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+     <modelVersion>4.0.0</modelVersion>
  
-               <dependency>
-                       <groupId>edu.uci.ics.hyracks</groupId>
-                       <artifactId>hyracks-control-cc</artifactId>
-               </dependency>
+     <parent>
+         <groupId>org.apache.vxquery</groupId>
+         <artifactId>apache-vxquery</artifactId>
+         <version>0.6-SNAPSHOT</version>
+     </parent>
  
-               <dependency>
-                       <groupId>edu.uci.ics.hyracks</groupId>
-                       <artifactId>hyracks-control-nc</artifactId>
-               </dependency>
+     <artifactId>apache-vxquery-xtest</artifactId>
+     <packaging>jar</packaging>
+     <name>VXQuery XTest</name>
+     <description>Apache VXQuery Test Driver</description>
  
-               <dependency>
-                       <groupId>edu.uci.ics.hyracks</groupId>
-                       <artifactId>hyracks-dataflow-std</artifactId>
-               </dependency>
+     <distributionManagement>
+         <site>
+             <id>vxquery.website</id>
+             <name>VXQuery Website</name>
+             <url>file:../site/vxquery-xtest/</url>
+         </site>
+     </distributionManagement>
+ 
+     <build>
+         <plugins>
+             <plugin>
+                 <groupId>org.codehaus.mojo</groupId>
+                 <artifactId>appassembler-maven-plugin</artifactId>
+                 <version>1.3</version>
+                 <executions>
+                     <execution>
+                         <configuration>
+                             <programs>
+                                 <program>
+                                     
<mainClass>org.apache.vxquery.xtest.Main</mainClass>
+                                     <name>xtest</name>
+                                 </program>
+                                 <program>
+                                     
<mainClass>org.apache.vxquery.xtest.util.DiskPerformance</mainClass>
+                                     <name>diskperformance</name>
+                                 </program>
+                             </programs>
+                             <repositoryLayout>flat</repositoryLayout>
+                             <repositoryName>lib</repositoryName>
+                         </configuration>
+                         <phase>package</phase>
+                         <goals>
+                             <goal>assemble</goal>
+                         </goals>
+                     </execution>
+                 </executions>
+             </plugin>
+             <plugin>
+                 <artifactId>maven-resources-plugin</artifactId>
+                 <executions>
+                     <execution>
+                         <id>copy-xtest-scripts</id>
+                         <phase>package</phase>
+                         <goals>
+                             <goal>copy-resources</goal>
+                         </goals>
+                         <configuration>
+                             
<outputDirectory>target/appassembler/bin</outputDirectory>
+                             <resources>
+                                 <resource>
+                                     
<directory>src/main/resources/scripts</directory>
+                                 </resource>
+                             </resources>
+                         </configuration>
+                     </execution>
+                     <execution>
+                         <id>copy-xtest-conf</id>
+                         <phase>package</phase>
+                         <goals>
+                             <goal>copy-resources</goal>
+                         </goals>
+                         <configuration>
+                             
<outputDirectory>target/appassembler/conf</outputDirectory>
+                             <resources>
+                                 <resource>
+                                     
<directory>src/main/resources/conf</directory>
+                                 </resource>
+                             </resources>
+                         </configuration>
+                     </execution>
+                 </executions>
+             </plugin>
+             <plugin>
+                 <artifactId>maven-antrun-plugin</artifactId>
+                 <executions>
+                     <execution>
+                         <id>generate-site</id>
+                         <phase>none</phase>
+                     </execution>
+                 </executions>
+             </plugin>
+             <plugin>
+                 <groupId>org.apache.maven.plugins</groupId>
+                 <artifactId>maven-surefire-plugin</artifactId>
+                 <configuration>
+                      <!-- 
<argLine>-agentpath:"${yourkit.home}/bin/mac/libyjpagent.jnilib=sampling"</argLine>
 -->
+                     <excludes>
+                         <exclude>**/AbstractXQueryTest.java</exclude>
+                         <exclude>**/VXQueryXMarkTest.java</exclude>
+                         <exclude>**/XMarkTest.java</exclude>
+                         <exclude>**/XQTSTest.java</exclude>
+                     </excludes>
+                 </configuration>
+             </plugin>
+         </plugins>
+     </build>
+ 
+     <dependencies>
+         <dependency>
+             <groupId>org.apache.vxquery</groupId>
+             <artifactId>apache-vxquery-core</artifactId>
+             <version>0.6-SNAPSHOT</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>edu.uci.ics.hyracks</groupId>
+             <artifactId>hyracks-api</artifactId>
+         </dependency>
+ 
+         <dependency>
+             <groupId>edu.uci.ics.hyracks</groupId>
+             <artifactId>hyracks-client</artifactId>
+         </dependency>
+ 
+         <dependency>
+             <groupId>edu.uci.ics.hyracks</groupId>
+             <artifactId>hyracks-control-cc</artifactId>
+         </dependency>
+ 
+         <dependency>
+             <groupId>edu.uci.ics.hyracks</groupId>
+             <artifactId>hyracks-control-nc</artifactId>
+         </dependency>
+ 
+         <dependency>
+             <groupId>edu.uci.ics.hyracks</groupId>
+             <artifactId>hyracks-dataflow-std</artifactId>
+         </dependency>
  
 -        <dependency>
 -            <groupId>org.mortbay.jetty</groupId>
 -            <artifactId>jetty</artifactId>
 -            <scope>compile</scope>
 -        </dependency>
 -    </dependencies>
 +              <dependency>
 +                      <groupId>edu.uci.ics.hyracks</groupId>
 +                      <artifactId>hyracks-hdfs-2.x</artifactId>
 +              </dependency>
 +
 +              <dependency>
 +                      <groupId>commons-io</groupId>
 +                      <artifactId>commons-io</artifactId>
 +              </dependency>
 +
 +              <dependency>
 +                      <groupId>org.apache.hadoop</groupId>
 +                      <artifactId>hadoop-hdfs</artifactId>
 +              </dependency>
 +
 +              <dependency>
 +                      <groupId>org.mortbay.jetty</groupId>
 +                      <artifactId>jetty</artifactId>
 +                      <scope>compile</scope>
 +              </dependency>
 +      </dependencies>
  
-       <reporting>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               
<artifactId>maven-project-info-reports-plugin</artifactId>
-                               <reportSets>
-                                       <reportSet>
-                                               <reports>
-                                                       <report>index</report>
-                                                       
<report>dependencies</report>
-                                                       <report>plugins</report>
-                                               </reports>
-                                       </reportSet>
-                               </reportSets>
-                               <configuration>
-                                       <linkOnly>true</linkOnly>
-                                       
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.rat</groupId>
-                               <artifactId>apache-rat-plugin</artifactId>
-                               <version>${apache-rat-plugin.version}</version>
-                               <configuration>
-                                       <excludes>
-                                               
<exclude>**/ExpectedTestResults/**/*</exclude>
-                                               <exclude>**/xqts.txt</exclude>
-                                               
<exclude>test-suites/**/*</exclude>
-                                       </excludes>
-                                       
<numUnapprovedLicenses>0</numUnapprovedLicenses>
-                                       <maxmemory>2g</maxmemory>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-javadoc-plugin</artifactId>
-                               <configuration>
-                                       <notimestamp>true</notimestamp>
-                                       <maxmemory>2g</maxmemory>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </reporting>
+     <reporting>
+         <plugins>
+             <plugin>
+                 <groupId>org.apache.maven.plugins</groupId>
+                 <artifactId>maven-project-info-reports-plugin</artifactId>
+                 <reportSets>
+                     <reportSet>
+                         <reports>
+                             <report>index</report>
+                             <report>dependencies</report>
+                             <report>plugins</report>
+                         </reports>
+                     </reportSet>
+                 </reportSets>
+                 <configuration>
+                     <linkOnly>true</linkOnly>
+                     
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+                 </configuration>
+             </plugin>
+             <plugin>
+                 <groupId>org.apache.rat</groupId>
+                 <artifactId>apache-rat-plugin</artifactId>
+                 <version>${apache-rat-plugin.version}</version>
+                 <configuration>
+                     <excludes>
+                         <exclude>**/ExpectedTestResults/**/*</exclude>
+                         <exclude>**/xqts.txt</exclude>
+                         <exclude>test-suite*/**/*</exclude>
+                     </excludes>
+                     <numUnapprovedLicenses>0</numUnapprovedLicenses>
+                     <maxmemory>2g</maxmemory>
+                 </configuration>
+             </plugin>
+             <plugin>
+                 <groupId>org.apache.maven.plugins</groupId>
+                 <artifactId>maven-javadoc-plugin</artifactId>
+                 <configuration>
+                     <notimestamp>true</notimestamp>
+                     <maxmemory>2g</maxmemory>
+                 </configuration>
+             </plugin>
+         </plugins>
+     </reporting>
  </project>

http://git-wip-us.apache.org/repos/asf/vxquery/blob/b4bb8490/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/XTestOptions.java
----------------------------------------------------------------------
diff --cc vxquery-xtest/src/main/java/org/apache/vxquery/xtest/XTestOptions.java
index 5ae4ba4,80fdd65..42845a1
--- a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/XTestOptions.java
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/XTestOptions.java
@@@ -41,15 -44,36 +44,36 @@@ public class XTestOptions 
      @Option(name = "-v", required = false, usage = "Verbose")
      boolean verbose;
  
-     @Option(name = "-keepalive", required = false, usage = "Milliseconds to 
keep server alive after tests have completed")
+     @Option(name = "-keepalive", required = false, usage = "Milliseconds to 
keep server alive after tests have completed.")
      long keepalive;
  
-     @Option(name = "-textreport", required = false, usage = "Text Report 
output file")
+     @Option(name = "-textreport", required = false, usage = "Text report 
output file.")
      String diffable;
  
-     @Option(name = "-xmlreport", required = false, usage = "XML Report output 
file")
+     @Option(name = "-xmlreport", required = false, usage = "XML report output 
file.")
      String xmlReport;
  
-     @Option(name = "-htmlreport", required = false, usage = "HTML Report 
output file")
+     @Option(name = "-htmlreport", required = false, usage = "HTML report 
output file.")
      String htmlReport;
+ 
+     @Option(name = "-showquery", usage = "Show query string.")
+     boolean showQuery;
+ 
+     @Option(name = "-showast", usage = "Show abstract syntax tree.")
+     boolean showAST;
+ 
+     @Option(name = "-showtet", usage = "Show translated expression tree.")
+     boolean showTET;
+ 
+     @Option(name = "-showoet", usage = "Show optimized expression tree.")
+     boolean showOET;
+ 
+     @Option(name = "-showrp", usage = "Show runtime plan.")
+     boolean showRP;
+ 
+     @Option(name = "-compileonly", usage = "Compile the query and stop.")
+     boolean compileOnly;
+ 
+     @Option(name = "-showresult", usage = "Show query result.")
+     boolean showResult;
 -}
 +    }

http://git-wip-us.apache.org/repos/asf/vxquery/blob/b4bb8490/vxquery-xtest/src/test/java/org/apache/vxquery/xtest/VXQueryTest.java
----------------------------------------------------------------------
diff --cc vxquery-xtest/src/test/java/org/apache/vxquery/xtest/VXQueryTest.java
index c4e1273,3704d07..4d0ddc0
--- a/vxquery-xtest/src/test/java/org/apache/vxquery/xtest/VXQueryTest.java
+++ b/vxquery-xtest/src/test/java/org/apache/vxquery/xtest/VXQueryTest.java
@@@ -16,27 -16,16 +16,20 @@@
  */
  package org.apache.vxquery.xtest;
  
- import static org.junit.Assert.fail;
- 
  import java.io.File;
 +import java.io.IOException;
  import java.util.Collection;
  
  import org.apache.commons.lang3.StringUtils;
- import org.junit.After;
 +import org.junit.AfterClass;
- import org.junit.Before;
 +import org.junit.BeforeClass;
- import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.junit.runners.Parameterized;
  import org.junit.runners.Parameterized.Parameters;
  
  @RunWith(Parameterized.class)
- public class VXQueryTest {
-     private TestCase tc;
-     private TestRunner tr;
+ public class VXQueryTest extends AbstractXQueryTest {
 +    private static MiniDFS dfs;
  
      private static String VXQUERY_CATALOG = StringUtils.join(new String[] { 
"src", "test", "resources",
              "VXQueryCatalog.xml" }, File.separator);
@@@ -71,59 -41,15 +45,30 @@@
          return tests;
      }
  
-     public VXQueryTest(TestCase tc) throws Exception {
-         this.tc = tc;
-         tr = new TestRunner(getVXQueryOptions());
-     }
- 
-     @Before
-     public void beforeTest() throws Exception {
-         tr.open();
-     }
- 
-     @Test
-     public void test() throws Exception {
-         TestCaseResult result = tr.run(tc);
-         switch (result.state) {
-             case EXPECTED_ERROR_GOT_DIFFERENT_ERROR:
-             case EXPECTED_ERROR_GOT_FAILURE:
-             case EXPECTED_ERROR_GOT_RESULT:
-             case EXPECTED_RESULT_GOT_DIFFERENT_RESULT:
-             case EXPECTED_RESULT_GOT_ERROR:
-             case EXPECTED_RESULT_GOT_FAILURE:
-                 fail(result.state + " (" + result.time + " ms): " + 
result.testCase.getXQueryDisplayName());
-                 break;
-             case EXPECTED_ERROR_GOT_SAME_ERROR:
-             case EXPECTED_RESULT_GOT_SAME_RESULT:
-                 break;
-             case NO_RESULT_FILE:
-                 break;
-         }
+     public static XTestOptions getOptions() {
+         XTestOptions options = getDefaultTestOptions();
+         options.catalog = VXQUERY_CATALOG;
+         return options;
      }
  
-     @After
-     public void afterTest() throws Exception {
-         tr.close();
+     @Override
+     protected XTestOptions getTestOptions() {
+         return getOptions();
      }
  
 +    @BeforeClass
 +    public static void setupHDFS() {
 +        dfs = new MiniDFS();
 +        try {
 +            dfs.startHDFS();
 +        } catch (IOException e) {
 +            System.err.println(e);
 +        }
 +    }
 +
 +    @AfterClass
 +    public static void shutdownHDFS() {
 +        dfs.shutdownHDFS();
 +    }
 +
  }

http://git-wip-us.apache.org/repos/asf/vxquery/blob/b4bb8490/vxquery-xtest/src/test/resources/VXQueryCatalog.xml
----------------------------------------------------------------------
diff --cc vxquery-xtest/src/test/resources/VXQueryCatalog.xml
index 9691e6c,6f7acee..f75ce49
--- a/vxquery-xtest/src/test/resources/VXQueryCatalog.xml
+++ b/vxquery-xtest/src/test/resources/VXQueryCatalog.xml
@@@ -178,17 -193,4 +195,17 @@@
           &GhcndRecordsPartition4Queries;
        </test-group>
     </test-group>
 +   <test-group name="HDFSAggregateQueries" featureOwner="Efi Kaltirimidou">
 +      <GroupInfo>
 +         <title>Aggregate Partition Queries in HDFS</title>
 +         <description/>
 +      </GroupInfo>
 +      <test-group name="CollectionReadFromHDFSAggregateTests" 
featureOwner="Efi Kaltirimidou">
 +         <GroupInfo>
 +            <title>Aggregate HDFS Execution Tests</title>
 +            <description/>
 +         </GroupInfo>
 +        &HDFSAggregateQueries;
 +      </test-group>
 +   </test-group>
- </test-suite>
+ </test-suite>

Reply via email to