diff --git a/src/main/java/org/apache/hadoop/hbase/avro/AvroServer.java b/src/main/java/org/apache/hadoop/hbase/avro/AvroServer.java index e4501dafd9a..0ea23763a13 100644 --- a/src/main/java/org/apache/hadoop/hbase/avro/AvroServer.java +++ b/src/main/java/org/apache/hadoop/hbase/avro/AvroServer.java @@ -125,7 +125,11 @@ public class AvroServer { * @throws IOException */ HBaseImpl() throws IOException { - conf = HBaseConfiguration.create(); + this(HBaseConfiguration.create()); + } + + HBaseImpl(final Configuration c) throws IOException { + conf = c; admin = new HBaseAdmin(conf); htablePool = new HTablePool(conf, 10); scannerMap = new HashMap(); diff --git a/src/main/java/org/apache/hadoop/hbase/avro/generated/AIOError.java b/src/main/java/org/apache/hadoop/hbase/avro/generated/AIOError.java index 429a415fed6..444f3de9886 100644 --- a/src/main/java/org/apache/hadoop/hbase/avro/generated/AIOError.java +++ b/src/main/java/org/apache/hadoop/hbase/avro/generated/AIOError.java @@ -2,7 +2,8 @@ package org.apache.hadoop.hbase.avro.generated; @SuppressWarnings("all") public class AIOError extends org.apache.avro.specific.SpecificExceptionBase implements org.apache.avro.specific.SpecificRecord { - public static final org.apache.avro.Schema SCHEMA$ = org.apache.avro.Schema.parse("{\"type\":\"error\",\"name\":\"AIOError\",\"namespace\":\"org.apache.hadoop.hbase.avro.generated\",\"fields\":[{\"name\":\"message\",\"type\":\"string\"}]}"); + public static final org.apache.avro.Schema SCHEMA$ = + org.apache.avro.Schema.parse("{\"type\":\"error\",\"name\":\"AIOError\",\"namespace\":\"org.apache.hadoop.hbase.avro.generated\",\"fields\":[{\"name\":\"message\",\"type\":\"string\"}]}"); public org.apache.avro.util.Utf8 message; public org.apache.avro.Schema getSchema() { return SCHEMA$; } public java.lang.Object get(int field$) { diff --git a/src/test/java/org/apache/hadoop/hbase/avro/TestAvroServer.java b/src/test/java/org/apache/hadoop/hbase/avro/TestAvroServer.java index 015563c89c2..5cd809990e3 100644 --- a/src/test/java/org/apache/hadoop/hbase/avro/TestAvroServer.java +++ b/src/test/java/org/apache/hadoop/hbase/avro/TestAvroServer.java @@ -96,7 +96,8 @@ public class TestAvroServer { */ @Test (timeout=300000) public void testTableAdminAndMetadata() throws Exception { - AvroServer.HBaseImpl impl = new AvroServer.HBaseImpl(); + AvroServer.HBaseImpl impl = + new AvroServer.HBaseImpl(TEST_UTIL.getConfiguration()); assertEquals(impl.listTables().size(), 0); @@ -140,7 +141,8 @@ public class TestAvroServer { */ @Test public void testFamilyAdminAndMetadata() throws Exception { - AvroServer.HBaseImpl impl = new AvroServer.HBaseImpl(); + AvroServer.HBaseImpl impl = + new AvroServer.HBaseImpl(TEST_UTIL.getConfiguration()); ATableDescriptor tableA = new ATableDescriptor(); tableA.name = tableAname; @@ -174,7 +176,8 @@ public class TestAvroServer { */ @Test public void testDML() throws Exception { - AvroServer.HBaseImpl impl = new AvroServer.HBaseImpl(); + AvroServer.HBaseImpl impl = + new AvroServer.HBaseImpl(TEST_UTIL.getConfiguration()); ATableDescriptor tableA = new ATableDescriptor(); tableA.name = tableAname;