accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [2/4] git commit: ACCUMULO-2791 Downgrade commons-codec to match that provided by Hadoop.
Date Mon, 12 May 2014 17:51:22 GMT
ACCUMULO-2791 Downgrade commons-codec to match that provided by Hadoop.

* Povide a core.util Base64 class to enforce the non-chunked behavior we rely on
* Changed to use codec 1.4 'shaHex' method


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

Branch: refs/heads/master
Commit: a73cf8511020f552e90386d829a6dffb5a8a1cad
Parents: 484491d
Author: Sean Busbey <busbey@cloudera.com>
Authored: Fri May 9 11:50:07 2014 -0500
Committer: Sean Busbey <busbey@cloudera.com>
Committed: Fri May 9 16:44:14 2014 -0500

----------------------------------------------------------------------
 .../core/client/mapreduce/RangeInputSplit.java  |  2 +-
 .../mapreduce/lib/impl/ConfiguratorBase.java    |  2 +-
 .../mapreduce/lib/impl/InputConfigurator.java   | 12 ++--
 .../lib/partition/RangePartitioner.java         |  2 +-
 .../iterators/user/IntersectingIterator.java    |  6 +-
 .../accumulo/core/security/Authorizations.java  |  4 +-
 .../accumulo/core/security/Credentials.java     |  2 +-
 .../org/apache/accumulo/core/util/Base64.java   | 75 ++++++++++++++++++++
 .../apache/accumulo/core/util/CreateToken.java  |  2 +-
 .../org/apache/accumulo/core/util/Encoding.java |  9 +--
 .../util/shell/commands/AddSplitsCommand.java   |  2 +-
 .../util/shell/commands/CreateTableCommand.java |  2 +-
 .../util/shell/commands/GetSplitsCommand.java   |  6 +-
 .../core/util/shell/commands/HiddenCommand.java |  2 +-
 .../client/mapred/AccumuloInputFormatTest.java  |  4 +-
 .../mapreduce/AccumuloInputFormatTest.java      |  4 +-
 .../lib/impl/ConfiguratorBaseTest.java          |  2 +-
 .../examples/simple/mapreduce/RowHash.java      |  2 +-
 .../mapreduce/bulk/BulkIngestExample.java       |  4 +-
 pom.xml                                         |  2 +-
 .../apache/accumulo/server/fs/VolumeUtil.java   |  2 +-
 .../master/state/TabletStateChangeIterator.java |  4 +-
 .../server/security/SystemCredentials.java      |  2 +-
 .../accumulo/server/util/DumpZookeeper.java     |  4 +-
 .../accumulo/server/util/RestoreZookeeper.java  |  2 +-
 .../apache/accumulo/master/tableOps/Utils.java  |  6 +-
 .../monitor/servlets/TServersServlet.java       |  4 +-
 .../test/randomwalk/shard/BulkInsert.java       |  4 +-
 .../accumulo/test/functional/CredentialsIT.java |  2 +-
 29 files changed, 124 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
index 47b34e9..06f4081 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
@@ -42,8 +42,8 @@ import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.PartialKey;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.security.Authorizations;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.Pair;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.mapreduce.InputSplit;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
index 33ca5d2..e87d43b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
@@ -30,7 +30,7 @@ import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer;
 import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.util.ArgumentChecker;
-import org.apache.commons.codec.binary.Base64;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FileSystem;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
index 2fc606c..1ed23e3 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
@@ -60,9 +60,9 @@ import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.TablePermission;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.TextUtil;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.MapWritable;
 import org.apache.hadoop.io.Text;
@@ -176,7 +176,7 @@ public class InputConfigurator extends ConfiguratorBase {
       for (Range r : ranges) {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         r.write(new DataOutputStream(baos));
-        rangeStrings.add(new String(Base64.encodeBase64(baos.toByteArray())));
+        rangeStrings.add(Base64.encodeBase64String(baos.toByteArray()));
       }
       conf.setStrings(enumToConfKey(implementingClass, ScanOpts.RANGES), rangeStrings.toArray(new
String[0]));
     } catch (IOException ex) {
@@ -272,9 +272,9 @@ public class InputConfigurator extends ConfiguratorBase {
       if (column.getFirst() == null)
         throw new IllegalArgumentException("Column family can not be null");
 
-      String col = new String(Base64.encodeBase64(TextUtil.getBytes(column.getFirst())),
Constants.UTF8);
+      String col = Base64.encodeBase64String(TextUtil.getBytes(column.getFirst()));
       if (column.getSecond() != null)
-        col += ":" + new String(Base64.encodeBase64(TextUtil.getBytes(column.getSecond())),
Constants.UTF8);
+        col += ":" + Base64.encodeBase64String(TextUtil.getBytes(column.getSecond()));
       columnStrings.add(col);
     }
 
@@ -339,7 +339,7 @@ public class InputConfigurator extends ConfiguratorBase {
     String newIter;
     try {
       cfg.write(new DataOutputStream(baos));
-      newIter = new String(Base64.encodeBase64(baos.toByteArray()), Constants.UTF8);
+      newIter = Base64.encodeBase64String(baos.toByteArray());
       baos.close();
     } catch (IOException e) {
       throw new IllegalArgumentException("unable to serialize IteratorSetting");
@@ -536,7 +536,7 @@ public class InputConfigurator extends ConfiguratorBase {
     }
 
     String confKey = enumToConfKey(implementingClass, ScanOpts.TABLE_CONFIGS);
-    conf.set(confKey, new String(Base64.encodeBase64(baos.toByteArray())));
+    conf.set(confKey, Base64.encodeBase64String(baos.toByteArray()));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
index 54730ef..1541fae 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
@@ -28,7 +28,7 @@ import java.util.TreeSet;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.mapreduce.lib.impl.DistributedCacheHelper;
-import org.apache.commons.codec.binary.Base64;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.hadoop.conf.Configurable;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java
b/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java
index c219b5a..8ce0ca8 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java
@@ -31,8 +31,8 @@ import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.IteratorEnvironment;
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.TextUtil;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
 
@@ -391,7 +391,7 @@ public class IntersectingIterator implements SortedKeyValueIterator<Key,Value>
{
   protected static String encodeColumns(Text[] columns) {
     StringBuilder sb = new StringBuilder();
     for (int i = 0; i < columns.length; i++) {
-      sb.append(new String(Base64.encodeBase64(TextUtil.getBytes(columns[i])), Constants.UTF8));
+      sb.append(Base64.encodeBase64String(TextUtil.getBytes(columns[i])));
       sb.append('\n');
     }
     return sb.toString();
@@ -408,7 +408,7 @@ public class IntersectingIterator implements SortedKeyValueIterator<Key,Value>
{
       else
         bytes[i] = 0;
     }
-    return new String(Base64.encodeBase64(bytes), Constants.UTF8);
+    return Base64.encodeBase64String(bytes);
   }
   
   protected static Text[] decodeColumns(String columns) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/security/Authorizations.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/Authorizations.java b/core/src/main/java/org/apache/accumulo/core/security/Authorizations.java
index ab3ea68..1abe002 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/Authorizations.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/Authorizations.java
@@ -31,8 +31,8 @@ import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.data.ArrayByteSequence;
 import org.apache.accumulo.core.data.ByteSequence;
 import org.apache.accumulo.core.util.ArgumentChecker;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.ByteBufferUtil;
-import org.apache.commons.codec.binary.Base64;
 
 /**
  * A collection of authorization strings.
@@ -340,7 +340,7 @@ public class Authorizations implements Iterable<byte[]>, Serializable,
Authoriza
     for (byte[] auth : authsList) {
       sb.append(sep);
       sep = ",";
-      sb.append(new String(Base64.encodeBase64(auth), Constants.UTF8));
+      sb.append(Base64.encodeBase64String(auth));
     }
 
     return sb.toString();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/security/Credentials.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/Credentials.java b/core/src/main/java/org/apache/accumulo/core/security/Credentials.java
index 9f8b1be..582b4e0 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/Credentials.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/Credentials.java
@@ -26,7 +26,7 @@ import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer;
 import org.apache.accumulo.core.security.thrift.TCredentials;
-import org.apache.commons.codec.binary.Base64;
+import org.apache.accumulo.core.util.Base64;
 
 /**
  * A wrapper for internal use. This class carries the instance, principal, and authentication
token for use in the public API, in a non-serialized form. This is

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/util/Base64.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/Base64.java b/core/src/main/java/org/apache/accumulo/core/util/Base64.java
new file mode 100644
index 0000000..76de4ed
--- /dev/null
+++ b/core/src/main/java/org/apache/accumulo/core/util/Base64.java
@@ -0,0 +1,75 @@
+/*
+ * 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.
+ */
+package org.apache.accumulo.core.util;
+
+import org.apache.commons.codec.binary.StringUtils;
+
+/**
+ * A wrapper around commons-codec's Base64 to make sure we get the non-chunked behavior that
+ * became the default in commons-codec version 1.5+ while relying on the commons-codec version
1.4
+ * that Hadoop Client provides.
+ */
+public final class Base64 {
+
+  /**
+   * Private to prevent instantiation.
+   */
+  private Base64() {
+  }
+
+  /**
+   * Serialize to Base64 byte array, non-chunked.
+   */
+  public static byte[] encodeBase64(byte[] data) {
+    return org.apache.commons.codec.binary.Base64.encodeBase64(data, false);
+  }
+
+  /**
+   * Serialize to Base64 as a String, non-chunked.
+   */
+  public static String encodeBase64String(byte[] data) {
+    /* Based on implementation of this same name function in commons-codec 1.5+. in commons-codec
1.4, the second param sets chunking to true. */
+    return StringUtils.newStringUtf8(org.apache.commons.codec.binary.Base64.encodeBase64(data,
false));
+  }
+
+  /**
+   * Serialize to Base64 as a String using the URLSafe alphabet, non-chunked.
+   *
+   * The URLSafe alphabet uses - instead of + and _ instead of /.
+   */
+  public static String encodeBase64URLSafeString(byte[] data) {
+    return org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString(data);
+  }
+
+  /**
+   * Decode, presuming bytes are base64.
+   *
+   * Transparently handles either the standard alphabet or the URL Safe one.
+   */
+  public static byte[] decodeBase64(byte[] base64) {
+    return org.apache.commons.codec.binary.Base64.decodeBase64(base64);
+  }
+
+  /**
+   * Decode, presuming String is base64.
+   *
+   * Transparently handles either the standard alphabet or the URL Safe one.
+   */
+  public static byte[] decodeBase64(String base64String) {
+    return org.apache.commons.codec.binary.Base64.decodeBase64(base64String);
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java b/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java
index cc6762a..9f86db3 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java
@@ -32,7 +32,7 @@ import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.Authe
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.Properties;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.TokenProperty;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
-import org.apache.commons.codec.binary.Base64;
+import org.apache.accumulo.core.util.Base64;
 
 import com.beust.jcommander.Parameter;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/util/Encoding.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/Encoding.java b/core/src/main/java/org/apache/accumulo/core/util/Encoding.java
index 451d4d6..aff8f62 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/Encoding.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/Encoding.java
@@ -17,14 +17,13 @@
 package org.apache.accumulo.core.util;
 
 import org.apache.accumulo.core.Constants;
-import org.apache.commons.codec.binary.Base64;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.hadoop.io.Text;
 
 public class Encoding {
   
   public static String encodeAsBase64FileName(Text data) {
-    String encodedRow = new String(Base64.encodeBase64(TextUtil.getBytes(data)), Constants.UTF8);
-    encodedRow = encodedRow.replace('/', '_').replace('+', '-');
+    String encodedRow = Base64.encodeBase64URLSafeString(TextUtil.getBytes(data));
     
     int index = encodedRow.length() - 1;
     while (index >= 0 && encodedRow.charAt(index) == '=')
@@ -37,9 +36,7 @@ public class Encoding {
   public static byte[] decodeBase64FileName(String node) {
     while (node.length() % 4 != 0)
       node += "=";
-    
-    node = node.replace('_', '/').replace('-', '+');
-    
+    /* decode transparently handles URLSafe encodings */
     return Base64.decodeBase64(node.getBytes(Constants.UTF8));
   }
   

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java
index 6bd260c..f06a639 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java
@@ -21,13 +21,13 @@ import java.util.TreeSet;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.TableNotFoundException;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.shell.Shell;
 import org.apache.accumulo.core.util.shell.Shell.Command;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.MissingArgumentException;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.io.Text;
 
 public class AddSplitsCommand extends Command {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java
index 25b92be..d2c73f7 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java
@@ -35,6 +35,7 @@ import org.apache.accumulo.core.client.impl.Tables;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.iterators.IteratorUtil;
 import org.apache.accumulo.core.security.VisibilityConstraint;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.shell.Shell;
 import org.apache.accumulo.core.util.shell.Shell.Command;
 import org.apache.accumulo.core.util.shell.Token;
@@ -42,7 +43,6 @@ import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.OptionGroup;
 import org.apache.commons.cli.Options;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.io.Text;
 
 public class CreateTableCommand extends Command {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetSplitsCommand.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetSplitsCommand.java
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetSplitsCommand.java
index a27fa47..695d1a3 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetSplitsCommand.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/GetSplitsCommand.java
@@ -35,6 +35,7 @@ import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.RootTable;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
 import org.apache.accumulo.core.security.Authorizations;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.TextUtil;
 import org.apache.accumulo.core.util.format.BinaryFormatter;
 import org.apache.accumulo.core.util.shell.Shell;
@@ -45,7 +46,6 @@ import org.apache.accumulo.core.util.shell.Shell.PrintShell;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.io.Text;
 
 public class GetSplitsCommand extends Command {
@@ -104,7 +104,7 @@ public class GetSplitsCommand extends Command {
       return null;
     }
     BinaryFormatter.getlength(text.getLength());
-    return encode ? new String(Base64.encodeBase64(TextUtil.getBytes(text)), Constants.UTF8)
: BinaryFormatter.appendText(new StringBuilder(), text).toString();
+    return encode ? Base64.encodeBase64String(TextUtil.getBytes(text)) : BinaryFormatter.appendText(new
StringBuilder(), text).toString();
   }
   
   private static String obscuredTabletName(final KeyExtent extent) {
@@ -117,7 +117,7 @@ public class GetSplitsCommand extends Command {
     if (extent.getEndRow() != null && extent.getEndRow().getLength() > 0) {
       digester.update(extent.getEndRow().getBytes(), 0, extent.getEndRow().getLength());
     }
-    return new String(Base64.encodeBase64(digester.digest()), Constants.UTF8);
+    return Base64.encodeBase64String(digester.digest());
   }
   
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HiddenCommand.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HiddenCommand.java
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HiddenCommand.java
index c212c75..61f60f8 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HiddenCommand.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/HiddenCommand.java
@@ -20,12 +20,12 @@ import java.security.SecureRandom;
 import java.util.Random;
 
 import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.shell.Shell;
 import org.apache.accumulo.core.util.shell.Shell.Command;
 import org.apache.accumulo.core.util.shell.ShellCommandException;
 import org.apache.accumulo.core.util.shell.ShellCommandException.ErrorCode;
 import org.apache.commons.cli.CommandLine;
-import org.apache.commons.codec.binary.Base64;
 
 public class HiddenCommand extends Command {
   private static Random rand = new SecureRandom();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormatTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormatTest.java
b/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormatTest.java
index 13490e0..9e6958a 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormatTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormatTest.java
@@ -36,7 +36,7 @@ import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.user.RegExFilter;
 import org.apache.accumulo.core.iterators.user.WholeRowIterator;
-import org.apache.commons.codec.binary.Base64;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
 import org.apache.hadoop.io.Text;
@@ -80,7 +80,7 @@ public class AccumuloInputFormatTest {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     is.write(new DataOutputStream(baos));
     String iterators = job.get("AccumuloInputFormat.ScanOpts.Iterators");
-    assertEquals(new String(Base64.encodeBase64(baos.toByteArray())), iterators);
+    assertEquals(Base64.encodeBase64String(baos.toByteArray()), iterators);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
index 2500972..3844cd9 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
@@ -42,9 +42,9 @@ import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.user.RegExFilter;
 import org.apache.accumulo.core.iterators.user.WholeRowIterator;
 import org.apache.accumulo.core.security.Authorizations;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.util.Pair;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
 import org.apache.hadoop.io.Text;
@@ -77,7 +77,7 @@ public class AccumuloInputFormatTest {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     is.write(new DataOutputStream(baos));
     String iterators = conf.get("AccumuloInputFormat.ScanOpts.Iterators");
-    assertEquals(new String(Base64.encodeBase64(baos.toByteArray())), iterators);
+    assertEquals(Base64.encodeBase64String(baos.toByteArray()), iterators);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/core/src/test/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBaseTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBaseTest.java
b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBaseTest.java
index 1983470..d5ebb22 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBaseTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBaseTest.java
@@ -29,7 +29,7 @@ import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
-import org.apache.commons.codec.binary.Base64;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/RowHash.java
----------------------------------------------------------------------
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/RowHash.java
b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/RowHash.java
index 1fa9b8f..165b481 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/RowHash.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/RowHash.java
@@ -25,8 +25,8 @@ import org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.Pair;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
 import org.apache.hadoop.io.MD5Hash;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/BulkIngestExample.java
----------------------------------------------------------------------
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/BulkIngestExample.java
b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/BulkIngestExample.java
index 72bd7eb..6da51a3 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/BulkIngestExample.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/BulkIngestExample.java
@@ -27,9 +27,9 @@ import org.apache.accumulo.core.client.mapreduce.AccumuloFileOutputFormat;
 import org.apache.accumulo.core.client.mapreduce.lib.partition.RangePartitioner;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.TextUtil;
 import org.apache.accumulo.examples.simple.mapreduce.JobUtil;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
 import org.apache.hadoop.fs.FileSystem;
@@ -133,7 +133,7 @@ public class BulkIngestExample extends Configured implements Tool {
 
       Collection<Text> splits = connector.tableOperations().listSplits(opts.tableName,
100);
       for (Text split : splits)
-        out.println(new String(Base64.encodeBase64(TextUtil.getBytes(split))));
+        out.println(Base64.encodeBase64String(TextUtil.getBytes(split)));
 
       job.setNumReduceTasks(splits.size() + 1);
       out.close();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 96affb5..5e32a55 100644
--- a/pom.xml
+++ b/pom.xml
@@ -161,7 +161,7 @@
       <dependency>
         <groupId>commons-codec</groupId>
         <artifactId>commons-codec</artifactId>
-        <version>1.7</version>
+        <version>1.4</version>
       </dependency>
       <dependency>
         <groupId>commons-collections</groupId>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
----------------------------------------------------------------------
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 34abb01..436667c 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
@@ -336,7 +336,7 @@ public class VolumeUtil {
   private static String hash(FileSystem fs, Path dir, String name) throws IOException {
     FSDataInputStream in = fs.open(new Path(dir, name));
     try {
-      return DigestUtils.sha1Hex(in);
+      return DigestUtils.shaHex(in);
     } finally {
       in.close();
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
index 5749523..f4d5591 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
@@ -35,9 +35,9 @@ import org.apache.accumulo.core.iterators.IteratorEnvironment;
 import org.apache.accumulo.core.iterators.SkippingIterator;
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.util.AddressUtil;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.StringUtil;
 import org.apache.accumulo.server.master.state.TabletLocationState.BadLocationStateException;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.io.DataInputBuffer;
 import org.apache.hadoop.io.DataOutputBuffer;
 import org.apache.hadoop.io.Text;
@@ -182,7 +182,7 @@ public class TabletStateChangeIterator extends SkippingIterator {
     } catch (Exception ex) {
       throw new RuntimeException(ex);
     }
-    String encoded = new String(Base64.encodeBase64(Arrays.copyOf(buffer.getData(), buffer.getLength())),
Constants.UTF8);
+    String encoded = Base64.encodeBase64String(Arrays.copyOf(buffer.getData(), buffer.getLength()));
     cfg.addOption(MERGES_OPTION, encoded);
   }
   

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java
b/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java
index b5d7aba..767ed25 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java
@@ -31,10 +31,10 @@ import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.security.thrift.TCredentials;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.conf.ServerConfiguration;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.io.Writable;
 
 /**

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/server/base/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java
b/server/base/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java
index 30aa2eb..504956f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java
@@ -21,9 +21,9 @@ import java.io.UnsupportedEncodingException;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.cli.Help;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
@@ -108,7 +108,7 @@ public class DumpZookeeper {
     for (int i = 0; i < data.length; i++) {
       // does this look like simple ascii?
       if (data[i] < ' ' || data[i] > '~')
-        return new Encoded("base64", new String(Base64.encodeBase64(data), Constants.UTF8));
+        return new Encoded("base64", Base64.encodeBase64String(data));
     }
     return new Encoded(Constants.UTF8.name(), new String(data, Constants.UTF8));
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/server/base/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java
b/server/base/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java
index 37ef5f1..a08000e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java
@@ -25,10 +25,10 @@ import javax.xml.parsers.SAXParserFactory;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.cli.Help;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/server/master/src/main/java/org/apache/accumulo/master/tableOps/Utils.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/Utils.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/Utils.java
index 577f5d5..c2bb7a9 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/Utils.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/Utils.java
@@ -27,6 +27,7 @@ import org.apache.accumulo.core.client.impl.Tables;
 import org.apache.accumulo.core.client.impl.thrift.TableOperation;
 import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType;
 import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.DistributedReadWriteLock;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
@@ -35,7 +36,6 @@ import org.apache.accumulo.fate.zookeeper.ZooReservation;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.zookeeper.ZooQueueLock;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
 
@@ -117,7 +117,7 @@ public class Utils {
     Instance instance = HdfsZooInstance.getInstance();
 
     String resvPath = ZooUtil.getRoot(instance) + Constants.ZHDFS_RESERVATIONS + "/"
-        + new String(Base64.encodeBase64(directory.getBytes(Constants.UTF8)), Constants.UTF8);
+        + Base64.encodeBase64String(directory.getBytes(Constants.UTF8));
 
     IZooReaderWriter zk = ZooReaderWriter.getRetryingInstance();
 
@@ -130,7 +130,7 @@ public class Utils {
   public static void unreserveHdfsDirectory(String directory, long tid) throws KeeperException,
InterruptedException {
     Instance instance = HdfsZooInstance.getInstance();
     String resvPath = ZooUtil.getRoot(instance) + Constants.ZHDFS_RESERVATIONS + "/"
-        + new String(Base64.encodeBase64(directory.getBytes(Constants.UTF8)), Constants.UTF8);
+        + Base64.encodeBase64String(directory.getBytes(Constants.UTF8));
     ZooReservation.release(ZooReaderWriter.getRetryingInstance(), resvPath, String.format("%016x",
tid));
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
index 9f1bd1f..a1ee765 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
@@ -35,6 +35,7 @@ import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.tabletserver.thrift.ActionStats;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
 import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.Duration;
 import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.monitor.Monitor;
@@ -53,7 +54,6 @@ import org.apache.accumulo.server.security.SystemCredentials;
 import org.apache.accumulo.server.util.ActionStatsUpdator;
 import org.apache.accumulo.server.util.TableInfoUtil;
 import org.apache.accumulo.trace.instrument.Tracer;
-import org.apache.commons.codec.binary.Base64;
 
 import com.google.common.net.HostAndPort;
 
@@ -169,7 +169,7 @@ public class TServersServlet extends BasicServlet {
       if (extent.getEndRow() != null && extent.getEndRow().getLength() > 0) {
         digester.update(extent.getEndRow().getBytes(), 0, extent.getEndRow().getLength());
       }
-      String obscuredExtent = new String(Base64.encodeBase64(digester.digest()), Constants.UTF8);
+      String obscuredExtent = Base64.encodeBase64String(digester.digest());
       String displayExtent = String.format("<code>[%s]</code>", obscuredExtent);
       
       TableRow row = perTabletResults.prepareRow();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java
b/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java
index 41acce2..df4a62c 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java
@@ -32,12 +32,12 @@ import org.apache.accumulo.core.data.ColumnUpdate;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.util.TextUtil;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
@@ -169,7 +169,7 @@ public class BulkInsert extends Test {
     
     Collection<Text> splits = conn.tableOperations().listSplits(tableName, maxSplits);
     for (Text split : splits)
-      out.println(new String(Base64.encodeBase64(TextUtil.getBytes(split)), Constants.UTF8));
+      out.println(Base64.encodeBase64String(TextUtil.getBytes(split)));
     
     out.close();
     

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a73cf851/test/src/test/java/org/apache/accumulo/test/functional/CredentialsIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/CredentialsIT.java b/test/src/test/java/org/apache/accumulo/test/functional/CredentialsIT.java
index a35a19a..cfc274a 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/CredentialsIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/CredentialsIT.java
@@ -36,7 +36,7 @@ import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.commons.codec.binary.Base64;
+import org.apache.accumulo.core.util.Base64;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;


Mime
View raw message