hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kumar, Deepak8 " <deepak8.ku...@citi.com>
Subject RE: Regionserver goes down while endpoint execution
Date Tue, 12 Mar 2013 06:27:11 GMT

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 {


        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);



          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 {


          hasMore = scanner.next(curVals);

          KeyValue kv = curVals.get(0);


            } while (hasMore);

          } finally {



          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();




                  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

                                                throws IOException {

                                          return instance.getValues(columnFamily.getBytes(),




                  for (Map.Entry<byte[], List<String>> e : results.entrySet())

                        System.out.println("Size of list returned: "+e.getValue().size());

                        for(String singleVal: e.getValue()){




            } catch (Throwable throwable) {







-----Original Message-----
From: lars hofhansl [mailto:larsh@apache.org]
Sent: Tuesday, March 12, 2013 2:01 AM
To: user@hbase.apache.org
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 " <deepak8.kumar@citi.com<mailto:deepak8.kumar@citi.com>>

To: "'user@hbase.apache.org'" <user@hbase.apache.org<mailto:user@hbase.apache.org>>

Sent: Monday, March 11, 2013 10:51 PM

Subject: Regionserver goes down while endpoint execution


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?



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