ACCUMULO-1537 Fix maven dependency problems on hadoop-test
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0793476d Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0793476d Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0793476d Branch: refs/heads/ACCUMULO-1000 Commit: 0793476d28c34c8ae725a9fea38af1569831813c Parents: 8513b55 Author: Christopher Tubbs <[email protected]> Authored: Fri Jul 19 16:57:09 2013 -0400 Committer: Christopher Tubbs <[email protected]> Committed: Fri Jul 19 18:54:45 2013 -0400 ---------------------------------------------------------------------- minicluster/pom.xml | 10 ++++------ .../apache/accumulo/minicluster/MiniAccumuloCluster.java | 10 +++++----- pom.xml | 5 +++++ test/pom.xml | 6 ------ 4 files changed, 14 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0793476d/minicluster/pom.xml ---------------------------------------------------------------------- diff --git a/minicluster/pom.xml b/minicluster/pom.xml index 3d1063b..d7c8778 100644 --- a/minicluster/pom.xml +++ b/minicluster/pom.xml @@ -46,6 +46,10 @@ <artifactId>accumulo-start</artifactId> </dependency> <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-test</artifactId> + </dependency> + <dependency> <groupId>commons-configuration</groupId> <artifactId>commons-configuration</artifactId> <scope>provided</scope> @@ -76,12 +80,6 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-test</artifactId> - <version>${hadoop.version}</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/accumulo/blob/0793476d/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java ---------------------------------------------------------------------- diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java index 7c00cec..4f9ff89 100644 --- a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java +++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java @@ -182,7 +182,7 @@ public class MiniAccumuloCluster { List<String> jvmOpts = new ArrayList<String>(); jvmOpts.add("-Xmx" + config.getMemory(serverType)); - + if (config.isJDWPEnabled()) { Integer port = PortUtils.getRandomFreePort(); jvmOpts.addAll(buildRemoteDebugParams(port)); @@ -232,13 +232,13 @@ public class MiniAccumuloCluster { miniDFS = new MiniDFSCluster(conf, 1, true, null); miniDFS.waitClusterUp(); InetSocketAddress dfsAddress = miniDFS.getNameNode().getNameNodeAddress(); - String uri = "hdfs://"+ dfsAddress.getHostName() + ":" + dfsAddress.getPort(); + String uri = "hdfs://" + dfsAddress.getHostName() + ":" + dfsAddress.getPort(); File coreFile = new File(config.getConfDir(), "core-site.xml"); writeConfig(coreFile, Collections.singletonMap("fs.default.name", uri)); File hdfsFile = new File(config.getConfDir(), "hdfs-site.xml"); writeConfig(hdfsFile, Collections.singletonMap("dfs.support.append", "true")); - Map<String, String> siteConfig = config.getSiteConfig(); + Map<String,String> siteConfig = config.getSiteConfig(); siteConfig.put(Property.INSTANCE_DFS_URI.getKey(), uri); siteConfig.put(Property.INSTANCE_DFS_DIR.getKey(), "/accumulo"); config.setSiteConfig(siteConfig); @@ -283,7 +283,7 @@ public class MiniAccumuloCluster { } } - private void writeConfig(File file, Map<String, String> settings) throws IOException { + private void writeConfig(File file, Map<String,String> settings) throws IOException { FileWriter fileWriter = new FileWriter(file); fileWriter.append("<configuration>\n"); @@ -427,7 +427,7 @@ public class MiniAccumuloCluster { for (LogWriter lw : logWriters) { lw.flush(); } - + if (zooKeeperProcess != null) { zooKeeperProcess.destroy(); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/0793476d/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 6454ff3..8f67cbd 100644 --- a/pom.xml +++ b/pom.xml @@ -300,6 +300,11 @@ </dependency> <dependency> <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-test</artifactId> + <version>${hadoop.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-tools</artifactId> <version>${hadoop.version}</version> </dependency> http://git-wip-us.apache.org/repos/asf/accumulo/blob/0793476d/test/pom.xml ---------------------------------------------------------------------- diff --git a/test/pom.xml b/test/pom.xml index 2f89d7a..8343bb2 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -133,12 +133,6 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-test</artifactId> - <version>${hadoop.version}</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty</artifactId> <scope>test</scope>
