[ https://issues.apache.org/jira/browse/HBASE-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935579#action_12935579 ]
HBase Review Board commented on HBASE-3267: ------------------------------------------- Message from: "Jonathan Gray" <jg...@apache.org> ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://review.cloudera.org/r/1250/#review1975 ----------------------------------------------------------- This is great. I like this much better than hacking up the master transition code. My main concern is around the exact semantics of assign/unassign (and close). I think we need to do good javadoc on the HBA methods to describe how you would use these or at least a bit about their behavior. assign() just does an assign, but unassign() actually clears stuff out. It seems doing a close() behind the masters back, then asking the master to assign that region, should not work... but it does? trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java <http://review.cloudera.org/r/1250/#comment6230> Is there an open_region? This assign() goes through the master, so what is the opposite of close_region which doesn't go through the master? Doesn't close_region now put the master in a bad state, so it won't expect an assignment to be done on a region which it thinks is already assigned? There is a force on unassign() but not on assign(). In the old master, for HBCK, I added a hook in to the master to clear the in-memory state for a region. To deal with dupe assignment, I did silent close_regions and then cleared the in-memory state. Then I triggered a new assignment. trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterInterface.java <http://review.cloudera.org/r/1250/#comment6231> this is awesome javadoc. is there somewhere else we can put this rather than in just the move() API? Maybe in the HBA class comment or something? Somewhere we can reference in other javadocs about what a regionname is trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java <http://review.cloudera.org/r/1250/#comment6232> So you're supposed to call move instead of open_region? Or why the change in move() though this looks good. trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java <http://review.cloudera.org/r/1250/#comment6233> Why META and not in-memory state? Once you hit assign() you rely on the in-memory state anyways? trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java <http://review.cloudera.org/r/1250/#comment6238> on assign we just do the assignment, but below on unassign() we first clear existing plans and clear from RIT. why the difference. trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java <http://review.cloudera.org/r/1250/#comment6234> is this necessary? should the unassign method taking force deal with anything needed to "force" it? trunk/src/main/ruby/hbase/admin.rb <http://review.cloudera.org/r/1250/#comment6235> zk didn't work? why is this removed? trunk/src/main/ruby/shell/commands/assign.rb <http://review.cloudera.org/r/1250/#comment6236> whitespace. and what exactly are the semantics of this? what if region is already assigned? we should document somewhere more specifically what the behavior is of these methods if we're going to expose them to the client and the shell. neither place really describes what this means and i can imagine users will be doing lots of foot shooting with tools like this. more importantly, though, i'm trying to understand the use cases for these. if it's to unbreak stuff, it's not clear to me how exactly you would use it given that the master will reject certain operations in the wrong order. trunk/src/main/ruby/shell/commands/close_region.rb <http://review.cloudera.org/r/1250/#comment6237> Why would you use close and not unassign/assign/move? It's because close is done silently? Should say that if that's the distinction. Is this comment saying you can use unassign or move after you issue close? or instead of? trunk/src/main/ruby/shell/commands/unassign.rb <http://review.cloudera.org/r/1250/#comment6239> this doesn't use encoded region name? is move then different from the other methods? - Jonathan > close_region shell command breaks region > ---------------------------------------- > > Key: HBASE-3267 > URL: https://issues.apache.org/jira/browse/HBASE-3267 > Project: HBase > Issue Type: Bug > Components: master, regionserver, shell > Affects Versions: 0.90.0 > Reporter: Todd Lipcon > Assignee: stack > Priority: Critical > Fix For: 0.90.0 > > > It used to be that you could use the close_region command from the shell to > close a region on one server and have the master reassign it elsewhere. Now > if you close a region, you get the following errors in the master log: > 2010-11-23 00:46:34,090 WARN > org.apache.hadoop.hbase.master.AssignmentManager: Received CLOSING for region > ffaa7999e909dbd6544688cc8ab303bd from server > haus01.sf.cloudera.com,12020,1290501789693 but region was in the state null > and not in expected PENDI > 2010-11-23 00:46:34,530 DEBUG > org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher: > master:60000-0x12c537d84e10062 Received ZooKeeper Event, > type=NodeDataChanged, state=SyncConnected, > path=/hbase/unassigned/ffaa7999e909dbd6544688cc8ab303bd > 2010-11-23 00:46:34,531 DEBUG org.apache.hadoop.hbase.zookeeper.ZKUtil: > master:60000-0x12c537d84e10062 Retrieved 128 byte(s) of data from znode > /hbase/unassigned/ffaa7999e909dbd6544688cc8ab303bd and set watcher; > region=usertable,user1951957302,1290501969 > 2010-11-23 00:46:34,531 DEBUG > org.apache.hadoop.hbase.master.AssignmentManager: Handling > transition=RS_ZK_REGION_CLOSED, > server=haus01.sf.cloudera.com,12020,1290501789693, > region=ffaa7999e909dbd6544688cc8ab303bd > 2010-11-23 00:46:34,531 WARN > org.apache.hadoop.hbase.master.AssignmentManager: Received CLOSED for region > ffaa7999e909dbd6544688cc8ab303bd from server > haus01.sf.cloudera.com,12020,1290501789693 but region was in the state null > and not in expected PENDIN > and the region just gets stuck closed -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.