Hi,
I am wondering if this is
https://issues.apache.org/jira/browse/HBASE-2122 and therefore fixed.
I cannot run Whirr with HBase 0.90.0 right now as there is no matching
Hadoop tarball - a different issue altogether - so cannot confirm. I
have added a test to the Whirr HBase integration tests like so:
public class HBaseServiceTest {
private static final byte [] ROW = Bytes.toBytes("testRow");
private static final byte [] FAMILY = Bytes.toBytes("testFamily");
private static final byte [] QUALIFIER = Bytes.toBytes("testQualifier");
private static final byte [] VALUE = Bytes.toBytes("testValue");
private static RemoteAdmin remoteAdmin = null;
private static HBaseServiceController controller =
HBaseServiceController.getInstance();
@BeforeClass
public static void setUp() throws Exception {
controller.ensureClusterRunning();
remoteAdmin = controller.getRemoteAdmin();
}
@AfterClass
public static void tearDown() throws Exception {
controller.shutdown();
}
@Test
public void test() throws Exception {
HTableDescriptor td = new HTableDescriptor("testtable");
HColumnDescriptor cd = new HColumnDescriptor(FAMILY);
td.addFamily(cd);
remoteAdmin.createTable(td);
RemoteHTable table = controller.getRemoteHTable("testtable");
Put put = new Put(ROW);
put.add(FAMILY, QUALIFIER, VALUE);
table.put(put);
Scan scan = new Scan();
scan.addColumn(FAMILY, Bytes.toBytes("bogus"));
ResultScanner scanner = table.getScanner(scan);
Result result = scanner.next();
assertTrue("Expected null result", result == null);
scanner.close();
System.out.println("Done.");
}
}
Note: I have to go through REST since running this test local talking
to a remote cluster is failing because of us reporting internal
hostnames (see WHIRR-201 for my notes and a link to Andy's comments
online).
Anyhow, this test fails as it returns NOT null as expected but that
one test row. So it seems the qualifier is not used but only the
family during the scan. Sounds like the issue in HBASE-2122, right?
Maybe we should add a test like this into the TestRemoteTable class so
there are no regressions? Or is that already done? Just wondering.
Lars