accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [4/4] accumulo git commit: ACCUMULO-3871 Fix issues causing build failures
Date Tue, 16 Jun 2015 20:14:23 GMT
ACCUMULO-3871 Fix issues causing build failures

* Fix remaining outstanding findbugs problems
* Fix minor compiler warning in build output
* Remove dependency-reduced pom from shade plugin


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

Branch: refs/heads/master
Commit: f73e793995eef5c1ac21217268b9eeb9961f488d
Parents: 59f51ba
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Tue Jun 16 15:37:41 2015 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Tue Jun 16 15:37:41 2015 -0400

----------------------------------------------------------------------
 mrit/.gitignore                                   |  1 -
 mrit/pom.xml                                      |  1 +
 mrit/src/main/findbugs/exclude-filter.xml         | 18 ++++++++++++++++++
 .../accumulo/test/UserCompactionStrategyIT.java   |  3 +--
 .../accumulo/test/functional/ClassLoaderIT.java   |  8 ++++----
 .../accumulo/test/proxy/SimpleProxyBase.java      |  2 +-
 6 files changed, 25 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/f73e7939/mrit/.gitignore
----------------------------------------------------------------------
diff --git a/mrit/.gitignore b/mrit/.gitignore
index db98860..56204d2 100644
--- a/mrit/.gitignore
+++ b/mrit/.gitignore
@@ -15,7 +15,6 @@
 
 # Maven ignores
 /target/
-/dependency-reduced-pom.xml
 
 # IDE ignores
 /.settings/

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f73e7939/mrit/pom.xml
----------------------------------------------------------------------
diff --git a/mrit/pom.xml b/mrit/pom.xml
index 0c1dc07..8bc50f4 100644
--- a/mrit/pom.xml
+++ b/mrit/pom.xml
@@ -62,6 +62,7 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-shade-plugin</artifactId>
         <configuration>
+          <createDependencyReducedPom>false</createDependencyReducedPom>
           <filters>
             <filter>
               <artifact>*:*</artifact>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f73e7939/mrit/src/main/findbugs/exclude-filter.xml
----------------------------------------------------------------------
diff --git a/mrit/src/main/findbugs/exclude-filter.xml b/mrit/src/main/findbugs/exclude-filter.xml
new file mode 100644
index 0000000..c801230
--- /dev/null
+++ b/mrit/src/main/findbugs/exclude-filter.xml
@@ -0,0 +1,18 @@
+<!--
+  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.
+-->
+<FindBugsFilter>
+</FindBugsFilter>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f73e7939/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java b/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java
index 588a83b..845842b 100644
--- a/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java
@@ -133,8 +133,7 @@ public class UserCompactionStrategyIT extends AccumuloClusterHarness {
     final Connector c = getConnector();
     final String tableName = getUniqueNames(1)[0];
     File target = new File(System.getProperty("user.dir"), "target");
-    target.mkdirs();
-    Assert.assertTrue(target.exists() && target.isDirectory());
+    Assert.assertTrue(target.mkdirs() || target.isDirectory());
     File destFile = installJar(target, "/TestCompactionStrat.jar");
     c.tableOperations().create(tableName);
     c.instanceOperations().setProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() +
"context1", destFile.toString());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f73e7939/test/src/main/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ClassLoaderIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
index ebb0950..acbb699 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
@@ -67,9 +67,9 @@ public class ClassLoaderIT extends AccumuloClusterHarness {
     rootPath = mac.getConfig().getDir().getAbsolutePath();
   }
 
-  private static void copyStreamToFileSystem(FileSystem fs, InputStream stream, Path path)
throws IOException {
+  private static void copyStreamToFileSystem(FileSystem fs, String jarName, Path path) throws
IOException {
     byte[] buffer = new byte[10 * 1024];
-    try (FSDataOutputStream dest = fs.create(path); InputStream closeMe = stream) {
+    try (FSDataOutputStream dest = fs.create(path); InputStream stream = ClassLoaderIT.class.getResourceAsStream(jarName))
{
       while (true) {
         int n = stream.read(buffer, 0, buffer.length);
         if (n <= 0) {
@@ -93,7 +93,7 @@ public class ClassLoaderIT extends AccumuloClusterHarness {
     scanCheck(c, tableName, "Test");
     FileSystem fs = getCluster().getFileSystem();
     Path jarPath = new Path(rootPath + "/lib/ext/Test.jar");
-    copyStreamToFileSystem(fs, this.getClass().getResourceAsStream("/TestCombinerX.jar"),
jarPath);
+    copyStreamToFileSystem(fs, "/TestCombinerX.jar", jarPath);
     UtilWaitThread.sleep(1000);
     IteratorSetting is = new IteratorSetting(10, "TestCombiner", "org.apache.accumulo.test.functional.TestCombiner");
     Combiner.setColumns(is, Collections.singletonList(new IteratorSetting.Column("cf")));
@@ -101,7 +101,7 @@ public class ClassLoaderIT extends AccumuloClusterHarness {
     UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
     scanCheck(c, tableName, "TestX");
     fs.delete(jarPath, true);
-    copyStreamToFileSystem(fs, this.getClass().getResourceAsStream("/TestCombinerY.jar"),
jarPath);
+    copyStreamToFileSystem(fs, "/TestCombinerY.jar", jarPath);
     UtilWaitThread.sleep(5000);
     scanCheck(c, tableName, "TestY");
     fs.delete(jarPath, true);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f73e7939/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java b/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
index fc79abd..c5656d1 100644
--- a/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
+++ b/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
@@ -2248,7 +2248,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase
{
     File jarDir = new File(System.getProperty("user.dir"), "target");
     assertTrue(jarDir.mkdirs() || jarDir.isDirectory());
     File jarFile = new File(jarDir, "TestCompactionStrat.jar");
-    FileUtils.copyInputStreamToFile(this.getClass().getResourceAsStream("/TestCompactionStrat.jar"),
jarFile);
+    FileUtils.copyInputStreamToFile(Class.class.getResourceAsStream("/TestCompactionStrat.jar"),
jarFile);
     client.setProperty(creds, Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "context1",
jarFile.toString());
     client.setTableProperty(creds, table, Property.TABLE_CLASSPATH.getKey(), "context1");
 


Mime
View raw message