You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "atppp (JIRA)" <ji...@apache.org> on 2009/04/28 00:37:31 UTC

[jira] Created: (HBASE-1352) incrementColumnValue/Memcache bug

incrementColumnValue/Memcache bug
---------------------------------

                 Key: HBASE-1352
                 URL: https://issues.apache.org/jira/browse/HBASE-1352
             Project: Hadoop HBase
          Issue Type: Bug
          Components: regionserver
    Affects Versions: 0.19.1
         Environment: Ubuntu 8.10
            Reporter: atppp


When I do a large amount of incrementColumnValue(), I got NullPointerException thrown from Memcache.java:

2009-04-27 14:59:03,620 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 1 on 59710, call incrementColumnValue([B@1317bfb, [B@1c2a074, [B@b427c1, 1) from 127.0.0.1:52296: error: java.io.IOException: java.lang.NullPointerException
java.io.IOException: java.lang.NullPointerException
        at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:609)
        at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:244)
        at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:226)
        at org.apache.hadoop.hbase.regionserver.HRegion.incrementColumnValue(HRegion.java:2636)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.incrementColumnValue(HRegionServer.java:2299)
        at sun.reflect.GeneratedMethodAccessor13.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.HBaseRPC$Server.call(HBaseRPC.java:632)
        at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:912)
(called from thrift interface)

I consistently hit this exception after restarting Hbase (exactly the same location in my code)

Quick fix is (with HBASE-1319.patch applied) at Memcache.java:609, say if (deletes != null) deletes.add(itKey);

but probably better to change Memcache.java:226. Also the trunk already changed the StoreKey format and doesn't have this bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1352) incrementColumnValue/Memcache bug

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703912#action_12703912 ] 

stack commented on HBASE-1352:
------------------------------

How about this instead of creating new Map:

{code}
Index: src/java/org/apache/hadoop/hbase/regionserver/Memcache.java
===================================================================
--- src/java/org/apache/hadoop/hbase/regionserver/Memcache.java (revision 768432)
+++ src/java/org/apache/hadoop/hbase/regionserver/Memcache.java (working copy)
@@ -606,7 +606,7 @@
           }
         } else {
           // Cell holds a delete value.
-          deletes.add(itKey);
+          if (deletes != null) deletes.add(itKey);
         }
       } else {
         // By L.N. HBASE-684, map is sorted, so we can't find match any more.
{code}

> incrementColumnValue/Memcache bug
> ---------------------------------
>
>                 Key: HBASE-1352
>                 URL: https://issues.apache.org/jira/browse/HBASE-1352
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.19.1
>         Environment: Ubuntu 8.10
>            Reporter: atppp
>             Fix For: 0.19.2
>
>         Attachments: HBASE-1352.patch
>
>
> When I do a large amount of incrementColumnValue(), I got NullPointerException thrown from Memcache.java:
> 2009-04-27 14:59:03,620 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 1 on 59710, call incrementColumnValue([B@1317bfb, [B@1c2a074, [B@b427c1, 1) from 127.0.0.1:52296: error: java.io.IOException: java.lang.NullPointerException
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:609)
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:244)
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:226)
>         at org.apache.hadoop.hbase.regionserver.HRegion.incrementColumnValue(HRegion.java:2636)
>         at org.apache.hadoop.hbase.regionserver.HRegionServer.incrementColumnValue(HRegionServer.java:2299)
>         at sun.reflect.GeneratedMethodAccessor13.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.HBaseRPC$Server.call(HBaseRPC.java:632)
>         at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:912)
> (called from thrift interface)
> I consistently hit this exception after restarting Hbase (exactly the same location in my code)
> Quick fix is (with HBASE-1319.patch applied) at Memcache.java:609, say if (deletes != null) deletes.add(itKey);
> but probably better to change Memcache.java:226. Also the trunk already changed the StoreKey format and doesn't have this bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1352) incrementColumnValue/Memcache bug

Posted by "atppp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

atppp updated HBASE-1352:
-------------------------

    Attachment: HBASE-1352.patch

> incrementColumnValue/Memcache bug
> ---------------------------------
>
>                 Key: HBASE-1352
>                 URL: https://issues.apache.org/jira/browse/HBASE-1352
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.19.1
>         Environment: Ubuntu 8.10
>            Reporter: atppp
>             Fix For: 0.19.2
>
>         Attachments: HBASE-1352.patch
>
>
> When I do a large amount of incrementColumnValue(), I got NullPointerException thrown from Memcache.java:
> 2009-04-27 14:59:03,620 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 1 on 59710, call incrementColumnValue([B@1317bfb, [B@1c2a074, [B@b427c1, 1) from 127.0.0.1:52296: error: java.io.IOException: java.lang.NullPointerException
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:609)
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:244)
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:226)
>         at org.apache.hadoop.hbase.regionserver.HRegion.incrementColumnValue(HRegion.java:2636)
>         at org.apache.hadoop.hbase.regionserver.HRegionServer.incrementColumnValue(HRegionServer.java:2299)
>         at sun.reflect.GeneratedMethodAccessor13.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.HBaseRPC$Server.call(HBaseRPC.java:632)
>         at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:912)
> (called from thrift interface)
> I consistently hit this exception after restarting Hbase (exactly the same location in my code)
> Quick fix is (with HBASE-1319.patch applied) at Memcache.java:609, say if (deletes != null) deletes.add(itKey);
> but probably better to change Memcache.java:226. Also the trunk already changed the StoreKey format and doesn't have this bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1352) incrementColumnValue/Memcache bug

Posted by "atppp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703918#action_12703918 ] 

atppp commented on HBASE-1352:
------------------------------

That fixes the problem. In fact this was what I proposed initially too and tested.

But I was worried that extra checking slows down other calls, also the trunk code creates new Map too when deletes is not passed. That's why I changed line 226 instead in the uploaded patch.

Either way is fine.... I prefer stack's fix because it feels safer...

> incrementColumnValue/Memcache bug
> ---------------------------------
>
>                 Key: HBASE-1352
>                 URL: https://issues.apache.org/jira/browse/HBASE-1352
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.19.1
>         Environment: Ubuntu 8.10
>            Reporter: atppp
>             Fix For: 0.19.2
>
>         Attachments: HBASE-1352.patch
>
>
> When I do a large amount of incrementColumnValue(), I got NullPointerException thrown from Memcache.java:
> 2009-04-27 14:59:03,620 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 1 on 59710, call incrementColumnValue([B@1317bfb, [B@1c2a074, [B@b427c1, 1) from 127.0.0.1:52296: error: java.io.IOException: java.lang.NullPointerException
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:609)
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:244)
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:226)
>         at org.apache.hadoop.hbase.regionserver.HRegion.incrementColumnValue(HRegion.java:2636)
>         at org.apache.hadoop.hbase.regionserver.HRegionServer.incrementColumnValue(HRegionServer.java:2299)
>         at sun.reflect.GeneratedMethodAccessor13.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.HBaseRPC$Server.call(HBaseRPC.java:632)
>         at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:912)
> (called from thrift interface)
> I consistently hit this exception after restarting Hbase (exactly the same location in my code)
> Quick fix is (with HBASE-1319.patch applied) at Memcache.java:609, say if (deletes != null) deletes.add(itKey);
> but probably better to change Memcache.java:226. Also the trunk already changed the StoreKey format and doesn't have this bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1352) incrementColumnValue/Memcache bug

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-1352:
-------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Committed above test for null.

> incrementColumnValue/Memcache bug
> ---------------------------------
>
>                 Key: HBASE-1352
>                 URL: https://issues.apache.org/jira/browse/HBASE-1352
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.19.1
>         Environment: Ubuntu 8.10
>            Reporter: atppp
>             Fix For: 0.19.2
>
>         Attachments: HBASE-1352.patch
>
>
> When I do a large amount of incrementColumnValue(), I got NullPointerException thrown from Memcache.java:
> 2009-04-27 14:59:03,620 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 1 on 59710, call incrementColumnValue([B@1317bfb, [B@1c2a074, [B@b427c1, 1) from 127.0.0.1:52296: error: java.io.IOException: java.lang.NullPointerException
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:609)
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:244)
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:226)
>         at org.apache.hadoop.hbase.regionserver.HRegion.incrementColumnValue(HRegion.java:2636)
>         at org.apache.hadoop.hbase.regionserver.HRegionServer.incrementColumnValue(HRegionServer.java:2299)
>         at sun.reflect.GeneratedMethodAccessor13.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.HBaseRPC$Server.call(HBaseRPC.java:632)
>         at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:912)
> (called from thrift interface)
> I consistently hit this exception after restarting Hbase (exactly the same location in my code)
> Quick fix is (with HBASE-1319.patch applied) at Memcache.java:609, say if (deletes != null) deletes.add(itKey);
> but probably better to change Memcache.java:226. Also the trunk already changed the StoreKey format and doesn't have this bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1352) incrementColumnValue/Memcache bug

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703530#action_12703530 ] 

stack commented on HBASE-1352:
------------------------------

Attach a patch and I'll apply it.  Thanks.

> incrementColumnValue/Memcache bug
> ---------------------------------
>
>                 Key: HBASE-1352
>                 URL: https://issues.apache.org/jira/browse/HBASE-1352
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.19.1
>         Environment: Ubuntu 8.10
>            Reporter: atppp
>
> When I do a large amount of incrementColumnValue(), I got NullPointerException thrown from Memcache.java:
> 2009-04-27 14:59:03,620 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 1 on 59710, call incrementColumnValue([B@1317bfb, [B@1c2a074, [B@b427c1, 1) from 127.0.0.1:52296: error: java.io.IOException: java.lang.NullPointerException
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:609)
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:244)
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:226)
>         at org.apache.hadoop.hbase.regionserver.HRegion.incrementColumnValue(HRegion.java:2636)
>         at org.apache.hadoop.hbase.regionserver.HRegionServer.incrementColumnValue(HRegionServer.java:2299)
>         at sun.reflect.GeneratedMethodAccessor13.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.HBaseRPC$Server.call(HBaseRPC.java:632)
>         at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:912)
> (called from thrift interface)
> I consistently hit this exception after restarting Hbase (exactly the same location in my code)
> Quick fix is (with HBASE-1319.patch applied) at Memcache.java:609, say if (deletes != null) deletes.add(itKey);
> but probably better to change Memcache.java:226. Also the trunk already changed the StoreKey format and doesn't have this bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1352) incrementColumnValue/Memcache bug

Posted by "atppp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

atppp updated HBASE-1352:
-------------------------

    Fix Version/s: 0.19.2
           Status: Patch Available  (was: Open)

> incrementColumnValue/Memcache bug
> ---------------------------------
>
>                 Key: HBASE-1352
>                 URL: https://issues.apache.org/jira/browse/HBASE-1352
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.19.1
>         Environment: Ubuntu 8.10
>            Reporter: atppp
>             Fix For: 0.19.2
>
>         Attachments: HBASE-1352.patch
>
>
> When I do a large amount of incrementColumnValue(), I got NullPointerException thrown from Memcache.java:
> 2009-04-27 14:59:03,620 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 1 on 59710, call incrementColumnValue([B@1317bfb, [B@1c2a074, [B@b427c1, 1) from 127.0.0.1:52296: error: java.io.IOException: java.lang.NullPointerException
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:609)
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:244)
>         at org.apache.hadoop.hbase.regionserver.Memcache.get(Memcache.java:226)
>         at org.apache.hadoop.hbase.regionserver.HRegion.incrementColumnValue(HRegion.java:2636)
>         at org.apache.hadoop.hbase.regionserver.HRegionServer.incrementColumnValue(HRegionServer.java:2299)
>         at sun.reflect.GeneratedMethodAccessor13.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.HBaseRPC$Server.call(HBaseRPC.java:632)
>         at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:912)
> (called from thrift interface)
> I consistently hit this exception after restarting Hbase (exactly the same location in my code)
> Quick fix is (with HBASE-1319.patch applied) at Memcache.java:609, say if (deletes != null) deletes.add(itKey);
> but probably better to change Memcache.java:226. Also the trunk already changed the StoreKey format and doesn't have this bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.