hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Baranau <alex.barano...@gmail.com>
Subject Re: Why startRegionOperation get the lock.readLock().lock(),still need row lock?
Date Mon, 16 Jul 2012 14:33:05 GMT
* The first lock is for guarding closes of Region. I.e. for forbidding
reading/writing to the Region which is being closed.
* The second lock is row lock.

Alex Baranau
------
Sematext :: http://blog.sematext.com/ :: Hadoop - HBase - ElasticSearch -
Solr

On Mon, Jul 16, 2012 at 10:14 AM, Howard <rj03hou@gmail.com> wrote:

> *When I use hbase,I found an Error log:*
> *2012-07-14 15:41:04,023 ERROR
> org.apache.hadoop.hbase.regionserver.HRegionServer:
> java.lang.NullPointerException
>         at
> java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:922)
>         at
>
> org.apache.hadoop.hbase.regionserver.HRegion.releaseRowLock(HRegion.java:3044)
>         at
> org.apache.hadoop.hbase.regionserver.HRegion.delete(HRegion.java:1653)
>         at
>
> org.apache.hadoop.hbase.regionserver.HRegionServer.delete(HRegionServer.java:2513)
>         at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
>
> org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:364)
>         at
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1376)*
> *So I read the source code,It because get the row lock timeout in the
> delete method.*
> *But I find the startRegionOperation method,"This method needs to be called
> before any public call that reads or * modifies data.",why we use this
> method to get the lock.readLock().lock(),we still need the row lock?*
>



-- 
Alex Baranau
------
Sematext :: http://blog.sematext.com/ :: Hadoop - HBase - ElasticSearch -
Solr

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