You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jm...@apache.org on 2013/02/13 20:12:40 UTC
svn commit: r1445864 - in
/hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/master:
handler/CreateTableHandler.java snapshot/CloneSnapshotHandler.java
Author: jmhsieh
Date: Wed Feb 13 19:12:39 2013
New Revision: 1445864
URL: http://svn.apache.org/r1445864
Log:
HBASE-7689 CloneTableHandler notify completion too early (Matteo Bertozzi)
Modified:
hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java
hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/CloneSnapshotHandler.java
Modified: hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java?rev=1445864&r1=1445863&r2=1445864&view=diff
==============================================================================
--- hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java (original)
+++ hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java Wed Feb 13 19:12:39 2013
@@ -136,17 +136,24 @@ public class CreateTableHandler extends
cpHost.preCreateTableHandler(this.hTableDescriptor, this.newRegions);
}
handleCreateTable(tableName);
+ completed(null);
if (cpHost != null) {
cpHost.postCreateTableHandler(this.hTableDescriptor, this.newRegions);
}
- } catch (IOException e) {
- LOG.error("Error trying to create the table " + tableName, e);
- } catch (KeeperException e) {
+ } catch (Throwable e) {
LOG.error("Error trying to create the table " + tableName, e);
+ completed(e);
}
}
/**
+ * Called after that process() is completed.
+ * @param exception null if process() is successful or not null if something has failed.
+ */
+ protected void completed(final Throwable exception) {
+ }
+
+ /**
* Responsible of table creation (on-disk and META) and assignment.
* - Create the table directory and descriptor (temp folder)
* - Create the on-disk regions (temp folder)
Modified: hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/CloneSnapshotHandler.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/CloneSnapshotHandler.java?rev=1445864&r1=1445863&r2=1445864&view=diff
==============================================================================
--- hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/CloneSnapshotHandler.java (original)
+++ hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/CloneSnapshotHandler.java Wed Feb 13 19:12:39 2013
@@ -116,12 +116,15 @@ public class CloneSnapshotHandler extend
// these handlers aren't futures so we need to register the error here.
this.monitor.receive(new ForeignException(NAME, rse));
throw rse;
- } finally {
- this.stopped = true;
}
}
@Override
+ protected void completed(final Throwable exception) {
+ this.stopped = true;
+ }
+
+ @Override
public boolean isFinished() {
return this.stopped;
}