From 8eab15acf5ff23d04c597d30ea653e8081891ee9 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Thu, 1 Mar 2012 06:49:59 +0000 Subject: [PATCH] HBASE-5491 Remove HBaseConfiguration.create() call from coprocessor.Exec class git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1295429 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/hadoop/hbase/client/coprocessor/Exec.java | 1 - .../hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/hadoop/hbase/client/coprocessor/Exec.java b/src/main/java/org/apache/hadoop/hbase/client/coprocessor/Exec.java index 45cc463918d..75535b5efc4 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/coprocessor/Exec.java +++ b/src/main/java/org/apache/hadoop/hbase/client/coprocessor/Exec.java @@ -52,7 +52,6 @@ import java.lang.reflect.Method; * @see org.apache.hadoop.hbase.client.HTable#coprocessorExec(Class, byte[], byte[], org.apache.hadoop.hbase.client.coprocessor.Batch.Call, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback) */ public class Exec extends Invocation implements Row { - private Configuration conf = HBaseConfiguration.create(); /** Row key used as a reference for any region lookups */ private byte[] referenceRow; private Class protocol; diff --git a/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java b/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java index e1f52c1bace..e38cdcd4d7c 100644 --- a/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java +++ b/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java @@ -26,6 +26,7 @@ import java.io.IOException; import java.util.Map; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.MediumTests; @@ -200,6 +201,7 @@ public class TestCoprocessorEndpoint { dib.reset(dob.getData(), dob.getLength()); Exec after = new Exec(); + after.setConf(HBaseConfiguration.create()); after.readFields(dib); // no error thrown assertEquals(after.getProtocolName(), protocolName);