hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nspiegelb...@apache.org
Subject svn commit: r1212714 - in /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master: HMaster.java PreferredAssignmentManager.java RegionManager.java ServerManager.java ThrottledRegionReopener.java
Date Sat, 10 Dec 2011 01:56:58 GMT
Author: nspiegelberg
Date: Sat Dec 10 01:56:58 2011
New Revision: 1212714

URL: http://svn.apache.org/viewvc?rev=1212714&view=rev
Log:
[master] Refactor preferred assignments in RegionManager

Summary:
Preferred assignments was refactored to encapsulate the management of
assigning regions to particular servers, to support future enhancement
of this assignment logic. RegionManager now supports having regions
sticky to some servers, with a new type of persistent preferred
assignment. Transient perfered assignments behave the same as before.

Test Plan: mvn test; move_region in shell, which uses preferred assignments

Reviewers: kranganathan, kannan

Reviewed By: kranganathan

CC: hbase-eng@lists, kranganathan

Differential Revision: 371583

Added:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/PreferredAssignmentManager.java
Modified:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/RegionManager.java
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ThrottledRegionReopener.java

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1212714&r1=1212713&r2=1212714&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Sat Dec
10 01:56:58 2011
@@ -1619,7 +1619,7 @@ public class HMaster extends Thread impl
       HServerAddress serverAddress = new HServerAddress(hostnameAndPort);
 
       // Assign the specified host to be the preferred host for the specified region.
-      this.regionManager.addRegionToPreferredAssignment(serverAddress, hri);
+      this.regionManager.assignmentManager.addTransientAssignment(serverAddress, hri);
 
       // Close the region so that it will be re-opened by the preferred host.
       modifyTable(tableName, HConstants.Modify.CLOSE_REGION, new Writable[]{args[0]});

Added: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/PreferredAssignmentManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/PreferredAssignmentManager.java?rev=1212714&view=auto
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/PreferredAssignmentManager.java
(added)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/PreferredAssignmentManager.java
Sat Dec 10 01:56:58 2011
@@ -0,0 +1,257 @@
+package org.apache.hadoop.hbase.master;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.util.concurrent.DelayQueue;
+import java.util.concurrent.Delayed;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.HRegionInfo;
+import org.apache.hadoop.hbase.HServerAddress;
+import org.apache.hadoop.hbase.HServerInfo;
+import org.apache.hadoop.hbase.util.Threads;
+
+/**
+ * Manages the preferences for assigning regions to specific servers. Regions
+ * may have persistent assignments to a list of servers ordered by preference,
+ * as well as a transient assignment to a specific server. Transient
+ * assignments may be a choice of one of the persistent assignments for the
+ * present time, or may be for any arbitrary server. Transient assignments
+ * will expire after a configurable delay, whereas persistent assignments will
+ * remain until removed.
+ *
+ * Transient assignments should be respected, whereas persistent assignments
+ * are suggestions which can be used to inform the creation of transient
+ * assignments and do not need to be respected directly.
+ *
+ * All access to this class is thread-safe.
+ */
+public class PreferredAssignmentManager {
+  protected static final Log LOG = LogFactory.getLog(
+      PreferredAssignmentManager.class);
+
+  /**
+   * Preferred assignment map for temporary preferences. These preferences
+   * are for the regions which should be assigned to a server as soon as
+   * possible, and will expire if such assignments are not made within a
+   * certain timeout period.
+   */
+  private Map<HServerAddress, Set<HRegionInfo>> transientAssignments;
+
+  /**
+   * Preferred assignment map for persistent preferences. These preferences
+   * are multiple favored servers for each region, with the first server in
+   * each list being preferred over all others (the primary).
+   */
+  private Map<HRegionInfo, List<HServerAddress>> persistentAssignments;
+
+  /**
+   * Queue of transient assignments and their upcoming timeouts. When a
+   * transient assignment expires from this queue, it will be removed from
+   * the transient assignment map.
+   */
+  private DelayQueue<PreferredAssignment> transientAssignmentTimeout;
+
+  /**
+   * This thread polls the timeout queue and removes any assignments which
+   * have timed out.
+   */
+  private PreferredAssignmentHandler preferredAssignmentHandlerThread;
+
+  /**
+   * Set of all regions that have a transient preferred assignment, used for
+   * quick lookup.
+   */
+  private Set<HRegionInfo> regionsWithTransientAssignment;
+
+  private final HMaster master;
+
+  public PreferredAssignmentManager(HMaster master) {
+    this.master = master;
+    this.transientAssignmentTimeout = new DelayQueue<PreferredAssignment>();
+    this.preferredAssignmentHandlerThread = new PreferredAssignmentHandler();
+    this.transientAssignments =
+        new ConcurrentHashMap<HServerAddress, Set<HRegionInfo>>();
+    this.persistentAssignments =
+        new ConcurrentHashMap<HRegionInfo, List<HServerAddress>>();
+    this.regionsWithTransientAssignment =
+        new ConcurrentSkipListSet<HRegionInfo>();
+  }
+
+  public void start() {
+    Threads.setDaemonThreadRunning(preferredAssignmentHandlerThread,
+        "RegionManager.preferredAssignmentHandler");
+  }
+
+  public void addPersistentAssignment(HRegionInfo region,
+      List<HServerAddress> servers) {
+    List<HServerAddress> oldServers = persistentAssignments.get(region);
+    persistentAssignments.put(region, servers);
+    if (servers != null && !servers.equals(oldServers)) {
+      putTransientFromPersistent(region);
+    }
+  }
+
+  public List<HServerAddress> removePersistentAssignment(HRegionInfo region) {
+    return persistentAssignments.remove(region);
+  }
+
+  public void addTransientAssignment(HServerAddress server,
+      HRegionInfo region) {
+    synchronized (transientAssignments) {
+      Set<HRegionInfo> regions = transientAssignments.get(server);
+      if (regions == null) {
+        regions = new ConcurrentSkipListSet<HRegionInfo>();
+        transientAssignments.put(server, regions);
+      }
+      regions.add(region);
+      regionsWithTransientAssignment.add(region);
+    }
+    // Add to delay queue
+    long millisecondDelay = master.getConfiguration().getLong(
+        "hbase.regionserver.preferredAssignment.regionHoldPeriod", 60000);
+    transientAssignmentTimeout.add(new PreferredAssignment(region, server,
+        System.currentTimeMillis(), millisecondDelay));
+  }
+
+  /**
+   * If the specified region has persistent preferred assignments and one of
+   * those preferred servers is not dead, then choose the first of those to be
+   * the transient preferred assignment for this region. Otherwise, no change
+   * will be made to the region's transient assignment.
+   * @param region get a transient assignment for this region
+   */
+  public void putTransientFromPersistent(HRegionInfo region) {
+    List<HServerAddress> servers = persistentAssignments.get(region);
+    if (servers != null) {
+      for (HServerAddress server : servers) {
+        HServerInfo info = master.getServerManager().getHServerInfo(server);
+        if (info != null &&
+            !master.getServerManager().isDead(info.getServerName())) {
+          addTransientAssignment(server, region);
+          return;
+        }
+      }
+    }
+  }
+
+  public boolean removeTransientAssignment(HServerAddress server,
+      HRegionInfo region) {
+    synchronized (transientAssignments) {
+      regionsWithTransientAssignment.remove(region);
+      Set<HRegionInfo> regions = transientAssignments.get(server);
+      if (regions != null) {
+        regions.remove(region);
+        if (regions.size() == 0) {
+          transientAssignments.remove(server);
+        }
+        return true;
+      }
+      return false;
+    }
+  }
+
+  public Set<HRegionInfo> getPreferredAssignments(HServerAddress server) {
+    return transientAssignments.get(server);
+  }
+
+  public List<HServerAddress> getPreferredAssignments(HRegionInfo info) {
+    return persistentAssignments.get(info);
+  }
+
+  public boolean hasPreferredAssignment(HServerAddress server) {
+    return transientAssignments.containsKey(server);
+  }
+
+  public boolean hasTransientAssignment(HRegionInfo region) {
+    return regionsWithTransientAssignment.contains(region);
+  }
+
+  public boolean hasPersistentAssignment(HRegionInfo region) {
+    return persistentAssignments.containsKey(region);
+  }
+
+  private class PreferredAssignmentHandler extends Thread {
+    public PreferredAssignmentHandler() {
+    }
+
+    @Override
+    public void run() {
+      LOG.debug("Started PreferredAssignmentHandler");
+      PreferredAssignment plan = null;
+      while (!master.getClosed().get()) {
+        try {
+          // check if any regions waiting time expired
+          plan = transientAssignmentTimeout.poll(master.getConfiguration()
+              .getInt(HConstants.THREAD_WAKE_FREQUENCY, 30 * 1000),
+              TimeUnit.MILLISECONDS);
+        } catch (InterruptedException e) {
+          // no problem, just continue
+          continue;
+        }
+        if (null == plan) {
+          continue;
+        }
+        if (removeTransientAssignment(plan.getServer(), plan.getRegionInfo())) {
+          LOG.info("Removed region from preferred assignment: " +
+              plan.getRegionInfo().getRegionNameAsString());
+        }
+      }
+    }
+  }
+
+  private class PreferredAssignment implements Delayed {
+    private long creationTime;
+    private HRegionInfo region;
+    private HServerAddress server;
+    private long millisecondDelay;
+
+    PreferredAssignment(HRegionInfo region, HServerAddress addr,
+        long creationTime, long millisecondDelay) {
+      this.region = region;
+      this.server = addr;
+      this.creationTime = creationTime;
+      this.millisecondDelay = millisecondDelay;
+    }
+
+    public HServerAddress getServer() {
+      return this.server;
+    }
+
+    public HRegionInfo getRegionInfo() {
+      return this.region;
+    }
+
+    @Override
+    public int compareTo(Delayed arg0) {
+      long delta = this.getDelay(TimeUnit.MILLISECONDS)
+          - arg0.getDelay(TimeUnit.MILLISECONDS);
+      return (this.equals(arg0) ? 0 : (delta > 0 ? 1 : (delta < 0 ? -1 : 0)));
+    }
+
+    @Override
+    public long getDelay(TimeUnit unit) {
+      return unit.convert(
+          (this.creationTime + millisecondDelay) - System.currentTimeMillis(),
+          TimeUnit.MILLISECONDS);
+    }
+
+    @Override
+    public boolean equals(Object o) {
+      if (o instanceof PreferredAssignment) {
+        PreferredAssignment assignment = (PreferredAssignment)o;
+        if (assignment.getServer().equals(this.getServer()) &&
+            assignment.getRegionInfo().equals(this.getRegionInfo())) {
+          return true;
+        }
+      }
+      return false;
+    }
+  }
+}

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/RegionManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/RegionManager.java?rev=1212714&r1=1212713&r2=1212714&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/RegionManager.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/RegionManager.java
Sat Dec 10 01:56:58 2011
@@ -34,6 +34,7 @@ import java.util.TreeMap;
 import java.util.TreeSet;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.concurrent.ConcurrentSkipListSet;
 import java.util.concurrent.DelayQueue;
 import java.util.concurrent.Delayed;
 import java.util.concurrent.TimeUnit;
@@ -87,34 +88,9 @@ public class RegionManager {
 
   private static final byte [] META_REGION_PREFIX = Bytes.toBytes(".META.,");
 
-  /**
-   * Preferred assignment map
-   * key -> Region server
-   * value -> set of regions to be assigned to this region server
-   *
-   */
-  private final Map<HServerAddress, Set<HRegionInfo>> preferredAssignmentMap
=
-                 new ConcurrentHashMap<HServerAddress, Set<HRegionInfo>>();
-
-  /**
-   * Set of all regions that have a preferred assignment, used for quick lookup
-   */
-  private final Set<HRegionInfo> regionsWithPreferredAssignment =
-                                      new TreeSet<HRegionInfo>();
-
-  /**
-   * Thread to handle timeout of Regions that have a preferred assignment.
-   */
-  private final PreferredAssignmentHandler preferredAssignmentHandlerThread;
+  final PreferredAssignmentManager assignmentManager;
 
   /**
-   * Delay queue for regions. Regions that have a "preferred assignment" are
-   * held for a particular timeout. Regions are removed from the queue after a
-   * timeout, and are assigned to the next available region server
-   */
-  private final DelayQueue<PreferredAssignment> preferredAssignmentTimeout =
-                                    new DelayQueue<PreferredAssignment>();
-  /**
    * Map key -> tableName, value -> ThrottledRegionReopener
    * An entry is created in the map before an alter operation is performed on the
    * table. It is cleared when all the regions have reopened.
@@ -204,6 +180,7 @@ public class RegionManager {
         ZooKeeperWrapper.getInstance(conf, master.getZKWrapperName());
     this.maxAssignInOneGo = conf.getInt("hbase.regions.percheckin", 10);
     this.loadBalancer = new LoadBalancer(conf);
+    this.assignmentManager = new PreferredAssignmentManager(master);
 
     // The root region
     rootScannerThread = new RootScanner(master);
@@ -211,9 +188,6 @@ public class RegionManager {
     // Scans the meta table
     metaScannerThread = new MetaScanner(master);
 
-    // Scans for preferred assignment timeout
-    this.preferredAssignmentHandlerThread = new PreferredAssignmentHandler();
-
     zooKeeperNumRetries = conf.getInt(HConstants.ZOOKEEPER_RETRIES,
         HConstants.DEFAULT_ZOOKEEPER_RETRIES);
     zooKeeperPause = conf.getInt(HConstants.ZOOKEEPER_PAUSE,
@@ -223,8 +197,7 @@ public class RegionManager {
   }
 
   void start() {
-    Threads.setDaemonThreadRunning(preferredAssignmentHandlerThread,
-    "RegionManager.preferredAssignmentHandler");
+    assignmentManager.start();
     Threads.setDaemonThreadRunning(rootScannerThread,
       "RegionManager.rootScanner");
     Threads.setDaemonThreadRunning(metaScannerThread,
@@ -522,7 +495,7 @@ public class RegionManager {
     // set of regions we want to assign to this server
     Set<RegionState> regionsToAssign = new HashSet<RegionState>();
 
-    Set<HRegionInfo> regions = preferredAssignmentMap.get(addr);
+    Set<HRegionInfo> regions = assignmentManager.getPreferredAssignments(addr);
     if (null != regions) {
       isPreferredAssignment.setValue(true);
       // One could use regionsInTransition.keySet().containsAll(regions) but
@@ -533,7 +506,7 @@ public class RegionManager {
         RegionState state = regionsInTransition.get(ri.getRegionNameAsString());
         if (null != state && state.isUnassigned()) {
           regionsToAssign.add(state);
-          removeRegionFromPreferredAssignment(addr, ri);
+          assignmentManager.removeTransientAssignment(addr, ri);
         }
       }
       StringBuilder regionNames = new StringBuilder();
@@ -600,11 +573,9 @@ public class RegionManager {
           continue;
         }
 
-        synchronized (regionsWithPreferredAssignment) {
-          // if we are holding it, don't give it away to any other server
-          if (regionsWithPreferredAssignment.contains(s.getRegionInfo())) {
-            continue;
-          }
+        // if we are holding it, don't give it away to any other server
+        if (assignmentManager.hasTransientAssignment(s.getRegionInfo())) {
+          continue;
         }
         if (assignmentByLocality && !i.isRootRegion() && !i.isMetaRegion())
{
           Text preferredHostNameTxt =
@@ -1173,6 +1144,9 @@ public class RegionManager {
     }
     if (force || (!s.isPendingOpen() && !s.isOpen())) {
       s.setUnassigned();
+      // Refresh assignment information when a region is marked unassigned so
+      // that it opens on the preferred server.
+      this.assignmentManager.putTransientFromPersistent(info);
     }
   }
 
@@ -1260,6 +1234,11 @@ public class RegionManager {
       }
       s.setClosing(serverName, setOffline);
       this.regionsInTransition.put(regionInfo.getRegionNameAsString(), s);
+      if (!setOffline) {
+        // Refresh assignment information when a region is closed and not
+        // marked offline so that it opens on the preferred server.
+        this.assignmentManager.putTransientFromPersistent(regionInfo);
+      }
     }
   }
 
@@ -1600,6 +1579,8 @@ public class RegionManager {
     }
   }
 
+
+
   /**
    * Class to balance region servers load.
    * It keeps Region Servers load in slop range by unassigning Regions
@@ -1925,83 +1906,7 @@ public class RegionManager {
     }
   }
 
-  private class PreferredAssignmentHandler extends Thread {
-    public PreferredAssignmentHandler() {
-    }
-
-    @Override
-    public void run() {
-      LOG.debug("Started PreferredAssignmentHandler");
-      PreferredAssignment plan = null;
-      while (!master.getClosed().get()) {
-        try {
-          // check if any regions waiting time expired
-          plan = preferredAssignmentTimeout.poll(master.getConfiguration()
-              .getInt(HConstants.THREAD_WAKE_FREQUENCY, 30 * 1000),
-              TimeUnit.MILLISECONDS);
-        } catch (InterruptedException e) {
-          // no problem, just continue
-          continue;
-        }
-        if (null == plan) {
-          continue;
-        }
-        if (removeRegionFromPreferredAssignment(plan.getServer(),
-            plan.getRegionInfo())) {
-          LOG.info("Removed region from preferred assignment: " +
-              plan.getRegionInfo().getRegionNameAsString());
-        }
-      }
-    }
-  }
-
-  private class PreferredAssignment implements Delayed {
-    private long creationTime;
-    private HRegionInfo region;
-    private HServerAddress server;
-    private long millisecondDelay;
-
-    PreferredAssignment(HRegionInfo region, HServerAddress addr,
-        long creationTime, long millisecondDelay) {
-      this.region = region;
-      this.server = addr;
-      this.creationTime = creationTime;
-      this.millisecondDelay = millisecondDelay;
-    }
-
-    public HServerAddress getServer() {
-      return this.server;
-    }
-
-    public HRegionInfo getRegionInfo() {
-      return this.region;
-    }
 
-    @Override
-    public int compareTo(Delayed arg0) {
-      long delta = this.getDelay(TimeUnit.MILLISECONDS)
-          - arg0.getDelay(TimeUnit.MILLISECONDS);
-      return (this.equals(arg0) ? 0 : (delta > 0 ? 1 : (delta < 0 ? -1 : 0)));
-    }
-
-    @Override
-    public long getDelay(TimeUnit unit) {
-      return unit.convert(
-          (this.creationTime + millisecondDelay) - System.currentTimeMillis(),
-          TimeUnit.MILLISECONDS);
-    }
-
-    @Override
-    public boolean equals(Object o) {
-      if (o instanceof PreferredAssignment) {
-        if (((PreferredAssignment) o).getServer().equals(this.getServer()) &&
-         ((PreferredAssignment) o).getRegionInfo().equals(this.getRegionInfo())) {
-          return true;
-        }
-      }
-      return false;
-    }
-  }
 
   /**
    * Method used to do housekeeping for holding regions for a RegionServer going
@@ -2017,56 +1922,11 @@ public class RegionManager {
     LOG.debug("Holding regions of restartng server: " +
         regionServer.getServerName());
     HServerAddress addr = regionServer.getServerAddress();
-    addRegionToPreferredAssignment(addr, regions);
-  }
-
-  public boolean hasPreferredAssignment(final HServerAddress hsa) {
-    if (preferredAssignmentMap.containsKey(hsa)) {
-      return true;
-    }
-    return false;
-  }
-
-  private void addRegionToPreferredAssignment(HServerAddress server,
-      Set<HRegionInfo> regions) {
     for (HRegionInfo region : regions) {
-      addRegionToPreferredAssignment(server, region);
+      assignmentManager.addTransientAssignment(addr, region);
     }
   }
 
-  public void addRegionToPreferredAssignment(HServerAddress server,
-      HRegionInfo region) {
-    synchronized (regionsWithPreferredAssignment) {
-      if (!preferredAssignmentMap.containsKey(server)) {
-        Set<HRegionInfo> regions = new TreeSet<HRegionInfo>();
-        preferredAssignmentMap.put(server, regions);
-      }
-      preferredAssignmentMap.get(server).add(region);
-      regionsWithPreferredAssignment.add(region);
-    }
-    // Add to delay queue
-    long millisecondDelay = master.getConfiguration().getLong(
-        "hbase.regionserver.preferredAssignment.regionHoldPeriod", 60000);
-    preferredAssignmentTimeout.add(new PreferredAssignment(region, server,
-        System.currentTimeMillis(), millisecondDelay));
-  }
-
-  private boolean removeRegionFromPreferredAssignment(HServerAddress server,
-      HRegionInfo region) {
-    synchronized (regionsWithPreferredAssignment) {
-      if (preferredAssignmentMap.containsKey(server)) {
-        preferredAssignmentMap.get(server).remove(region);
-        // If no more regions are held for this region server
-        if (preferredAssignmentMap.get(server).size() == 0) {
-          preferredAssignmentMap.remove(server);
-        }
-        regionsWithPreferredAssignment.remove(region);
-        return true;
-      }
-    }
-    return false;
-  }
-
   /**
    * Create a reopener for this table, if one exists, return the existing throttler.
    * @param tableName

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java?rev=1212714&r1=1212713&r2=1212714&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
Sat Dec 10 01:56:58 2011
@@ -813,7 +813,8 @@ public class ServerManager {
       for (Map.Entry<String, HServerLoad> entry : serversToLoad.entrySet()) {
         HServerInfo hsi = serversToServerInfo.get(entry.getKey());
         if (null != hsi) {
-          if (!this.master.getRegionManager().hasPreferredAssignment(hsi.getServerAddress()))
{
+          if (!this.master.getRegionManager().assignmentManager
+              .hasPreferredAssignment(hsi.getServerAddress())) {
             totalLoad += entry.getValue().getNumberOfRegions();
           } else {
             // Master has held some regions for this server, ignore this server

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ThrottledRegionReopener.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ThrottledRegionReopener.java?rev=1212714&r1=1212713&r2=1212714&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ThrottledRegionReopener.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ThrottledRegionReopener.java
Sat Dec 10 01:56:58 2011
@@ -179,7 +179,7 @@ public class ThrottledRegionReopener {
   public synchronized void addPreferredAssignmentForReopen(HRegionInfo region,
       HServerInfo serverInfo) {
     if (regionsBeingReopened.contains(region)) {
-      regionManager.addRegionToPreferredAssignment(
+      regionManager.assignmentManager.addTransientAssignment(
           serverInfo.getServerAddress(), region);
     }
   }



Mime
View raw message