[
https://issues.apache.org/jira/browse/HBASE-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093563#comment-13093563
]
[email protected] commented on HBASE-4273:
------------------------------------------------------
bq. On 2011-08-30 08:55:54, ramkrishna vasudevan wrote:
bq. > As per HBASE-4052 and HBASE-4083 the partial disable or enable state has
been handled. i.e if the master sees that the znode was in DISABLING state -
recover by disabling the table completely or in ENABLING state -recover by
enabling the table completely.
bq. > Or else if this recovery is not done we will not be able to serve the
regions of these partial tables.
bq. > Now as per your current patch these two checks
bq. >
bq. > !this.assignmentManager.getZKTable().checkEnabledAndSetDisablingTable()
bq. > !this.assignmentManager.getZKTable().checkDisabledAndSetEnablingTable()
bq. >
bq. > will prevent the recovery from happening. What do you feel Ming?
bq. > What i feel is we can add a new constructor for EnableTableHandler and
DisableTableHandler and in that do not perform the above check so that recovery
can be successful?
bq. > Correct me if am wrong.
bq. >
bq. > Rest looks good. Thanks for looking into this issue.
bq. >
bq. >
bq. >
bq. >
This new constructor will be called only in recovery flow.
- ramkrishna
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1679/#review1687
-----------------------------------------------------------
On 2011-08-30 06:53:13, Ming Ma wrote:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/1679/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2011-08-30 06:53:13)
bq.
bq.
bq. Review request for hbase, Ted Yu, Michael Stack, and ramkrishna vasudevan.
bq.
bq.
bq. Summary
bq. -------
bq.
bq. 1. Don't add regions with null regionLocation during startup in
AssignmentManager. Explained why it could happen.
bq. 2. Only allow application to disable table if it is in enabled state; only
allow application to enable table if it is in disabled state. This also implies
some APIs change on HBaseAdmin. Previously application can enable an enabled
table; it is a no-op. Now, if application tries to enable an enabled table,
TableNotDisabledException will be thrown. If such change isn't a good idea, I
can make it backward compatible. Updated javadoc.
bq.
bq.
bq. This addresses bug HBASE-4273.
bq. https://issues.apache.org/jira/browse/HBASE-4273
bq.
bq.
bq. Diffs
bq. -----
bq.
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/TableNotEnabledException.java
PRE-CREATION
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
1163081
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
1163081
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java
1163081
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/EnableTableHandler.java
1163081
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
1163081
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java
1163081
bq.
bq. Diff: https://reviews.apache.org/r/1679/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq. Existing unit tests
bq. Add new test cases for "enable an enabled table", "disable an disabled
table".
bq.
bq.
bq. Thanks,
bq.
bq. Ming
bq.
bq.
> java.lang.NullPointerException when a table is being disabled and HMaster
> restarts
> ----------------------------------------------------------------------------------
>
> Key: HBASE-4273
> URL: https://issues.apache.org/jira/browse/HBASE-4273
> Project: HBase
> Issue Type: Bug
> Reporter: Ming Ma
> Assignee: Ming Ma
>
> This bug occurs in following scenario.
> 1. For some reason, the regionLocation isn't set in .META. table for some
> regions. Perhaps createTable didn't complete successfully.
> 1. The table of those regions is being disabled.
> 2. HMaster restarted.
> 3. At HMaster startup, it tries to transition from disabling to disabled
> state. It got the following exception.
> java.lang.NullPointerException: Passed server is null
> at
> org.apache.hadoop.hbase.master.ServerManager.sendRegionClose(ServerManager.
> java:581)
> at
> org.apache.hadoop.hbase.master.AssignmentManager.unassign(AssignmentManager
> .java:1093)
> at
> org.apache.hadoop.hbase.master.AssignmentManager.unassign(AssignmentManager
> .java:1040)
> at
> org.apache.hadoop.hbase.master.handler.DisableTableHandler$BulkDisabler$1.r
> un(DisableTableHandler.java:132)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j
> ava:886)
> In AssignmentManager.rebuildUserRegions, it added such regions to its regions
> list,
> if (regionLocation == null) {
> // Region not being served, add to region map with no assignment
> // If this needs to be assigned out, it will also be in ZK as RIT
> // add if the table is not in disabled and enabling state
> if (false == checkIfRegionBelongsToDisabled(regionInfo)
> && false == checkIfRegionsBelongsToEnabling(regionInfo)) {
> regions.put(regionInfo, regionLocation);
> }
> Perhaps, it should be
> if (regionLocation == null) {
> // Region not being served, add to region map with no assignment
> // If this needs to be assigned out, it will also be in ZK as RIT
> // add if the table is not in disabled and enabling state
> if (true == checkIfRegionBelongsToEnabled(regionInfo) {
> regions.put(regionInfo, regionLocation);
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira