hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1004860 - in /hbase/trunk/src/main/java/org/apache/hadoop/hbase: master/AssignmentManager.java master/handler/DisableTableHandler.java master/handler/EnableTableHandler.java regionserver/wal/HLog.java regionserver/wal/HLogSplitter.java
Date Wed, 06 Oct 2010 00:02:22 GMT
Author: stack
Date: Wed Oct  6 00:02:22 2010
New Revision: 1004860

URL: http://svn.apache.org/viewvc?rev=1004860&view=rev
Log:
HBASE-3085 TestSchemaResource broken on TRUNK up on HUDSON

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/EnableTableHandler.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java?rev=1004860&r1=1004859&r2=1004860&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java Wed Oct
 6 00:02:22 2010
@@ -587,6 +587,12 @@ public class AssignmentManager extends Z
    * @param regionName server to be assigned
    */
   public void assign(HRegionInfo region) {
+    String tableName = region.getTableDesc().getNameAsString();
+    if (isTableDisabled(tableName)) {
+      LOG.info("Table " + tableName + " disabled; skipping assign of " +
+        region.getRegionNameAsString());
+      return;
+    }
     RegionState state = addToRegionsInTransition(region);
     synchronized (state) {
       assign(state);

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java?rev=1004860&r1=1004859&r2=1004860&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java
Wed Oct  6 00:02:22 2010
@@ -68,6 +68,10 @@ public class DisableTableHandler extends
   }
 
   private void handleDisableTable() throws IOException {
+    if (this.assignmentManager.isTableDisabled(this.tableNameStr)) {
+      LOG.info("Table " + tableNameStr + " is already disabled; skipping disable");
+      return;
+    }
     // Set the table as disabled so it doesn't get re-onlined
     assignmentManager.disableTable(this.tableNameStr);
     // Get the online regions of this table.

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/EnableTableHandler.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/EnableTableHandler.java?rev=1004860&r1=1004859&r2=1004860&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/EnableTableHandler.java
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/EnableTableHandler.java
Wed Oct  6 00:02:22 2010
@@ -67,6 +67,10 @@ public class EnableTableHandler extends 
   }
 
   private void handleEnableTable() throws IOException {
+    if (!this.assignmentManager.isTableDisabled(this.tableNameStr)) {
+      LOG.info("Table " + tableNameStr + " is not disabled; skipping enable");
+      return;
+    }
     // Get the regions of this table
     List<HRegionInfo> regions = MetaReader.getTableRegions(this.ct, tableName);
     // Set the table as disabled so it doesn't get re-onlined

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java?rev=1004860&r1=1004859&r2=1004860&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java Wed Oct 
6 00:02:22 2010
@@ -1513,6 +1513,8 @@ public class HLog implements Syncable {
     Configuration conf = HBaseConfiguration.create();
     for (int i = 1; i < args.length; i++) {
       try {
+        conf.set("fs.default.name", args[i]);
+        conf.set("fs.defaultFS", args[i]);
         Path logPath = new Path(args[i]);
         if (dump) {
           dump(conf, logPath);

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java?rev=1004860&r1=1004859&r2=1004860&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java Wed
Oct  6 00:02:22 2010
@@ -296,10 +296,11 @@ public class HLogSplitter {
         "hbase.regionserver.hlog.splitlog.writer.threads", 3);
     boolean skipErrors = conf.getBoolean("hbase.skip.errors", false);
     HashMap<byte[], Future> writeFutureResult = new HashMap<byte[], Future>();
-		ThreadFactoryBuilder builder = new ThreadFactoryBuilder();
-		builder.setNameFormat("SplitWriter-%1$d");
+    ThreadFactoryBuilder builder = new ThreadFactoryBuilder();
+    builder.setNameFormat("SplitWriter-%1$d");
     ThreadFactory factory = builder.build();
-    ThreadPoolExecutor threadPool = (ThreadPoolExecutor)Executors.newFixedThreadPool(logWriterThreads,
factory);
+    ThreadPoolExecutor threadPool =
+      (ThreadPoolExecutor)Executors.newFixedThreadPool(logWriterThreads, factory);
     for (final byte[] region : splitLogsMap.keySet()) {
       Callable splitter = createNewSplitter(rootDir, logWriters, splitLogsMap,
           region, fs, conf);



Mime
View raw message