hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Li" <annndy....@gmail.com>
Subject When deleting data in a table, encounter NullPointerException - hbase 0.2 with hadoop 0.17
Date Sat, 01 Mar 2008 00:18:15 GMT
When I run HBase shell, it looks like the column was Null for some reason
that causes this.

hql > DELETE * FROM test-table;
08/02/29 18:45:17 INFO client.HBaseAdmin: Disabled table test-table
Exception in thread "main" java.lang.NullPointerException
        at org.apache.hadoop.io.Text.set(Text.java:181)
        at org.apache.hadoop.io.Text.<init>(Text.java:76)
        at org.apache.hadoop.hbase.hql.DeleteCommand.getColumnList(
DeleteCommand.java:104)
        at org.apache.hadoop.hbase.hql.DeleteCommand.execute(
DeleteCommand.java:65)
        at org.apache.hadoop.hbase.hql.HQLClient.executeQuery(HQLClient.java
:68)
        at org.apache.hadoop.hbase.Shell.main(Shell.java:114)

In DeleteCommand.java, the code snippet gets a null Text back, I don't know
how this happen.
==== snippet DeleteCommand.java line 104 ====
if (columnList.contains("*")) {
    columns = hTable.getRow(new Text(this.rowKey)).keySet().toArray(
        new Text[] {});
}
==== snippet ====

When I try to open the HQL console again to do 'DELETE * FROM test-table",
now I get this following exception.

Exception in thread "main" java.lang.IllegalStateException: region offline:
test-table,,1204322523028
        at
org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegionInMeta
(HConnectionManager.java:447)
        at
org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(
HConnectionManager.java:352)
        at
org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(
HConnectionManager.java:314)
        at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:89)
        at org.apache.hadoop.hbase.hql.DeleteCommand.execute(
DeleteCommand.java:55)
        at org.apache.hadoop.hbase.hql.HQLClient.executeQuery(HQLClient.java
:68)
        at org.apache.hadoop.hbase.Shell.main(Shell.java:114)

Was the second exception caused by this "08/02/29 18:45:17 INFO
client.HBaseAdmin: Disabled table test-table" from above?

2 questions remains.
1. Why null column appears?
    a. Did the null column causes the exception?
    b. or the disabled on test-table caused the null exception?
2. The region is offline that causes the 2nd exception, was this the reason
why it causes the table got disabled?

Kind of confused in the logic flow here.

Thanks,
-annndy

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message