accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] ctubbsii closed pull request #629: Fix warnings from dependency updates
Date Thu, 06 Sep 2018 21:00:19 GMT
ctubbsii closed pull request #629: Fix warnings from dependency updates
URL: https://github.com/apache/accumulo/pull/629
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
index 4ee198426b..6ada3cb557 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
@@ -528,7 +528,6 @@ public boolean containsKey(String key) {
     return compositeConfig.containsKey(key);
   }
 
-  @SuppressWarnings("unchecked")
   public Iterator<String> getKeys() {
     return compositeConfig.getKeys();
   }
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/BulkSerialize.java b/core/src/main/java/org/apache/accumulo/core/client/impl/BulkSerialize.java
index e9dec5e1e6..cd8639080d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/BulkSerialize.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/BulkSerialize.java
@@ -132,7 +132,7 @@ private void setRenameMap(Map<String,String> renameMap) {
     }
 
     @Override
-    public void close() throws Exception {
+    public void close() throws IOException {
       reader.close();
     }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/client/sample/AbstractHashSampler.java
b/core/src/main/java/org/apache/accumulo/core/client/sample/AbstractHashSampler.java
index d046ebfa63..e6f9fcd0ce 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/sample/AbstractHashSampler.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/sample/AbstractHashSampler.java
@@ -86,13 +86,17 @@ public void init(SamplerConfiguration config) {
         hashFunction = Hashing.murmur3_32();
         break;
       case "md5":
-        hashFunction = Hashing.md5();
+        @SuppressWarnings("deprecation")
+        HashFunction deprecatedMd5 = Hashing.md5();
+        hashFunction = deprecatedMd5;
         break;
       case "sha1":
-        hashFunction = Hashing.sha1();
+        @SuppressWarnings("deprecation")
+        HashFunction deprecatedSha1 = Hashing.sha1();
+        hashFunction = deprecatedSha1;
         break;
       default:
-        throw new IllegalArgumentException("Uknown hahser " + hasherOpt);
+        throw new IllegalArgumentException("Unknown hahser " + hasherOpt);
     }
 
     modulus = Integer.parseInt(modulusOpt);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/summary/SummarizerConfiguration.java
b/core/src/main/java/org/apache/accumulo/core/client/summary/SummarizerConfiguration.java
index 7c396d1280..d72fd0fd0b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/summary/SummarizerConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/summary/SummarizerConfiguration.java
@@ -16,7 +16,8 @@
  */
 package org.apache.accumulo.core.client.summary;
 
-import java.nio.charset.StandardCharsets;
+import static java.nio.charset.StandardCharsets.UTF_8;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -52,10 +53,10 @@ private SummarizerConfiguration(String className, String configId, Map<String,St
       ArrayList<String> keys = new ArrayList<>(this.options.keySet());
       Collections.sort(keys);
       Hasher hasher = Hashing.murmur3_32().newHasher();
-      hasher.putString(className, StandardCharsets.UTF_8);
+      hasher.putString(className, UTF_8);
       for (String key : keys) {
-        hasher.putString(key, StandardCharsets.UTF_8);
-        hasher.putString(options.get(key), StandardCharsets.UTF_8);
+        hasher.putString(key, UTF_8);
+        hasher.putString(options.get(key), UTF_8);
       }
 
       this.configId = hasher.hash().toString();
diff --git a/core/src/main/java/org/apache/accumulo/core/data/Value.java b/core/src/main/java/org/apache/accumulo/core/data/Value.java
index 2e81e15c26..51767ea8b2 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/Value.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/Value.java
@@ -25,7 +25,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
 import java.util.List;
 
 import org.apache.hadoop.io.BytesWritable;
@@ -59,7 +58,7 @@ public Value() {
    * @since 1.8.0
    */
   public Value(CharSequence cs) {
-    this(cs.toString().getBytes(StandardCharsets.UTF_8));
+    this(cs.toString().getBytes(UTF_8));
   }
 
   /**
diff --git a/core/src/main/java/org/apache/accumulo/core/sample/impl/DataoutputHasher.java
b/core/src/main/java/org/apache/accumulo/core/sample/impl/DataoutputHasher.java
index 35a18e216b..185de807ca 100644
--- a/core/src/main/java/org/apache/accumulo/core/sample/impl/DataoutputHasher.java
+++ b/core/src/main/java/org/apache/accumulo/core/sample/impl/DataoutputHasher.java
@@ -17,9 +17,10 @@
 
 package org.apache.accumulo.core.sample.impl;
 
+import static java.nio.charset.StandardCharsets.UTF_8;
+
 import java.io.DataOutput;
 import java.io.IOException;
-import java.nio.charset.StandardCharsets;
 
 import com.google.common.hash.Hasher;
 
@@ -96,13 +97,13 @@ public void writeBytes(String s) throws IOException {
 
   @Override
   public void writeChars(String s) throws IOException {
-    hasher.putString(s, StandardCharsets.UTF_8);
+    hasher.putString(s, UTF_8);
 
   }
 
   @Override
   public void writeUTF(String s) throws IOException {
     hasher.putInt(s.length());
-    hasher.putBytes(s.getBytes(StandardCharsets.UTF_8));
+    hasher.putBytes(s.getBytes(UTF_8));
   }
 }
diff --git a/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoUtils.java
b/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoUtils.java
index 8cd6567b1a..8477ae5f01 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoUtils.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoUtils.java
@@ -26,13 +26,9 @@
 
 import org.apache.accumulo.core.spi.crypto.CryptoService.CryptoException;
 import org.apache.commons.io.IOUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class CryptoUtils {
 
-  private static final Logger log = LoggerFactory.getLogger(CryptoUtils.class);
-
   public static SecureRandom newSha1SecureRandom() {
     return newSecureRandom("SHA1PRNG", "SUN");
   }
diff --git a/core/src/main/java/org/apache/accumulo/core/summary/Gatherer.java b/core/src/main/java/org/apache/accumulo/core/summary/Gatherer.java
index f5aaee631a..928a922571 100644
--- a/core/src/main/java/org/apache/accumulo/core/summary/Gatherer.java
+++ b/core/src/main/java/org/apache/accumulo/core/summary/Gatherer.java
@@ -17,7 +17,8 @@
 
 package org.apache.accumulo.core.summary;
 
-import java.nio.charset.StandardCharsets;
+import static java.nio.charset.StandardCharsets.UTF_8;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -208,8 +209,7 @@ private TSummaryRequest getRequest() {
 
         // When no location, the approach below will consistently choose the same tserver
for the
         // same file (as long as the set of tservers is stable).
-        int idx = Math
-            .abs(Hashing.murmur3_32().hashString(entry.getKey(), StandardCharsets.UTF_8).asInt())
+        int idx = Math.abs(Hashing.murmur3_32().hashString(entry.getKey(), UTF_8).asInt())
             % tservers.size();
         location = tservers.get(idx);
       }
@@ -359,8 +359,7 @@ public ProcessedFiles get() {
     private synchronized void initiateProcessing(ProcessedFiles previousWork) {
       try {
         Predicate<String> fileSelector = file -> Math
-            .abs(Hashing.murmur3_32().hashString(file, StandardCharsets.UTF_8).asInt())
-            % modulus == remainder;
+            .abs(Hashing.murmur3_32().hashString(file, UTF_8).asInt()) % modulus == remainder;
         if (previousWork != null) {
           fileSelector = fileSelector.and(previousWork.failedFiles::contains);
         }
diff --git a/core/src/main/java/org/apache/accumulo/core/util/HostAndPort.java b/core/src/main/java/org/apache/accumulo/core/util/HostAndPort.java
index 43417f923f..f0b133ff7d 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/HostAndPort.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/HostAndPort.java
@@ -19,8 +19,6 @@
 
 import java.io.Serializable;
 
-import com.google.common.base.Strings;
-
 /**
  * This class was copied from Guava release 23.0 to replace the older Guava 14 version that
had been
  * used in Accumulo. It was annotated as Beta by Google, therefore unstable to use in a core
@@ -144,7 +142,7 @@ public static HostAndPort fromParts(String host, int port) {
    *           if nothing meaningful could be parsed.
    */
   public static HostAndPort fromString(String hostPortString) {
-    java.util.Objects.requireNonNull(hostPortString);
+    hostPortString = java.util.Objects.requireNonNull(hostPortString);
     String host;
     String portString = null;
     boolean hasBracketlessColons = false;
@@ -167,7 +165,7 @@ public static HostAndPort fromString(String hostPortString) {
     }
 
     int port = NO_PORT;
-    if (!Strings.isNullOrEmpty(portString)) {
+    if (portString != null && !portString.trim().isEmpty()) {
       // Try to parse the whole port string as a number.
       // JDK7 accepts leading plus signs. We don't want to.
       checkArgument(!portString.startsWith("+"), "Unparseable port number: %s", hostPortString);
diff --git a/core/src/main/spotbugs/exclude-filter.xml b/core/src/main/spotbugs/exclude-filter.xml
index 39025c9d12..5aa5421ff9 100644
--- a/core/src/main/spotbugs/exclude-filter.xml
+++ b/core/src/main/spotbugs/exclude-filter.xml
@@ -205,8 +205,4 @@
     <Class name="org.apache.accumulo.core.client.impl.ScannerOptionsTest" />
     <Bug code="NP" pattern="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS" />
   </Match>
-  <Match>
-    <Class name="org.apache.accumulo.core.util.HostAndPort" />
-    <Bug code="NP" pattern="NP_NULL_PARAM_DEREF" />
-  </Match>
 </FindBugsFilter>
diff --git a/core/src/test/java/org/apache/accumulo/core/conf/PropertyTypeTest.java b/core/src/test/java/org/apache/accumulo/core/conf/PropertyTypeTest.java
index e0bcecf627..44bf032781 100644
--- a/core/src/test/java/org/apache/accumulo/core/conf/PropertyTypeTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/conf/PropertyTypeTest.java
@@ -68,7 +68,7 @@ public void testToString() {
   public void testFullCoverage() {
     // This test checks the remainder of the methods in this class to ensure each property
type has
     // a corresponding test
-    Stream<String> types = Arrays.stream(PropertyType.values()).map(Enum::name);
+    Stream<String> types = Arrays.stream(PropertyType.values()).map(Enum<PropertyType>::name);
 
     List<String> typesTested = Arrays.stream(this.getClass().getMethods()).map(m ->
m.getName())
         .filter(m -> m.startsWith("testType")).map(m -> m.substring(8))
diff --git a/core/src/test/java/org/apache/accumulo/core/data/KeyBuilderTest.java b/core/src/test/java/org/apache/accumulo/core/data/KeyBuilderTest.java
index 5a3d613d66..51826994dc 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/KeyBuilderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/KeyBuilderTest.java
@@ -16,12 +16,11 @@
  */
 package org.apache.accumulo.core.data;
 
+import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertSame;
 
-import java.nio.charset.StandardCharsets;
-
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.hadoop.io.Text;
 import org.junit.Test;
@@ -29,10 +28,10 @@
 public class KeyBuilderTest {
 
   private static final byte EMPTY_BYTES[] = new byte[0];
-  byte[] rowBytes = "row".getBytes(StandardCharsets.UTF_8);
-  byte[] familyBytes = "family".getBytes(StandardCharsets.UTF_8);
-  byte[] qualifierBytes = "qualifier".getBytes(StandardCharsets.UTF_8);
-  byte[] visibilityBytes = "visibility".getBytes(StandardCharsets.UTF_8);
+  byte[] rowBytes = "row".getBytes(UTF_8);
+  byte[] familyBytes = "family".getBytes(UTF_8);
+  byte[] qualifierBytes = "qualifier".getBytes(UTF_8);
+  byte[] visibilityBytes = "visibility".getBytes(UTF_8);
   Text rowText = new Text(rowBytes);
   Text familyText = new Text(familyBytes);
   Text qualifierText = new Text(qualifierBytes);
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
index 9f69c8d477..95f01358f3 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
@@ -2050,7 +2050,7 @@ public void testSample() throws IOException {
       RFile.setSampleBufferSize(sampleBufferSize);
 
       for (int modulus : new int[] {19, 103, 1019}) {
-        Hasher dataHasher = Hashing.md5().newHasher();
+        Hasher dataHasher = Hashing.sha512().newHasher();
         List<Entry<Key,Value>> sampleData = new ArrayList<>();
 
         ConfigurationCopy sampleConf = new ConfigurationCopy(
@@ -2115,7 +2115,7 @@ public void testSample() throws IOException {
   }
 
   private HashCode hash(SortedKeyValueIterator<Key,Value> iter) throws IOException
{
-    Hasher dataHasher = Hashing.md5().newHasher();
+    Hasher dataHasher = Hashing.sha512().newHasher();
     iter.seek(new Range(), EMPTY_COL_FAMS, false);
     while (iter.hasTop()) {
       hash(dataHasher, iter.getTopKey(), iter.getTopValue());
diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
index fe47737ff5..d676af57a7 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
@@ -373,7 +373,7 @@ static boolean same(FileSystem fs1, Path dir, FileSystem fs2, Path newDir)
 
   private static String hash(FileSystem fs, Path dir, String name) throws IOException {
     try (FSDataInputStream in = fs.open(new Path(dir, name))) {
-      return DigestUtils.sha256Hex(in);
+      return DigestUtils.sha512Hex(in);
     }
 
   }
diff --git a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
index 374c07d753..7c55ea9ea6 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
@@ -197,6 +197,7 @@ public void testStartServerUsedPort() throws Exception {
     ((ConfigurationCopy) factory.getSystemConfiguration()).set(Property.TSERV_CLIENTPORT,
         Integer.toString(port));
     try (ServerSocket s = new ServerSocket(port, 50, addr)) {
+      assertNotNull(s);
       startServer();
     }
   }
@@ -211,6 +212,7 @@ public void testStartServerUsedPortWithSearch() throws Exception {
         Integer.toString(port[0]));
     ((ConfigurationCopy) factory.getSystemConfiguration()).set(Property.TSERV_PORTSEARCH,
"true");
     try (ServerSocket s = new ServerSocket(port[0], 50, addr)) {
+      assertNotNull(s);
       ServerAddress address = startServer();
       assertNotNull(address);
       server = address.getServer();
@@ -255,6 +257,7 @@ public void testStartServerPortRangeFirstPortUsed() throws Exception {
     ((ConfigurationCopy) factory.getSystemConfiguration()).set(Property.TSERV_CLIENTPORT,
         portRange);
     try (ServerSocket s = new ServerSocket(port[0], 50, addr)) {
+      assertNotNull(s);
       ServerAddress address = startServer();
       assertNotNull(address);
       server = address.getServer();
diff --git a/server/master/src/main/java/org/apache/accumulo/master/MasterTime.java b/server/master/src/main/java/org/apache/accumulo/master/MasterTime.java
index 240670cdf2..37cc73987c 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/MasterTime.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/MasterTime.java
@@ -16,12 +16,12 @@
  */
 package org.apache.accumulo.master;
 
+import static java.nio.charset.StandardCharsets.UTF_8;
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static java.util.concurrent.TimeUnit.NANOSECONDS;
 import static java.util.concurrent.TimeUnit.SECONDS;
 
 import java.io.IOException;
-import java.nio.charset.StandardCharsets;
 import java.util.Timer;
 import java.util.TimerTask;
 
@@ -54,9 +54,8 @@ public MasterTime(Master master) throws IOException {
     this.master = master;
 
     try {
-      zk.putPersistentData(zPath, "0".getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.SKIP);
-      skewAmount = Long.parseLong(new String(zk.getData(zPath, null), StandardCharsets.UTF_8))
-          - System.nanoTime();
+      zk.putPersistentData(zPath, "0".getBytes(UTF_8), NodeExistsPolicy.SKIP);
+      skewAmount = Long.parseLong(new String(zk.getData(zPath, null), UTF_8)) - System.nanoTime();
     } catch (Exception ex) {
       throw new IOException("Error updating master time", ex);
     }
@@ -88,7 +87,7 @@ public void run() {
       case INITIAL:
       case STOP:
         try {
-          long zkTime = Long.parseLong(new String(zk.getData(zPath, null), StandardCharsets.UTF_8));
+          long zkTime = Long.parseLong(new String(zk.getData(zPath, null), UTF_8));
           synchronized (this) {
             skewAmount = zkTime - System.nanoTime();
           }
@@ -105,8 +104,7 @@ public void run() {
       case UNLOAD_METADATA_TABLETS:
       case UNLOAD_ROOT_TABLET:
         try {
-          zk.putPersistentData(zPath,
-              Long.toString(System.nanoTime() + skewAmount).getBytes(StandardCharsets.UTF_8),
+          zk.putPersistentData(zPath, Long.toString(System.nanoTime() + skewAmount).getBytes(UTF_8),
               NodeExistsPolicy.OVERWRITE);
         } catch (Exception ex) {
           if (log.isDebugEnabled()) {
diff --git a/shell/src/main/java/org/apache/accumulo/shell/Shell.java b/shell/src/main/java/org/apache/accumulo/shell/Shell.java
index dc5709ca5b..28716743f2 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/Shell.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/Shell.java
@@ -159,8 +159,8 @@
 import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
 import org.apache.accumulo.start.classloader.vfs.ContextManager;
 import org.apache.accumulo.start.spi.KeywordExecutable;
-import org.apache.commons.cli.BasicParser;
 import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.DefaultParser;
 import org.apache.commons.cli.HelpFormatter;
 import org.apache.commons.cli.MissingOptionException;
 import org.apache.commons.cli.Option;
@@ -733,7 +733,7 @@ public void execCommand(String input, boolean ignoreAuthTimeout, boolean
echoPro
         Options parseOpts = sc.getOptionsWithHelp();
 
         // Parse the string using the given options
-        CommandLine cl = new BasicParser().parse(parseOpts, fields);
+        CommandLine cl = new DefaultParser().parse(parseOpts, fields);
 
         int actualArgLen = cl.getArgs().length;
         int expectedArgLen = sc.numArgs();
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/ShellPluginConfigurationCommand.java
b/shell/src/main/java/org/apache/accumulo/shell/commands/ShellPluginConfigurationCommand.java
index ac3a959648..00f03025cc 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/ShellPluginConfigurationCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/ShellPluginConfigurationCommand.java
@@ -26,8 +26,8 @@
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.shell.Shell;
 import org.apache.accumulo.shell.Shell.Command;
-import org.apache.commons.cli.BasicParser;
 import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.DefaultParser;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.OptionGroup;
 import org.apache.commons.cli.Options;
@@ -114,7 +114,7 @@ protected void removePlugin(final CommandLine cl, final Shell shellState,
final
           o.addOption(OptUtil.tableOpt());
           args[0] = "-t";
           args[1] = tableName;
-          CommandLine cl = new BasicParser().parse(o, args);
+          CommandLine cl = new DefaultParser().parse(o, args);
           pluginClazz = shellState.getClassLoader(cl, shellState).loadClass(ent.getValue())
               .asSubclass(clazz);
         } catch (ClassNotFoundException e) {
diff --git a/shell/src/test/java/org/apache/accumulo/shell/ShellUtilTest.java b/shell/src/test/java/org/apache/accumulo/shell/ShellUtilTest.java
index 9b15956900..bf16ea4262 100644
--- a/shell/src/test/java/org/apache/accumulo/shell/ShellUtilTest.java
+++ b/shell/src/test/java/org/apache/accumulo/shell/ShellUtilTest.java
@@ -48,7 +48,7 @@
   @Test
   public void testWithoutDecode() throws IOException {
     File testFile = new File(folder.getRoot(), "testFileNoDecode.txt");
-    FileUtils.writeStringToFile(testFile, FILEDATA);
+    FileUtils.writeStringToFile(testFile, FILEDATA, UTF_8);
     List<Text> output = ShellUtil.scanFile(testFile.getAbsolutePath(), false);
     assertEquals(ImmutableList.of(new Text("line1"), new Text("line2")), output);
   }
@@ -56,7 +56,7 @@ public void testWithoutDecode() throws IOException {
   @Test
   public void testWithDecode() throws IOException {
     File testFile = new File(folder.getRoot(), "testFileWithDecode.txt");
-    FileUtils.writeStringToFile(testFile, B64_FILEDATA);
+    FileUtils.writeStringToFile(testFile, B64_FILEDATA, UTF_8);
     List<Text> output = ShellUtil.scanFile(testFile.getAbsolutePath(), true);
     assertEquals(ImmutableList.of(new Text("line1"), new Text("line2")), output);
   }
diff --git a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
index 3a98ad4d7c..805ea533c1 100644
--- a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
@@ -2174,7 +2174,6 @@ public void testCreateTableWithLocalityGroupsBadArguments() throws IOException
{
     ts.exec("createtable " + table + " -l locg1", false);
     ts.exec("createtable " + table + " group=fam1", false);
     ts.exec("createtable " + table + "-l fam1,fam2", false);
-    ts.exec("createtable " + table + " -local locg1=fam1,fam2", false);
   }
 
   @Test


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message