5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-04 03:29:26 +08:00

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 <arvind@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1150008 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Bayer 2011-07-22 20:04:27 +00:00
parent 8812957f98
commit 49613bb5b7
2 changed files with 7 additions and 4 deletions

View File

@ -493,7 +493,7 @@
<mkdir dir="${cobertura.class.dir}" />
<junit
printsummary="yes" showoutput="${test.output}"
haltonfailure="no" fork="yes" maxmemory="256m"
haltonfailure="no" fork="yes" maxmemory="512m"
errorProperty="tests.failed" failureProperty="tests.failed"
timeout="${test.timeout}"
dir="${build.test}/data">

View File

@ -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),