If the processing time takes longer than the scanner lease period, then you 
have to increase the scanner lease period to compensate. Scanners have leases 
so their state will be cleaned up on the region server should the client die. 
RPC between HBase clients and servers is sessionless. There's no way for a 
region server to know that a client is dead or is simply taking a lot of time 
to process some item and will soon be back for another next(). 

   - Andy




________________________________
From: Jeff Zhang <[email protected]>
To: [email protected]
Sent: Mon, November 30, 2009 6:08:49 PM
Subject: Re: A weird problem, connection time out ?

Ryan,

Actually it did not throw any exception.  And I try another piece of code :

        Iterator<Result> iter = scanner.iterator();
        while (iter.hasNext()) {
            Result result = iter.next();
            System.out.println(result);
            // do some processing on this record
*            try {
                 Thread.sleep(1000*60*2);
            } catch (InterruptedException e) {
              // TODO Auto-generated catch block
            e.printStackTrace();
            }*
        }

In this case, it will only output the first record. Sometimes people will
get  record one by one from hbase, and do some processing on this record. If
the processing time cost more than 1 minutes, then it will lose the iterator
and throw no exception.  I do not think this make sense. Should I put a jira
item for it ?

Jeff Zhang

On Mon, Nov 30, 2009 at 6:53 PM, Ryan Rawson <[email protected]> wrote:

> Since a scanner occupies server side resources (potentially significant),
> there is a 60 second timeout, and the client will throw a scanner related
> IOException.
>
> On Nov 30, 2009 2:50 AM, "Rekha Joshi" <[email protected]> wrote:
>
> Not sure if connection timeout would register as InterruptedException,
> could
> be a SocketTimeoutException. You may try catching on the logger the general
> Exception to find out the 'e'.Thanks!
>
> On 11/30/09 4:05 PM, "Jeff Zhang" <[email protected]> wrote:
>
> InterruptedException
>



      

Reply via email to