accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [35/50] [abbrv] git commit: ACCUMULO-2212 Fix UTF8 constant in ZooReaderWriterFactory
Date Fri, 09 May 2014 15:29:13 GMT
ACCUMULO-2212 Fix UTF8 constant in ZooReaderWriterFactory

The merge of ACCUMULO-2212 work from the 1.6.1-SNAPSHOT branch introduced the use of
Constants.UTF8, which does not exist in the master branch. This commit replaces that
constant with a locally defined one.


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

Branch: refs/heads/ACCUMULO-378
Commit: cd045729e44173ab145b25e40942e6c0b5e694b0
Parents: 4ba7d3d
Author: Bill Havanki <bhavanki@cloudera.com>
Authored: Wed May 7 14:01:34 2014 -0400
Committer: Bill Havanki <bhavanki@cloudera.com>
Committed: Wed May 7 14:01:34 2014 -0400

----------------------------------------------------------------------
 .../apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/cd045729/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
index 3c8d143..1682cda 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
@@ -18,6 +18,7 @@ package org.apache.accumulo.server.zookeeper;
 
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Proxy;
+import java.nio.charset.Charset;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
@@ -31,6 +32,7 @@ import org.apache.accumulo.server.conf.ServerConfiguration;
  * A factory for {@link ZooReaderWriter} objects.
  */
 public class ZooReaderWriterFactory {
+  private static final Charset UTF8 = Charset.forName("UTF-8");
   private static final String SCHEME = "digest";
   private static final String USER = "accumulo";
   private static IZooReaderWriter instance = null;
@@ -48,7 +50,7 @@ public class ZooReaderWriterFactory {
    * @return reader/writer
    */
   public IZooReaderWriter getZooReaderWriter(String string, int timeInMillis, String secret)
{
-    return new ZooReaderWriter(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes(Constants.UTF8));
+    return new ZooReaderWriter(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes(UTF8));
   }
 
   /**


Mime
View raw message