Hi,
I've been playing around with HBase a little bit recently; writing
some code to get an idea of how to use it. I noticed the listTables()
method returned by an HConnection doesn't return what I expect. I
don't know if this is a bug or if I'm just doing something wrong.
I first created the table "movieLog_table" using HBase shell. Then I
tried programmatically creating and deleting tables. I create and
enable a table (which I know works, because I can use it to store and
retrieve values), and then run this code:
HConnection con = HConnectionManager.getConnection(conf);
HTableDescriptor[] tables = con.listTables();
System.out.println(tables.length);
for (HTableDescriptor tabledesc : tables) {
System.out.println(tabledesc.getName().toString());
}
When I run the code (which programmatically creates two tables, in
addition to the one table I created using the shell), I get this
result:
3
movieLog_table
movieLog_table
movieLog_table
The number is correct, but the two new tables are reported as having
the same name. Also, when I run "show tables;" in HBase shell, it
shows the same result.
If this is actually a bug and not an error on my end, I can create a JIRA task.
Thanks,
Andrew