You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2013/08/21 21:03:42 UTC
git commit: ACCUMULO-1537 Remove warnings
Updated Branches:
refs/heads/master 2d36f885a -> a978b0b09
ACCUMULO-1537 Remove warnings
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a978b0b0
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a978b0b0
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a978b0b0
Branch: refs/heads/master
Commit: a978b0b094a96cca4ede9d0af2cb94dcb92185fe
Parents: 2d36f88
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Aug 21 15:03:20 2013 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Aug 21 15:03:20 2013 -0400
----------------------------------------------------------------------
.../security/crypto/CryptoModuleFactory.java | 19 +++++++++----------
.../apache/accumulo/test/functional/BulkIT.java | 7 +++----
.../accumulo/test/functional/SimpleMacIT.java | 11 +++--------
3 files changed, 15 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/a978b0b0/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModuleFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModuleFactory.java b/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModuleFactory.java
index 259c13d..547cb8c 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModuleFactory.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModuleFactory.java
@@ -48,7 +48,6 @@ public class CryptoModuleFactory {
return getCryptoModule(cryptoModuleClassname);
}
- @SuppressWarnings({"rawtypes"})
public static CryptoModule getCryptoModule(String cryptoModuleClassname) {
if (cryptoModuleClassname != null) {
@@ -57,7 +56,7 @@ public class CryptoModuleFactory {
if (cryptoModuleClassname == null || cryptoModuleClassname.equals("NullCryptoModule")) {
return new NullCryptoModule();
- }
+ }
CryptoModule cryptoModule = null;
synchronized (cryptoModulesCache) {
@@ -71,11 +70,11 @@ public class CryptoModuleFactory {
return cryptoModule;
}
-
+
@SuppressWarnings({"rawtypes"})
private static CryptoModule instantiateCryptoModule(String cryptoModuleClassname) {
log.debug(String.format("About to instantiate crypto module %s", cryptoModuleClassname));
-
+
CryptoModule cryptoModule = null;
Class cryptoModuleClazz = null;
try {
@@ -97,13 +96,13 @@ public class CryptoModuleFactory {
}
if (!implementsCryptoModule) {
- log.warn("Configured Accumulo crypto module \""+cryptoModuleClassname+"\" does not implement the CryptoModule interface. No encryption will be used.");
+ log.warn("Configured Accumulo crypto module \"" + cryptoModuleClassname + "\" does not implement the CryptoModule interface. No encryption will be used.");
return new NullCryptoModule();
} else {
try {
cryptoModule = (CryptoModule) cryptoModuleClazz.newInstance();
- log.debug("Successfully instantiated crypto module "+cryptoModuleClassname);
+ log.debug("Successfully instantiated crypto module " + cryptoModuleClassname);
} catch (InstantiationException e) {
log.warn(String.format("Got instantiation exception %s when instantiating crypto module \"%s\". No encryption will be used.", e.getCause().getClass()
@@ -140,18 +139,18 @@ public class CryptoModuleFactory {
if (secretKeyEncryptionStrategyCache.containsKey(className)) {
strategy = secretKeyEncryptionStrategyCache.get(className);
} else {
- strategy = instantiateSecreteKeyEncryptionStrategy(className);
+ strategy = instantiateSecreteKeyEncryptionStrategy(className);
secretKeyEncryptionStrategyCache.put(className, strategy);
}
}
return strategy;
}
-
+
@SuppressWarnings("rawtypes")
private static SecretKeyEncryptionStrategy instantiateSecreteKeyEncryptionStrategy(String className) {
- log.debug("About to instantiate secret key encryption strategy "+className);
+ log.debug("About to instantiate secret key encryption strategy " + className);
SecretKeyEncryptionStrategy strategy = null;
Class keyEncryptionStrategyClazz = null;
@@ -180,7 +179,7 @@ public class CryptoModuleFactory {
try {
strategy = (SecretKeyEncryptionStrategy) keyEncryptionStrategyClazz.newInstance();
- log.debug("Successfully instantiated secret key encryption strategy "+className);
+ log.debug("Successfully instantiated secret key encryption strategy " + className);
} catch (InstantiationException e) {
log.warn(String.format("Got instantiation exception %s when instantiating secret key encryption strategy \"%s\". No encryption will be used.", e
http://git-wip-us.apache.org/repos/asf/accumulo/blob/a978b0b0/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java
index a81bb0d..1ad3fe4 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java
@@ -37,7 +37,7 @@ public class BulkIT extends SimpleMacIT {
c.tableOperations().create(tableName);
FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
String base = "target/accumulo-maven-plugin";
- fs.delete(new Path(base + "/testrf"));
+ fs.delete(new Path(base + "/testrf"), true);
fs.mkdirs(new Path(base + "/testBulkFail"));
Opts opts = new Opts();
@@ -50,13 +50,13 @@ public class BulkIT extends SimpleMacIT {
for (int i = 0; i < COUNT; i++) {
opts.outputFile = base + String.format("/testrf/rf%02d", i);
opts.startRow = N * i;
- TestIngest.ingest(c, opts , BWOPTS);
+ TestIngest.ingest(c, opts, BWOPTS);
}
opts.outputFile = base + String.format("/testrf/rf%02d", N);
opts.startRow = N;
opts.rows = 1;
// create an rfile with one entry, there was a bug with this:
- TestIngest.ingest(c, opts , BWOPTS);
+ TestIngest.ingest(c, opts, BWOPTS);
c.tableOperations().importDirectory(tableName, base + "/testrf", base + "/testBulkFail", false);
VerifyIngest.Opts vopts = new VerifyIngest.Opts();
vopts.tableName = tableName;
@@ -71,5 +71,4 @@ public class BulkIT extends SimpleMacIT {
VerifyIngest.verifyIngest(c, vopts, SOPTS);
}
-
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/a978b0b0/test/src/test/java/org/apache/accumulo/test/functional/SimpleMacIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/SimpleMacIT.java b/test/src/test/java/org/apache/accumulo/test/functional/SimpleMacIT.java
index aa47a8a..4a37d82 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/SimpleMacIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/SimpleMacIT.java
@@ -16,9 +16,6 @@
*/
package org.apache.accumulo.test.functional;
-import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.metadata.MetadataTable;
-import org.apache.accumulo.core.metadata.RootTable;
import org.apache.accumulo.minicluster.MiniAccumuloCluster;
import org.apache.accumulo.minicluster.MiniAccumuloConfig;
import org.apache.log4j.Logger;
@@ -29,7 +26,7 @@ import org.junit.rules.TemporaryFolder;
public class SimpleMacIT extends AbstractMacIT {
public static final Logger log = Logger.getLogger(SimpleMacIT.class);
-
+
static private TemporaryFolder folder = new TemporaryFolder();
static private MiniAccumuloCluster cluster;
@@ -55,10 +52,8 @@ public class SimpleMacIT extends AbstractMacIT {
}
@After
- public void cleanUp() throws Exception {
- }
+ public void cleanUp() throws Exception {}
@AfterClass
- public static void tearDown() throws Exception {
- }
+ public static void tearDown() throws Exception {}
}