HBASE-1488 After 1304 goes in, fix and reenable test of thrift, mr indexer, and merge tool -- part 1
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@785913 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eb6ce6abe0
commit
83b3772eb3
|
@ -39,7 +39,6 @@ import org.apache.hadoop.hbase.client.HTable;
|
||||||
import org.apache.hadoop.hbase.client.Result;
|
import org.apache.hadoop.hbase.client.Result;
|
||||||
import org.apache.hadoop.hbase.client.Scan;
|
import org.apache.hadoop.hbase.client.Scan;
|
||||||
import org.apache.hadoop.hbase.client.ResultScanner;
|
import org.apache.hadoop.hbase.client.ResultScanner;
|
||||||
import org.apache.hadoop.hbase.io.RowResult;
|
|
||||||
import org.apache.hadoop.hbase.io.Cell;
|
import org.apache.hadoop.hbase.io.Cell;
|
||||||
import org.apache.hadoop.hbase.HTableDescriptor;
|
import org.apache.hadoop.hbase.HTableDescriptor;
|
||||||
import org.apache.hadoop.hbase.MultiRegionTable;
|
import org.apache.hadoop.hbase.MultiRegionTable;
|
||||||
|
@ -59,8 +58,8 @@ import org.apache.lucene.search.TermQuery;
|
||||||
/**
|
/**
|
||||||
* Test Map/Reduce job to build index over HBase table
|
* Test Map/Reduce job to build index over HBase table
|
||||||
*/
|
*/
|
||||||
public class DisabledTestTableIndex extends MultiRegionTable {
|
public class TestTableIndex extends MultiRegionTable {
|
||||||
private static final Log LOG = LogFactory.getLog(DisabledTestTableIndex.class);
|
private static final Log LOG = LogFactory.getLog(TestTableIndex.class);
|
||||||
|
|
||||||
static final String TABLE_NAME = "moretest";
|
static final String TABLE_NAME = "moretest";
|
||||||
static final String INPUT_COLUMN = "contents:";
|
static final String INPUT_COLUMN = "contents:";
|
||||||
|
@ -77,14 +76,14 @@ public class DisabledTestTableIndex extends MultiRegionTable {
|
||||||
private JobConf jobConf = null;
|
private JobConf jobConf = null;
|
||||||
|
|
||||||
/** default constructor */
|
/** default constructor */
|
||||||
public DisabledTestTableIndex() {
|
public TestTableIndex() {
|
||||||
super(INPUT_COLUMN);
|
super(INPUT_COLUMN);
|
||||||
desc = new HTableDescriptor(TABLE_NAME);
|
desc = new HTableDescriptor(TABLE_NAME);
|
||||||
desc.addFamily(new HColumnDescriptor(INPUT_COLUMN));
|
desc.addFamily(new HColumnDescriptor(INPUT_COLUMN));
|
||||||
desc.addFamily(new HColumnDescriptor(OUTPUT_COLUMN));
|
desc.addFamily(new HColumnDescriptor(OUTPUT_COLUMN));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (jobConf != null) {
|
if (jobConf != null) {
|
||||||
FileUtil.fullyDelete(new File(jobConf.get("hadoop.tmp.dir")));
|
FileUtil.fullyDelete(new File(jobConf.get("hadoop.tmp.dir")));
|
||||||
|
@ -109,7 +108,7 @@ public class DisabledTestTableIndex extends MultiRegionTable {
|
||||||
conf.set("hbase.index.conf", createIndexConfContent());
|
conf.set("hbase.index.conf", createIndexConfContent());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
jobConf = new JobConf(conf, DisabledTestTableIndex.class);
|
jobConf = new JobConf(conf, TestTableIndex.class);
|
||||||
jobConf.setJobName("index column contents");
|
jobConf.setJobName("index column contents");
|
||||||
jobConf.setNumMapTasks(2);
|
jobConf.setNumMapTasks(2);
|
||||||
// number of indexes to partition into
|
// number of indexes to partition into
|
||||||
|
@ -261,6 +260,6 @@ public class DisabledTestTableIndex extends MultiRegionTable {
|
||||||
* @param args unused
|
* @param args unused
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TestRunner.run(new TestSuite(DisabledTestTableIndex.class));
|
TestRunner.run(new TestSuite(TestTableIndex.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue