Lars,
Thanks for your quick response.There is not much info in region server log. I
am again executing it with DEBUG log level in region servers.
Here is the endpoint code
public class ColumnAggregationEndpoint extends BaseEndpointCoprocessor
implements ColumnAggregationProtocol {
@Override
public List<String> getValues(byte[] family, byte[] qualifier, int
batchSize, int cacheSize)
throws IOException {
// aggregate at each region
Scan scan = new Scan();
scan.addColumn(family, qualifier);
scan.setCaching(cacheSize);
scan.setBatch(batchSize);
List<String> values = new ArrayList<String>();
RegionCoprocessorEnvironment environment =
(RegionCoprocessorEnvironment) getEnvironment();
InternalScanner scanner = environment.getRegion().getScanner(scan);
try {
List<KeyValue> curVals = new ArrayList<KeyValue>();
boolean hasMore = false;
do {
curVals.clear();
hasMore = scanner.next(curVals);
KeyValue kv = curVals.get(0);
values.add(Bytes.toString(kv.getValue()));
} while (hasMore);
} finally {
scanner.close();
}
return values;
}
}
The RPC client to invoke the Endpoint is as follows:
public class HBaseEndPointClientForElfLog {
public static void main(String[] args) {
try {
Configuration conf = HBaseConfiguration.create();
conf.set(
"hbase.zookeeper.quorum",
"vm-ab1f-dd21.nam.nsroot.net,vm-cb03-2277.nam.nsroot.net,vm-15c2-3bbf.nam.nsroot.net");
String tableName = "elf_log";
final String columnFamily = "content";
final String columnQualifier = "logFileName";
final String startRowKey =
"153299:1362780381523:2932572079500658:vm-ab1f-dd21.nam.nsroot.net:";
final String endRowKey = "153299:1362953388000";
HTableInterface table = new HTable(conf, tableName);
Scan scan;
Map<byte[], List<String>> results;
// scan: for all regions
scan = new Scan();
results =
table.coprocessorExec(ColumnAggregationProtocol.class,
startRowKey.getBytes(), endRowKey.getBytes(),
new Batch.Call<ColumnAggregationProtocol,
List<String>>() {
public List<String>
call(ColumnAggregationProtocol instance)
throws IOException {
return
instance.getValues(columnFamily.getBytes(),
columnQualifier.getBytes(),2,5);
}
});
for (Map.Entry<byte[], List<String>> e : results.entrySet()) {
System.out.println("Size of list returned:
"+e.getValue().size());
for(String singleVal: e.getValue()){
System.out.println(singleVal);
}
}
} catch (Throwable throwable) {
throwable.printStackTrace();
}
}
}
Regards,
Deepak
-----Original Message-----
From: lars hofhansl [mailto:[email protected]]
Sent: Tuesday, March 12, 2013 2:01 AM
To: [email protected]
Subject: Re: Regionserver goes down while endpoint execution
What does the region server log say?
Endpoints do not run in a sandbox. You can call System.exit(...) and your
RegionServer will happily exit.
If you can, please show us your endpoint code.
-- Lars
________________________________
From: "Kumar, Deepak8 " <[email protected]<mailto:[email protected]>>
To: "'[email protected]'"
<[email protected]<mailto:[email protected]>>
Sent: Monday, March 11, 2013 10:51 PM
Subject: Regionserver goes down while endpoint execution
Hi,
I have a table in hbase which has more than 5GB of data, it is distributed at
101 regions at 5 regionservers.
When I execute an endpoint which is supposed to fetch a column qualifier value
using an endpoint RPC client, the region server goes down. The hbase master log
says "Can't connect to region, retrying.." The same endpoint works fine for
tables which has 300 records.
Could you please guide me the reason for being regionserver down?
Regards,
Deepak