You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2013/07/26 23:43:48 UTC
[jira] [Commented] (HBASE-9048) HCM throws NullPointerException
under load
[ https://issues.apache.org/jira/browse/HBASE-9048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13721254#comment-13721254 ]
stack commented on HBASE-9048:
------------------------------
+1
> HCM throws NullPointerException under load
> ------------------------------------------
>
> Key: HBASE-9048
> URL: https://issues.apache.org/jira/browse/HBASE-9048
> Project: HBase
> Issue Type: Bug
> Components: Client
> Reporter: Jimmy Xiang
> Assignee: Jimmy Xiang
> Priority: Minor
> Fix For: 0.98.0, 0.95.2, 0.94.11
>
> Attachments: 0.94-9048.patch, trunk-9048.patch
>
>
> HCM uses SoftValueSortedMap to cache region locations. Under load, some soft referred values may be GCed. So we should check if the value is null. Otherwise, NPE will be thrown:
> {code}
> for (Map<byte[], HRegionLocation> tableLocations :
> cachedRegionLocations.values()) {
> for (Entry<byte[], HRegionLocation> e : tableLocations.entrySet()) {
> ===> if (serverName.equals(e.getValue().getServerName())) {
> tableLocations.remove(e.getKey());
> deletedSomething = true;
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira