From 49613bb5b71a65041a2f6dec57c6c0dece8ab5dd Mon Sep 17 00:00:00 2001 From: Andrew Bayer Date: Fri, 22 Jul 2011 20:04:27 +0000 Subject: [PATCH] SQOOP-159. Fixing HBase test failures. Changes include explicitly setting the Zookeeper client port and increasing the memory limit from 256m to 512m in build.xml. From: Arvind Prabhakar git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1150008 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 2 +- src/test/com/cloudera/sqoop/hbase/HBaseTestCase.java | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build.xml b/build.xml index ed8fd449..ca8ef2b5 100644 --- a/build.xml +++ b/build.xml @@ -493,7 +493,7 @@ diff --git a/src/test/com/cloudera/sqoop/hbase/HBaseTestCase.java b/src/test/com/cloudera/sqoop/hbase/HBaseTestCase.java index bc1d1f4c..6ad9137a 100644 --- a/src/test/com/cloudera/sqoop/hbase/HBaseTestCase.java +++ b/src/test/com/cloudera/sqoop/hbase/HBaseTestCase.java @@ -62,11 +62,13 @@ public class HBaseTestCase extends ImportJobTestCase { if (includeHadoopFlags) { CommonArgs.addHadoopFlags(args); + args.add("-D"); + args.add("hbase.zookeeper.property.clientPort=21818"); } if (null != queryStr) { args.add("--query"); - args.add(queryStr); + args.add(queryStr); } else { args.add("--table"); args.add(getTableName()); @@ -119,7 +121,7 @@ public void shutdown() throws Exception { hbaseTestUtil.shutdownMiniCluster(); this.hbaseTestUtil = null; } - LOG.info("shutdown() method returning."); + LOG.info("shutdown() method returning."); } @Override @@ -139,7 +141,8 @@ protected void verifyHBaseCell(String tableName, String rowKey, String colFamily, String colName, String val) throws IOException { Get get = new Get(Bytes.toBytes(rowKey)); get.addColumn(Bytes.toBytes(colFamily), Bytes.toBytes(colName)); - HTable table = new HTable(Bytes.toBytes(tableName)); + HTable table = new HTable(new Configuration( + hbaseTestUtil.getConfiguration()), Bytes.toBytes(tableName)); try { Result r = table.get(get); byte [] actualVal = r.getValue(Bytes.toBytes(colFamily),