[ 
https://issues.apache.org/jira/browse/HBASE-4213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13087369#comment-13087369
 ] 

stack commented on HBASE-4213:
------------------------------

bq. If number of RS who have processed the schema change is >= number of active 
RS at this moment then master presumes that all RS have acknowledged the schema 
change and hence goes ahead with delete operation.

If I add ten regionservers to a cluster in between start of a schema change and 
before it completes, could 'if (servers != null && servers.size() >= rsCount)' 
never trigger?

Just remove this:

{code}
       # Table should be disabled
-      raise(ArgumentError, "Table #{table_name} is enabled. Disable it first 
before altering.") if enabled?(table_name)
+      # raise(ArgumentError, "Table #{table_name} is enabled. Disable it first 
before altering.") if enabled?(table_name)
{code}

... including the comment.

You should log the exception... add it as arg to below:

{code}
+      } catch (KeeperException e) {
+        LOG.warn("Instant schema change failed for table " + tableName );
+      }
{code}

You do this:

{code}
+    this.schemaChangeTracker = new MasterSchemaChangeTracker(getZooKeeper(),
+            this.zooKeeper.schemaZNode, this);
{code}

Do you have to pass schema znode?  Can you not ask the object returned by 
getZooKeeper for schemaZNode so only need to have two args in this method?

Whats this?

{code}
+  public void checkTableModifiable(final byte [] tableName,
+                                   EventHandler.EventType eventType)
   throws IOException {
+    preCheckTableModifiable(tableName);
+    if (!eventType.isSchemaChangeEvent()) {
+      if (!getAssignmentManager().getZKTable().
+          isDisabledTable(Bytes.toString(tableName))) {
+        throw new TableNotDisabledException(tableName);
+      }
+    }
+  }
{code}

Whats the is disabled check for?  We need this any more?  Oh, I see... its 
needed if its NOT a schema change event.

Javadoc says '+   * @return true if region is opened successfully with new 
schema changes.' but method returns void.

Does this need to be synchronized (you syncrhonize on it later in a different 
method):

+      for (HRegion hRegion : onlineRegionsOfTable) {

If a new region for this table comes in meantime, it'll be ok?  It'll find new 
schema?

What happens if master decides to balance a region at this time?  Or disable 
it?  While reopenRegions is running?

What Ted says on delete cf.

Can you look in zk or something rather than wait on a timer before moving on?

{code}
+    // Take a mini nap for changes to take effect.
+    try {
+      Thread.sleep(200);
+    } catch (InterruptedException e) {
+    }
{code}

Remove the '*' from log messages.  You'll start an arms race where every log 
message will try and add a new type of flashing glyph so it can stand out from 
the crowd.

This patch looks great.




> Support instant schema updates with out master's intervention (i.e with out 
> enable/disable and bulk assign/unassign)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4213
>                 URL: https://issues.apache.org/jira/browse/HBASE-4213
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Subbu M Iyer
>            Assignee: Subbu M Iyer
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4213-Instant_schema_change.patch
>
>
> This Jira is a slight variation in approach to what is being done as part of 
> https://issues.apache.org/jira/browse/HBASE-1730
> Support instant schema updates such as Modify Table, Add Column, Modify 
> Column operations:
> 1. With out enable/disabling the table.
> 2. With out bulk unassign/assign of regions.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to