Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
VXQUERY-193: Minor clean up items after release.
Browse files Browse the repository at this point in the history
  • Loading branch information
prestoncarman committed May 25, 2016
1 parent fb0328d commit 26e9512
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 50 deletions.
2 changes: 1 addition & 1 deletion 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/).
Expand Down
66 changes: 44 additions & 22 deletions pom.xml
Expand Up @@ -527,33 +527,55 @@
</executions>
</plugin>
-->
<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>

Expand Down
4 changes: 2 additions & 2 deletions src/site/apt/development_eclipse_setup.apt
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion src/site/apt/user_installation.apt
Expand Up @@ -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

Expand Down

This file was deleted.

@@ -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
Expand Up @@ -29,10 +29,10 @@
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();
}
Expand All @@ -43,7 +43,6 @@ public void addItem(IValueReference p) throws IOException {
}

public void finish() throws IOException {
DataOutput out = mvs.getDataOutput();
if (slots.getSize() != 1) {
out.write(ValueTag.SEQUENCE_TAG);
int size = slots.getSize();
Expand Down
Expand Up @@ -28,16 +28,13 @@
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"));
Expand All @@ -58,7 +55,6 @@ public void startHDFS() throws IOException {
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");
Expand Down
Expand Up @@ -30,8 +30,6 @@
/**
* Class to sort the final test results.
*/

//TODO : Optimize for large files.
public class ResultFileSorter {

private final String path;
Expand All @@ -45,6 +43,7 @@ public ResultFileSorter(String path) throws FileNotFoundException {
* 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);
Expand All @@ -54,15 +53,17 @@ public void sortFile() {
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);
}
}

Expand All @@ -88,7 +89,6 @@ private void writeToFile(String[] text) throws FileNotFoundException {
if (LOGGER.isLoggable(Level.INFO)) {
LOGGER.log(Level.INFO, "Writing to file started.");
}

for (String s : text) {
writer.write(s + "\n");
}
Expand Down

0 comments on commit 26e9512

Please sign in to comment.