Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Why Regionserver is not serving when I set the WAL trigger?


Copy link to this message
-
Why Regionserver is not serving when I set the WAL trigger?
Dear All,

I used hbase 0.94.1 and implemented the test example of WAL trigger like:

public class WalTrigger extends BaseRegionObserver implements WALObserver{

public boolean preWALWrite(ObserverContext<WALCoprocessorEnvironment>
ctx, HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws
IOException{
Configuration conf = new Configuration();
String key = logKey.toString();
String value = logEdit.toString();
String logRes = key + value;
HTable table = new HTable(conf,"log");
Put put = new Put(Bytes.toBytes(key));
put.add(Bytes.toBytes("logEntry"), null, Bytes.toBytes(value));
table.put(put);
return true;
}
public void postWALWrite(ObserverContext<WALCoprocessorEnvironment>
ctx, HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws
IOException{

}
}

However, when I inserted the tuples in HBase, it returns Exception in
thread "main" org.apache.hadoop.hbase.client.RetriesExhaustedException:
Failed after attempts=10, exceptions:
Sat Nov 10 15:58:14 CET 2012,
org.apache.hadoop.hbase.client.ScannerCallable@1ff92f5,
org.apache.hadoop.hbase.NotServingRegionException:
org.apache.hadoop.hbase.NotServingRegionException: Region is not
online: .META.,,1
Sat Nov 10 15:58:15 CET 2012,
org.apache.hadoop.hbase.client.ScannerCallable@1ff92f5,
org.apache.hadoop.hbase.NotServingRegionException:
org.apache.hadoop.hbase.NotServingRegionException: Region is not
online: .META.,,1
Sat Nov 10 15:58:16 CET 2012,
org.apache.hadoop.hbase.client.ScannerCallable@1ff92f5,
org.apache.hadoop.hbase.NotServingRegionException:
org.apache.hadoop.hbase.NotServingRegionException: Region is not
online: .META.,,1
Sat Nov 10 15:58:17 CET 2012,
org.apache.hadoop.hbase.client.ScannerCallable@1ff92f5,
org.apache.hadoop.hbase.NotServingRegionException:
org.apache.hadoop.hbase.NotServingRegionException: Region is not
online: .META.,,1
Sat Nov 10 15:58:19 CET 2012,
org.apache.hadoop.hbase.client.ScannerCallable@1ff92f5,
org.apache.hadoop.hbase.NotServingRegionException:
org.apache.hadoop.hbase.NotServingRegionException: Region is not
online: .META.,,1
Sat Nov 10 15:58:21 CET 2012,
org.apache.hadoop.hbase.client.ScannerCallable@1ff92f5,
org.apache.hadoop.hbase.NotServingRegionException:
org.apache.hadoop.hbase.NotServingRegionException: Region is not
online: .META.,,1
Sat Nov 10 15:58:25 CET 2012,
org.apache.hadoop.hbase.client.ScannerCallable@1ff92f5,
org.apache.hadoop.hbase.NotServingRegionException:
org.apache.hadoop.hbase.NotServingRegionException: Region is not
online: .META.,,1
Sat Nov 10 15:58:29 CET 2012,
org.apache.hadoop.hbase.client.ScannerCallable@1ff92f5,
org.apache.hadoop.hbase.NotServingRegionException:
org.apache.hadoop.hbase.NotServingRegionException: Region is not
online: .META.,,1
Sat Nov 10 15:58:37 CET 2012,
org.apache.hadoop.hbase.client.ScannerCallable@1ff92f5,
org.apache.hadoop.hbase.NotServingRegionException:
org.apache.hadoop.hbase.NotServingRegionException: Region is not
online: .META.,,1
Sat Nov 10 15:58:54 CET 2012,
org.apache.hadoop.hbase.client.ScannerCallable@1ff92f5,
org.apache.hadoop.hbase.NotServingRegionException:
org.apache.hadoop.hbase.NotServingRegionException: Region is not
online: .META.,,1

at org.apache.hadoop.hbase.client.ServerCallable.withRetries(ServerCallable.java:183)
at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:205)
at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:120)
at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:626)
at org.apache.hadoop.hbase.catalog.MetaReader.fullScan(MetaReader.java:707)
at org.apache.hadoop.hbase.catalog.MetaReader.fullScan(MetaReader.java:183)
at org.apache.hadoop.hbase.catalog.MetaReader.tableExists(MetaReader.java:448)
at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:233)
at datageneraion.HBaseDataGenerator.createTable(HBaseDataGenerator.java:24)
at datageneraion.HBaseDataGenerator.main(HBaseDataGenerator.java:76)

By the way, I set in the hbase-site.xml file

<property>
<name>hbase.coprocessor.wal.classes</name>
<value>yonghu.waltrigger.WalTrigger</value>

Can anyone give me some advices?

Thanks!

Yong