Repository: vxquery Updated Branches: refs/heads/master fb0328d16 -> 26e95121e
VXQUERY-193: Minor clean up items after release. Project: http://git-wip-us.apache.org/repos/asf/vxquery/repo Commit: http://git-wip-us.apache.org/repos/asf/vxquery/commit/26e95121 Tree: http://git-wip-us.apache.org/repos/asf/vxquery/tree/26e95121 Diff: http://git-wip-us.apache.org/repos/asf/vxquery/diff/26e95121 Branch: refs/heads/master Commit: 26e95121e59253d1daba84c4e1439dda376b96f6 Parents: fb0328d Author: Preston Carman <[email protected]> Authored: Tue May 24 17:43:14 2016 -0700 Committer: Preston Carman <[email protected]> Committed: Tue May 24 17:43:14 2016 -0700 ---------------------------------------------------------------------- NOTICE | 2 +- pom.xml | 66 +++++++++++++------- src/site/apt/development_eclipse_setup.apt | 4 +- src/site/apt/user_installation.apt | 2 +- .../other_systems/basex_scripts/.basex | 0 .../other_systems/basex_scripts/README | 9 --- .../other_systems/basex_scripts/README.md | 26 ++++++++ .../builders/sequence/SequenceBuilder.java | 5 +- .../java/org/apache/vxquery/xtest/MiniDFS.java | 8 +-- .../apache/vxquery/xtest/ResultFileSorter.java | 12 ++-- 10 files changed, 84 insertions(+), 50 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/vxquery/blob/26e95121/NOTICE ---------------------------------------------------------------------- diff --git a/NOTICE b/NOTICE index d105749..bf8485b 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Apache VXQuery -Copyright 2009-2015 The Apache Software Foundation +Copyright 2009-2016 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). http://git-wip-us.apache.org/repos/asf/vxquery/blob/26e95121/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 8f7100c..dd51adf 100644 --- a/pom.xml +++ b/pom.xml @@ -529,31 +529,53 @@ --> <plugin> <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-enforcer-plugin</artifactId> + <executions> + <execution> + <id>enforce-versions</id> + <goals> + <goal>enforce</goal> + </goals> + <configuration> + <rules> + <requireMavenVersion> + <version>3.2</version> + </requireMavenVersion> + <requireJavaVersion> + <version>1.8</version> + </requireJavaVersion> + </rules> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> </plugin> <plugin> - <groupId>com.google.code.maven-replacer-plugin</groupId> - <artifactId>replacer</artifactId> - <version>1.5.3</version> - <executions> - <execution> - <phase>prepare-package</phase> - <goals> - <goal>replace</goal> - </goals> - </execution> - </executions> - <configuration> - <ignoreMissingFile>true</ignoreMissingFile> - <file>vxquery-server/src/main/resources/conf/cluster.properties</file> - <outputFile> - vxquery-server/src/main/resources/conf/cluster.properties - </outputFile> - <regex>false</regex> - <token>$CONF_PATH$</token> - <value>${basedir}/vxquery-xtest/src/test/resources/hadoop/conf</value> - </configuration> - </plugin> + <groupId>com.google.code.maven-replacer-plugin</groupId> + <artifactId>replacer</artifactId> + <version>1.5.3</version> + <executions> + <execution> + <phase>prepare-package</phase> + <goals> + <goal>replace</goal> + </goals> + </execution> + </executions> + <configuration> + <ignoreMissingFile>true</ignoreMissingFile> + <file>vxquery-server/src/main/resources/conf/cluster.properties</file> + <outputFile> + vxquery-server/src/main/resources/conf/cluster.properties + </outputFile> + <regex>false</regex> + <token>$CONF_PATH$</token> + <value>${basedir}/vxquery-xtest/src/test/resources/hadoop/conf</value> + </configuration> + </plugin> </plugins> </build> http://git-wip-us.apache.org/repos/asf/vxquery/blob/26e95121/src/site/apt/development_eclipse_setup.apt ---------------------------------------------------------------------- diff --git a/src/site/apt/development_eclipse_setup.apt b/src/site/apt/development_eclipse_setup.apt index 19b5776..4e733dc 100644 --- a/src/site/apt/development_eclipse_setup.apt +++ b/src/site/apt/development_eclipse_setup.apt @@ -20,14 +20,14 @@ Eclipse Setup * Installation - * Install Java Development Kit (JDK) 1.7 or Later + * Install Java Development Kit (JDK) 1.8 or Later * Install Classic Eclipse Follow the instruction for eclipse on from {{{http://www.eclipse.org}www.eclipse.org}} for the "Classic" eclipse version. - * Install Apache Maven + * Install Apache Maven 3.2 or later * Install Maven Integration (m2e) http://git-wip-us.apache.org/repos/asf/vxquery/blob/26e95121/src/site/apt/user_installation.apt ---------------------------------------------------------------------- diff --git a/src/site/apt/user_installation.apt b/src/site/apt/user_installation.apt index 3005885..e559462 100644 --- a/src/site/apt/user_installation.apt +++ b/src/site/apt/user_installation.apt @@ -19,7 +19,7 @@ Installation * Apache VXQuery\x99 source archive (apache-vxquery-X.Y-source-release.zip) - * JDK >= 1.7 + * JDK >= 1.8 * Apache Maven >= 3.2 http://git-wip-us.apache.org/repos/asf/vxquery/blob/26e95121/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/.basex ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/.basex b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/.basex deleted file mode 100644 index e69de29..0000000 http://git-wip-us.apache.org/repos/asf/vxquery/blob/26e95121/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/README ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/README b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/README deleted file mode 100644 index 1b910db..0000000 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/README +++ /dev/null @@ -1,9 +0,0 @@ -BaseX local configuration options for the weather benchmark. -The options attempt to match the processing and output of VXQuery. - - -# Local Options -CHOP = false -DBPATH = /path/to/basex/BaseXData -REPOPATH = /path/to/basex/BaseXRepo -WEBPATH = /path/to/basex/BaseXWeb http://git-wip-us.apache.org/repos/asf/vxquery/blob/26e95121/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/README.md ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/README.md b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/README.md new file mode 100644 index 0000000..aed2654 --- /dev/null +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/README.md @@ -0,0 +1,26 @@ +<!-- + 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. +--> + +BaseX local configuration options for the weather benchmark. +The options attempt to match the processing and output of VXQuery. + + +# Local Options +CHOP = false +DBPATH = /path/to/basex/BaseXData +REPOPATH = /path/to/basex/BaseXRepo +WEBPATH = /path/to/basex/BaseXWeb http://git-wip-us.apache.org/repos/asf/vxquery/blob/26e95121/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/sequence/SequenceBuilder.java ---------------------------------------------------------------------- diff --git a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/sequence/SequenceBuilder.java b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/sequence/SequenceBuilder.java index fbea148..5cd31b1 100644 --- a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/sequence/SequenceBuilder.java +++ b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/sequence/SequenceBuilder.java @@ -29,10 +29,10 @@ import org.apache.vxquery.util.GrowableIntArray; public class SequenceBuilder implements IBuilder { private final GrowableIntArray slots = new GrowableIntArray(); private final ArrayBackedValueStorage dataArea = new ArrayBackedValueStorage(); - private IMutableValueStorage mvs; + private DataOutput out; public void reset(IMutableValueStorage mvs) { - this.mvs = mvs; + out = mvs.getDataOutput(); slots.clear(); dataArea.reset(); } @@ -43,7 +43,6 @@ public class SequenceBuilder implements IBuilder { } public void finish() throws IOException { - DataOutput out = mvs.getDataOutput(); if (slots.getSize() != 1) { out.write(ValueTag.SEQUENCE_TAG); int size = slots.getSize(); http://git-wip-us.apache.org/repos/asf/vxquery/blob/26e95121/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/MiniDFS.java ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/MiniDFS.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/MiniDFS.java index 0720baa..a675150 100644 --- a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/MiniDFS.java +++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/MiniDFS.java @@ -28,16 +28,13 @@ import org.apache.hadoop.mapred.JobConf; public class MiniDFS { private MiniDFSCluster dfsCluster; - - public void miniDFS() { - - } + private static final String PATH_TO_HADOOP_CONF = "src/test/resources/hadoop/conf"; + private static final String DATA_PATH = "src/test/resources/TestSources/ghcnd"; public void startHDFS() throws IOException { FileSystem lfs = FileSystem.getLocal(new Configuration()); JobConf conf = new JobConf(); - String PATH_TO_HADOOP_CONF = "src/test/resources/hadoop/conf"; conf.addResource(new Path(PATH_TO_HADOOP_CONF + "/core-site.xml")); conf.addResource(new Path(PATH_TO_HADOOP_CONF + "/mapred-site.xml")); conf.addResource(new Path(PATH_TO_HADOOP_CONF + "/hdfs-site.xml")); @@ -58,7 +55,6 @@ public class MiniDFS { dfsCluster = build.build(); FileSystem dfs = FileSystem.get(conf); - String DATA_PATH = "src/test/resources/TestSources/ghcnd"; Path src = new Path(DATA_PATH); dfs.mkdirs(new Path("/tmp")); Path dest = new Path("/tmp/vxquery-hdfs-test"); http://git-wip-us.apache.org/repos/asf/vxquery/blob/26e95121/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/ResultFileSorter.java ---------------------------------------------------------------------- diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/ResultFileSorter.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/ResultFileSorter.java index c048138..e17a524 100644 --- a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/ResultFileSorter.java +++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/ResultFileSorter.java @@ -30,8 +30,6 @@ import java.util.logging.Logger; /** * Class to sort the final test results. */ - -//TODO : Optimize for large files. public class ResultFileSorter { private final String path; @@ -45,6 +43,7 @@ public class ResultFileSorter { * The method to sort the test case results. */ public void sortFile() { + //TODO : Optimize for large files. File resultFile = new File(path); try { FileReader fileReader = new FileReader(resultFile); @@ -54,15 +53,17 @@ public class ResultFileSorter { while ((line = reader.readLine()) != null) { fullText.add(line); } + reader.close(); + fileReader.close(); if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, "Sorting....."); } Collections.sort(fullText, String.CASE_INSENSITIVE_ORDER); String[] sortedText = fullText.toArray(new String[fullText.size()]); - this.eraseFile(resultFile); - this.writeToFile(sortedText); + eraseFile(resultFile); + writeToFile(sortedText); } catch (IOException e) { - e.printStackTrace(); + LOGGER.log(Level.SEVERE, "Trouble with sorting the file: " + resultFile.getAbsolutePath(), e); } } @@ -88,7 +89,6 @@ public class ResultFileSorter { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, "Writing to file started."); } - for (String s : text) { writer.write(s + "\n"); }
