hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [12/18] hbase-site git commit: Published site at 2a3f4a0a4eb7bb67985050b0e007576c468f217e.
Date Tue, 20 Mar 2018 14:53:44 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/648c9317/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.CompactionChecker.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.CompactionChecker.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.CompactionChecker.html
index b1c7be8..7f2e325 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.CompactionChecker.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegionServer.CompactionChecker.html
@@ -2767,1025 +2767,1030 @@
 <span class="sourceLineNo">2759</span>    configurationManager.registerObserver(region);<a name="line.2759"></a>
 <span class="sourceLineNo">2760</span>  }<a name="line.2760"></a>
 <span class="sourceLineNo">2761</span><a name="line.2761"></a>
-<span class="sourceLineNo">2762</span>  /**<a name="line.2762"></a>
-<span class="sourceLineNo">2763</span>   * @return A new Map of online regions sorted by region off-heap size with the first entry being<a name="line.2763"></a>
-<span class="sourceLineNo">2764</span>   *   the biggest.  If two regions are the same size, then the last one found wins; i.e. this<a name="line.2764"></a>
-<span class="sourceLineNo">2765</span>   *   method may NOT return all regions.<a name="line.2765"></a>
-<span class="sourceLineNo">2766</span>   */<a name="line.2766"></a>
-<span class="sourceLineNo">2767</span>  SortedMap&lt;Long, HRegion&gt; getCopyOfOnlineRegionsSortedByOffHeapSize() {<a name="line.2767"></a>
-<span class="sourceLineNo">2768</span>    // we'll sort the regions in reverse<a name="line.2768"></a>
-<span class="sourceLineNo">2769</span>    SortedMap&lt;Long, HRegion&gt; sortedRegions = new TreeMap&lt;&gt;(<a name="line.2769"></a>
-<span class="sourceLineNo">2770</span>        new Comparator&lt;Long&gt;() {<a name="line.2770"></a>
-<span class="sourceLineNo">2771</span>          @Override<a name="line.2771"></a>
-<span class="sourceLineNo">2772</span>          public int compare(Long a, Long b) {<a name="line.2772"></a>
-<span class="sourceLineNo">2773</span>            return -1 * a.compareTo(b);<a name="line.2773"></a>
-<span class="sourceLineNo">2774</span>          }<a name="line.2774"></a>
-<span class="sourceLineNo">2775</span>        });<a name="line.2775"></a>
-<span class="sourceLineNo">2776</span>    // Copy over all regions. Regions are sorted by size with biggest first.<a name="line.2776"></a>
-<span class="sourceLineNo">2777</span>    for (HRegion region : this.onlineRegions.values()) {<a name="line.2777"></a>
-<span class="sourceLineNo">2778</span>      sortedRegions.put(region.getMemStoreOffHeapSize(), region);<a name="line.2778"></a>
-<span class="sourceLineNo">2779</span>    }<a name="line.2779"></a>
-<span class="sourceLineNo">2780</span>    return sortedRegions;<a name="line.2780"></a>
-<span class="sourceLineNo">2781</span>  }<a name="line.2781"></a>
-<span class="sourceLineNo">2782</span><a name="line.2782"></a>
-<span class="sourceLineNo">2783</span>  /**<a name="line.2783"></a>
-<span class="sourceLineNo">2784</span>   * @return A new Map of online regions sorted by region heap size with the first entry being the<a name="line.2784"></a>
-<span class="sourceLineNo">2785</span>   *   biggest.  If two regions are the same size, then the last one found wins; i.e. this method<a name="line.2785"></a>
-<span class="sourceLineNo">2786</span>   *   may NOT return all regions.<a name="line.2786"></a>
-<span class="sourceLineNo">2787</span>   */<a name="line.2787"></a>
-<span class="sourceLineNo">2788</span>  SortedMap&lt;Long, HRegion&gt; getCopyOfOnlineRegionsSortedByOnHeapSize() {<a name="line.2788"></a>
-<span class="sourceLineNo">2789</span>    // we'll sort the regions in reverse<a name="line.2789"></a>
-<span class="sourceLineNo">2790</span>    SortedMap&lt;Long, HRegion&gt; sortedRegions = new TreeMap&lt;&gt;(<a name="line.2790"></a>
-<span class="sourceLineNo">2791</span>        new Comparator&lt;Long&gt;() {<a name="line.2791"></a>
-<span class="sourceLineNo">2792</span>          @Override<a name="line.2792"></a>
-<span class="sourceLineNo">2793</span>          public int compare(Long a, Long b) {<a name="line.2793"></a>
-<span class="sourceLineNo">2794</span>            return -1 * a.compareTo(b);<a name="line.2794"></a>
-<span class="sourceLineNo">2795</span>          }<a name="line.2795"></a>
-<span class="sourceLineNo">2796</span>        });<a name="line.2796"></a>
-<span class="sourceLineNo">2797</span>    // Copy over all regions. Regions are sorted by size with biggest first.<a name="line.2797"></a>
-<span class="sourceLineNo">2798</span>    for (HRegion region : this.onlineRegions.values()) {<a name="line.2798"></a>
-<span class="sourceLineNo">2799</span>      sortedRegions.put(region.getMemStoreHeapSize(), region);<a name="line.2799"></a>
-<span class="sourceLineNo">2800</span>    }<a name="line.2800"></a>
-<span class="sourceLineNo">2801</span>    return sortedRegions;<a name="line.2801"></a>
-<span class="sourceLineNo">2802</span>  }<a name="line.2802"></a>
-<span class="sourceLineNo">2803</span><a name="line.2803"></a>
-<span class="sourceLineNo">2804</span>  /**<a name="line.2804"></a>
-<span class="sourceLineNo">2805</span>   * @return time stamp in millis of when this region server was started<a name="line.2805"></a>
-<span class="sourceLineNo">2806</span>   */<a name="line.2806"></a>
-<span class="sourceLineNo">2807</span>  public long getStartcode() {<a name="line.2807"></a>
-<span class="sourceLineNo">2808</span>    return this.startcode;<a name="line.2808"></a>
-<span class="sourceLineNo">2809</span>  }<a name="line.2809"></a>
-<span class="sourceLineNo">2810</span><a name="line.2810"></a>
-<span class="sourceLineNo">2811</span>  /** @return reference to FlushRequester */<a name="line.2811"></a>
-<span class="sourceLineNo">2812</span>  @Override<a name="line.2812"></a>
-<span class="sourceLineNo">2813</span>  public FlushRequester getFlushRequester() {<a name="line.2813"></a>
-<span class="sourceLineNo">2814</span>    return this.cacheFlusher;<a name="line.2814"></a>
-<span class="sourceLineNo">2815</span>  }<a name="line.2815"></a>
-<span class="sourceLineNo">2816</span><a name="line.2816"></a>
+<span class="sourceLineNo">2762</span>  private void addRegion(SortedMap&lt;Long, Collection&lt;HRegion&gt;&gt; sortedRegions, HRegion region,<a name="line.2762"></a>
+<span class="sourceLineNo">2763</span>      long size) {<a name="line.2763"></a>
+<span class="sourceLineNo">2764</span>    if (!sortedRegions.containsKey(size)) {<a name="line.2764"></a>
+<span class="sourceLineNo">2765</span>      sortedRegions.put(size, new ArrayList&lt;&gt;());<a name="line.2765"></a>
+<span class="sourceLineNo">2766</span>    }<a name="line.2766"></a>
+<span class="sourceLineNo">2767</span>    sortedRegions.get(size).add(region);<a name="line.2767"></a>
+<span class="sourceLineNo">2768</span>  }<a name="line.2768"></a>
+<span class="sourceLineNo">2769</span>  /**<a name="line.2769"></a>
+<span class="sourceLineNo">2770</span>   * @return A new Map of online regions sorted by region off-heap size with the first entry being<a name="line.2770"></a>
+<span class="sourceLineNo">2771</span>   *   the biggest.<a name="line.2771"></a>
+<span class="sourceLineNo">2772</span>   */<a name="line.2772"></a>
+<span class="sourceLineNo">2773</span>  SortedMap&lt;Long, Collection&lt;HRegion&gt;&gt; getCopyOfOnlineRegionsSortedByOffHeapSize() {<a name="line.2773"></a>
+<span class="sourceLineNo">2774</span>    // we'll sort the regions in reverse<a name="line.2774"></a>
+<span class="sourceLineNo">2775</span>    SortedMap&lt;Long, Collection&lt;HRegion&gt;&gt; sortedRegions = new TreeMap&lt;&gt;(<a name="line.2775"></a>
+<span class="sourceLineNo">2776</span>        new Comparator&lt;Long&gt;() {<a name="line.2776"></a>
+<span class="sourceLineNo">2777</span>          @Override<a name="line.2777"></a>
+<span class="sourceLineNo">2778</span>          public int compare(Long a, Long b) {<a name="line.2778"></a>
+<span class="sourceLineNo">2779</span>            return -1 * a.compareTo(b);<a name="line.2779"></a>
+<span class="sourceLineNo">2780</span>          }<a name="line.2780"></a>
+<span class="sourceLineNo">2781</span>        });<a name="line.2781"></a>
+<span class="sourceLineNo">2782</span>    // Copy over all regions. Regions are sorted by size with biggest first.<a name="line.2782"></a>
+<span class="sourceLineNo">2783</span>    for (HRegion region : this.onlineRegions.values()) {<a name="line.2783"></a>
+<span class="sourceLineNo">2784</span>      addRegion(sortedRegions, region, region.getMemStoreOffHeapSize());<a name="line.2784"></a>
+<span class="sourceLineNo">2785</span>    }<a name="line.2785"></a>
+<span class="sourceLineNo">2786</span>    return sortedRegions;<a name="line.2786"></a>
+<span class="sourceLineNo">2787</span>  }<a name="line.2787"></a>
+<span class="sourceLineNo">2788</span><a name="line.2788"></a>
+<span class="sourceLineNo">2789</span>  /**<a name="line.2789"></a>
+<span class="sourceLineNo">2790</span>   * @return A new Map of online regions sorted by region heap size with the first entry being the<a name="line.2790"></a>
+<span class="sourceLineNo">2791</span>   *   biggest.<a name="line.2791"></a>
+<span class="sourceLineNo">2792</span>   */<a name="line.2792"></a>
+<span class="sourceLineNo">2793</span>  SortedMap&lt;Long, Collection&lt;HRegion&gt;&gt; getCopyOfOnlineRegionsSortedByOnHeapSize() {<a name="line.2793"></a>
+<span class="sourceLineNo">2794</span>    // we'll sort the regions in reverse<a name="line.2794"></a>
+<span class="sourceLineNo">2795</span>    SortedMap&lt;Long, Collection&lt;HRegion&gt;&gt; sortedRegions = new TreeMap&lt;&gt;(<a name="line.2795"></a>
+<span class="sourceLineNo">2796</span>        new Comparator&lt;Long&gt;() {<a name="line.2796"></a>
+<span class="sourceLineNo">2797</span>          @Override<a name="line.2797"></a>
+<span class="sourceLineNo">2798</span>          public int compare(Long a, Long b) {<a name="line.2798"></a>
+<span class="sourceLineNo">2799</span>            return -1 * a.compareTo(b);<a name="line.2799"></a>
+<span class="sourceLineNo">2800</span>          }<a name="line.2800"></a>
+<span class="sourceLineNo">2801</span>        });<a name="line.2801"></a>
+<span class="sourceLineNo">2802</span>    // Copy over all regions. Regions are sorted by size with biggest first.<a name="line.2802"></a>
+<span class="sourceLineNo">2803</span>    for (HRegion region : this.onlineRegions.values()) {<a name="line.2803"></a>
+<span class="sourceLineNo">2804</span>      addRegion(sortedRegions, region, region.getMemStoreHeapSize());<a name="line.2804"></a>
+<span class="sourceLineNo">2805</span>    }<a name="line.2805"></a>
+<span class="sourceLineNo">2806</span>    return sortedRegions;<a name="line.2806"></a>
+<span class="sourceLineNo">2807</span>  }<a name="line.2807"></a>
+<span class="sourceLineNo">2808</span><a name="line.2808"></a>
+<span class="sourceLineNo">2809</span>  /**<a name="line.2809"></a>
+<span class="sourceLineNo">2810</span>   * @return time stamp in millis of when this region server was started<a name="line.2810"></a>
+<span class="sourceLineNo">2811</span>   */<a name="line.2811"></a>
+<span class="sourceLineNo">2812</span>  public long getStartcode() {<a name="line.2812"></a>
+<span class="sourceLineNo">2813</span>    return this.startcode;<a name="line.2813"></a>
+<span class="sourceLineNo">2814</span>  }<a name="line.2814"></a>
+<span class="sourceLineNo">2815</span><a name="line.2815"></a>
+<span class="sourceLineNo">2816</span>  /** @return reference to FlushRequester */<a name="line.2816"></a>
 <span class="sourceLineNo">2817</span>  @Override<a name="line.2817"></a>
-<span class="sourceLineNo">2818</span>  public CompactionRequester getCompactionRequestor() {<a name="line.2818"></a>
-<span class="sourceLineNo">2819</span>    return this.compactSplitThread;<a name="line.2819"></a>
+<span class="sourceLineNo">2818</span>  public FlushRequester getFlushRequester() {<a name="line.2818"></a>
+<span class="sourceLineNo">2819</span>    return this.cacheFlusher;<a name="line.2819"></a>
 <span class="sourceLineNo">2820</span>  }<a name="line.2820"></a>
 <span class="sourceLineNo">2821</span><a name="line.2821"></a>
-<span class="sourceLineNo">2822</span>  /**<a name="line.2822"></a>
-<span class="sourceLineNo">2823</span>   * Get the top N most loaded regions this server is serving so we can tell the<a name="line.2823"></a>
-<span class="sourceLineNo">2824</span>   * master which regions it can reallocate if we're overloaded. TODO: actually<a name="line.2824"></a>
-<span class="sourceLineNo">2825</span>   * calculate which regions are most loaded. (Right now, we're just grabbing<a name="line.2825"></a>
-<span class="sourceLineNo">2826</span>   * the first N regions being served regardless of load.)<a name="line.2826"></a>
-<span class="sourceLineNo">2827</span>   */<a name="line.2827"></a>
-<span class="sourceLineNo">2828</span>  protected RegionInfo[] getMostLoadedRegions() {<a name="line.2828"></a>
-<span class="sourceLineNo">2829</span>    ArrayList&lt;RegionInfo&gt; regions = new ArrayList&lt;&gt;();<a name="line.2829"></a>
-<span class="sourceLineNo">2830</span>    for (Region r : onlineRegions.values()) {<a name="line.2830"></a>
-<span class="sourceLineNo">2831</span>      if (!r.isAvailable()) {<a name="line.2831"></a>
-<span class="sourceLineNo">2832</span>        continue;<a name="line.2832"></a>
-<span class="sourceLineNo">2833</span>      }<a name="line.2833"></a>
-<span class="sourceLineNo">2834</span>      if (regions.size() &lt; numRegionsToReport) {<a name="line.2834"></a>
-<span class="sourceLineNo">2835</span>        regions.add(r.getRegionInfo());<a name="line.2835"></a>
-<span class="sourceLineNo">2836</span>      } else {<a name="line.2836"></a>
-<span class="sourceLineNo">2837</span>        break;<a name="line.2837"></a>
+<span class="sourceLineNo">2822</span>  @Override<a name="line.2822"></a>
+<span class="sourceLineNo">2823</span>  public CompactionRequester getCompactionRequestor() {<a name="line.2823"></a>
+<span class="sourceLineNo">2824</span>    return this.compactSplitThread;<a name="line.2824"></a>
+<span class="sourceLineNo">2825</span>  }<a name="line.2825"></a>
+<span class="sourceLineNo">2826</span><a name="line.2826"></a>
+<span class="sourceLineNo">2827</span>  /**<a name="line.2827"></a>
+<span class="sourceLineNo">2828</span>   * Get the top N most loaded regions this server is serving so we can tell the<a name="line.2828"></a>
+<span class="sourceLineNo">2829</span>   * master which regions it can reallocate if we're overloaded. TODO: actually<a name="line.2829"></a>
+<span class="sourceLineNo">2830</span>   * calculate which regions are most loaded. (Right now, we're just grabbing<a name="line.2830"></a>
+<span class="sourceLineNo">2831</span>   * the first N regions being served regardless of load.)<a name="line.2831"></a>
+<span class="sourceLineNo">2832</span>   */<a name="line.2832"></a>
+<span class="sourceLineNo">2833</span>  protected RegionInfo[] getMostLoadedRegions() {<a name="line.2833"></a>
+<span class="sourceLineNo">2834</span>    ArrayList&lt;RegionInfo&gt; regions = new ArrayList&lt;&gt;();<a name="line.2834"></a>
+<span class="sourceLineNo">2835</span>    for (Region r : onlineRegions.values()) {<a name="line.2835"></a>
+<span class="sourceLineNo">2836</span>      if (!r.isAvailable()) {<a name="line.2836"></a>
+<span class="sourceLineNo">2837</span>        continue;<a name="line.2837"></a>
 <span class="sourceLineNo">2838</span>      }<a name="line.2838"></a>
-<span class="sourceLineNo">2839</span>    }<a name="line.2839"></a>
-<span class="sourceLineNo">2840</span>    return regions.toArray(new RegionInfo[regions.size()]);<a name="line.2840"></a>
-<span class="sourceLineNo">2841</span>  }<a name="line.2841"></a>
-<span class="sourceLineNo">2842</span><a name="line.2842"></a>
-<span class="sourceLineNo">2843</span>  @Override<a name="line.2843"></a>
-<span class="sourceLineNo">2844</span>  public Leases getLeases() {<a name="line.2844"></a>
-<span class="sourceLineNo">2845</span>    return leases;<a name="line.2845"></a>
+<span class="sourceLineNo">2839</span>      if (regions.size() &lt; numRegionsToReport) {<a name="line.2839"></a>
+<span class="sourceLineNo">2840</span>        regions.add(r.getRegionInfo());<a name="line.2840"></a>
+<span class="sourceLineNo">2841</span>      } else {<a name="line.2841"></a>
+<span class="sourceLineNo">2842</span>        break;<a name="line.2842"></a>
+<span class="sourceLineNo">2843</span>      }<a name="line.2843"></a>
+<span class="sourceLineNo">2844</span>    }<a name="line.2844"></a>
+<span class="sourceLineNo">2845</span>    return regions.toArray(new RegionInfo[regions.size()]);<a name="line.2845"></a>
 <span class="sourceLineNo">2846</span>  }<a name="line.2846"></a>
 <span class="sourceLineNo">2847</span><a name="line.2847"></a>
-<span class="sourceLineNo">2848</span>  /**<a name="line.2848"></a>
-<span class="sourceLineNo">2849</span>   * @return Return the rootDir.<a name="line.2849"></a>
-<span class="sourceLineNo">2850</span>   */<a name="line.2850"></a>
-<span class="sourceLineNo">2851</span>  protected Path getRootDir() {<a name="line.2851"></a>
-<span class="sourceLineNo">2852</span>    return rootDir;<a name="line.2852"></a>
-<span class="sourceLineNo">2853</span>  }<a name="line.2853"></a>
-<span class="sourceLineNo">2854</span><a name="line.2854"></a>
-<span class="sourceLineNo">2855</span>  /**<a name="line.2855"></a>
-<span class="sourceLineNo">2856</span>   * @return Return the fs.<a name="line.2856"></a>
-<span class="sourceLineNo">2857</span>   */<a name="line.2857"></a>
-<span class="sourceLineNo">2858</span>  @Override<a name="line.2858"></a>
-<span class="sourceLineNo">2859</span>  public FileSystem getFileSystem() {<a name="line.2859"></a>
-<span class="sourceLineNo">2860</span>    return fs;<a name="line.2860"></a>
-<span class="sourceLineNo">2861</span>  }<a name="line.2861"></a>
-<span class="sourceLineNo">2862</span><a name="line.2862"></a>
-<span class="sourceLineNo">2863</span>  /**<a name="line.2863"></a>
-<span class="sourceLineNo">2864</span>   * @return Return the walRootDir.<a name="line.2864"></a>
-<span class="sourceLineNo">2865</span>   */<a name="line.2865"></a>
-<span class="sourceLineNo">2866</span>  protected Path getWALRootDir() {<a name="line.2866"></a>
-<span class="sourceLineNo">2867</span>    return walRootDir;<a name="line.2867"></a>
-<span class="sourceLineNo">2868</span>  }<a name="line.2868"></a>
-<span class="sourceLineNo">2869</span><a name="line.2869"></a>
-<span class="sourceLineNo">2870</span>  /**<a name="line.2870"></a>
-<span class="sourceLineNo">2871</span>   * @return Return the walFs.<a name="line.2871"></a>
-<span class="sourceLineNo">2872</span>   */<a name="line.2872"></a>
-<span class="sourceLineNo">2873</span>  protected FileSystem getWALFileSystem() {<a name="line.2873"></a>
-<span class="sourceLineNo">2874</span>    return walFs;<a name="line.2874"></a>
-<span class="sourceLineNo">2875</span>  }<a name="line.2875"></a>
-<span class="sourceLineNo">2876</span><a name="line.2876"></a>
-<span class="sourceLineNo">2877</span>  @Override<a name="line.2877"></a>
-<span class="sourceLineNo">2878</span>  public String toString() {<a name="line.2878"></a>
-<span class="sourceLineNo">2879</span>    return getServerName().toString();<a name="line.2879"></a>
+<span class="sourceLineNo">2848</span>  @Override<a name="line.2848"></a>
+<span class="sourceLineNo">2849</span>  public Leases getLeases() {<a name="line.2849"></a>
+<span class="sourceLineNo">2850</span>    return leases;<a name="line.2850"></a>
+<span class="sourceLineNo">2851</span>  }<a name="line.2851"></a>
+<span class="sourceLineNo">2852</span><a name="line.2852"></a>
+<span class="sourceLineNo">2853</span>  /**<a name="line.2853"></a>
+<span class="sourceLineNo">2854</span>   * @return Return the rootDir.<a name="line.2854"></a>
+<span class="sourceLineNo">2855</span>   */<a name="line.2855"></a>
+<span class="sourceLineNo">2856</span>  protected Path getRootDir() {<a name="line.2856"></a>
+<span class="sourceLineNo">2857</span>    return rootDir;<a name="line.2857"></a>
+<span class="sourceLineNo">2858</span>  }<a name="line.2858"></a>
+<span class="sourceLineNo">2859</span><a name="line.2859"></a>
+<span class="sourceLineNo">2860</span>  /**<a name="line.2860"></a>
+<span class="sourceLineNo">2861</span>   * @return Return the fs.<a name="line.2861"></a>
+<span class="sourceLineNo">2862</span>   */<a name="line.2862"></a>
+<span class="sourceLineNo">2863</span>  @Override<a name="line.2863"></a>
+<span class="sourceLineNo">2864</span>  public FileSystem getFileSystem() {<a name="line.2864"></a>
+<span class="sourceLineNo">2865</span>    return fs;<a name="line.2865"></a>
+<span class="sourceLineNo">2866</span>  }<a name="line.2866"></a>
+<span class="sourceLineNo">2867</span><a name="line.2867"></a>
+<span class="sourceLineNo">2868</span>  /**<a name="line.2868"></a>
+<span class="sourceLineNo">2869</span>   * @return Return the walRootDir.<a name="line.2869"></a>
+<span class="sourceLineNo">2870</span>   */<a name="line.2870"></a>
+<span class="sourceLineNo">2871</span>  protected Path getWALRootDir() {<a name="line.2871"></a>
+<span class="sourceLineNo">2872</span>    return walRootDir;<a name="line.2872"></a>
+<span class="sourceLineNo">2873</span>  }<a name="line.2873"></a>
+<span class="sourceLineNo">2874</span><a name="line.2874"></a>
+<span class="sourceLineNo">2875</span>  /**<a name="line.2875"></a>
+<span class="sourceLineNo">2876</span>   * @return Return the walFs.<a name="line.2876"></a>
+<span class="sourceLineNo">2877</span>   */<a name="line.2877"></a>
+<span class="sourceLineNo">2878</span>  protected FileSystem getWALFileSystem() {<a name="line.2878"></a>
+<span class="sourceLineNo">2879</span>    return walFs;<a name="line.2879"></a>
 <span class="sourceLineNo">2880</span>  }<a name="line.2880"></a>
 <span class="sourceLineNo">2881</span><a name="line.2881"></a>
-<span class="sourceLineNo">2882</span>  /**<a name="line.2882"></a>
-<span class="sourceLineNo">2883</span>   * Interval at which threads should run<a name="line.2883"></a>
-<span class="sourceLineNo">2884</span>   *<a name="line.2884"></a>
-<span class="sourceLineNo">2885</span>   * @return the interval<a name="line.2885"></a>
-<span class="sourceLineNo">2886</span>   */<a name="line.2886"></a>
-<span class="sourceLineNo">2887</span>  public int getThreadWakeFrequency() {<a name="line.2887"></a>
-<span class="sourceLineNo">2888</span>    return threadWakeFrequency;<a name="line.2888"></a>
-<span class="sourceLineNo">2889</span>  }<a name="line.2889"></a>
-<span class="sourceLineNo">2890</span><a name="line.2890"></a>
-<span class="sourceLineNo">2891</span>  @Override<a name="line.2891"></a>
-<span class="sourceLineNo">2892</span>  public ZKWatcher getZooKeeper() {<a name="line.2892"></a>
-<span class="sourceLineNo">2893</span>    return zooKeeper;<a name="line.2893"></a>
+<span class="sourceLineNo">2882</span>  @Override<a name="line.2882"></a>
+<span class="sourceLineNo">2883</span>  public String toString() {<a name="line.2883"></a>
+<span class="sourceLineNo">2884</span>    return getServerName().toString();<a name="line.2884"></a>
+<span class="sourceLineNo">2885</span>  }<a name="line.2885"></a>
+<span class="sourceLineNo">2886</span><a name="line.2886"></a>
+<span class="sourceLineNo">2887</span>  /**<a name="line.2887"></a>
+<span class="sourceLineNo">2888</span>   * Interval at which threads should run<a name="line.2888"></a>
+<span class="sourceLineNo">2889</span>   *<a name="line.2889"></a>
+<span class="sourceLineNo">2890</span>   * @return the interval<a name="line.2890"></a>
+<span class="sourceLineNo">2891</span>   */<a name="line.2891"></a>
+<span class="sourceLineNo">2892</span>  public int getThreadWakeFrequency() {<a name="line.2892"></a>
+<span class="sourceLineNo">2893</span>    return threadWakeFrequency;<a name="line.2893"></a>
 <span class="sourceLineNo">2894</span>  }<a name="line.2894"></a>
 <span class="sourceLineNo">2895</span><a name="line.2895"></a>
 <span class="sourceLineNo">2896</span>  @Override<a name="line.2896"></a>
-<span class="sourceLineNo">2897</span>  public CoordinatedStateManager getCoordinatedStateManager() {<a name="line.2897"></a>
-<span class="sourceLineNo">2898</span>    return csm;<a name="line.2898"></a>
+<span class="sourceLineNo">2897</span>  public ZKWatcher getZooKeeper() {<a name="line.2897"></a>
+<span class="sourceLineNo">2898</span>    return zooKeeper;<a name="line.2898"></a>
 <span class="sourceLineNo">2899</span>  }<a name="line.2899"></a>
 <span class="sourceLineNo">2900</span><a name="line.2900"></a>
 <span class="sourceLineNo">2901</span>  @Override<a name="line.2901"></a>
-<span class="sourceLineNo">2902</span>  public ServerName getServerName() {<a name="line.2902"></a>
-<span class="sourceLineNo">2903</span>    return serverName;<a name="line.2903"></a>
+<span class="sourceLineNo">2902</span>  public CoordinatedStateManager getCoordinatedStateManager() {<a name="line.2902"></a>
+<span class="sourceLineNo">2903</span>    return csm;<a name="line.2903"></a>
 <span class="sourceLineNo">2904</span>  }<a name="line.2904"></a>
 <span class="sourceLineNo">2905</span><a name="line.2905"></a>
-<span class="sourceLineNo">2906</span>  public RegionServerCoprocessorHost getRegionServerCoprocessorHost(){<a name="line.2906"></a>
-<span class="sourceLineNo">2907</span>    return this.rsHost;<a name="line.2907"></a>
-<span class="sourceLineNo">2908</span>  }<a name="line.2908"></a>
-<span class="sourceLineNo">2909</span><a name="line.2909"></a>
-<span class="sourceLineNo">2910</span>  @Override<a name="line.2910"></a>
-<span class="sourceLineNo">2911</span>  public ConcurrentMap&lt;byte[], Boolean&gt; getRegionsInTransitionInRS() {<a name="line.2911"></a>
-<span class="sourceLineNo">2912</span>    return this.regionsInTransitionInRS;<a name="line.2912"></a>
+<span class="sourceLineNo">2906</span>  @Override<a name="line.2906"></a>
+<span class="sourceLineNo">2907</span>  public ServerName getServerName() {<a name="line.2907"></a>
+<span class="sourceLineNo">2908</span>    return serverName;<a name="line.2908"></a>
+<span class="sourceLineNo">2909</span>  }<a name="line.2909"></a>
+<span class="sourceLineNo">2910</span><a name="line.2910"></a>
+<span class="sourceLineNo">2911</span>  public RegionServerCoprocessorHost getRegionServerCoprocessorHost(){<a name="line.2911"></a>
+<span class="sourceLineNo">2912</span>    return this.rsHost;<a name="line.2912"></a>
 <span class="sourceLineNo">2913</span>  }<a name="line.2913"></a>
 <span class="sourceLineNo">2914</span><a name="line.2914"></a>
 <span class="sourceLineNo">2915</span>  @Override<a name="line.2915"></a>
-<span class="sourceLineNo">2916</span>  public ExecutorService getExecutorService() {<a name="line.2916"></a>
-<span class="sourceLineNo">2917</span>    return executorService;<a name="line.2917"></a>
+<span class="sourceLineNo">2916</span>  public ConcurrentMap&lt;byte[], Boolean&gt; getRegionsInTransitionInRS() {<a name="line.2916"></a>
+<span class="sourceLineNo">2917</span>    return this.regionsInTransitionInRS;<a name="line.2917"></a>
 <span class="sourceLineNo">2918</span>  }<a name="line.2918"></a>
 <span class="sourceLineNo">2919</span><a name="line.2919"></a>
 <span class="sourceLineNo">2920</span>  @Override<a name="line.2920"></a>
-<span class="sourceLineNo">2921</span>  public ChoreService getChoreService() {<a name="line.2921"></a>
-<span class="sourceLineNo">2922</span>    return choreService;<a name="line.2922"></a>
+<span class="sourceLineNo">2921</span>  public ExecutorService getExecutorService() {<a name="line.2921"></a>
+<span class="sourceLineNo">2922</span>    return executorService;<a name="line.2922"></a>
 <span class="sourceLineNo">2923</span>  }<a name="line.2923"></a>
 <span class="sourceLineNo">2924</span><a name="line.2924"></a>
 <span class="sourceLineNo">2925</span>  @Override<a name="line.2925"></a>
-<span class="sourceLineNo">2926</span>  public RegionServerRpcQuotaManager getRegionServerRpcQuotaManager() {<a name="line.2926"></a>
-<span class="sourceLineNo">2927</span>    return rsQuotaManager;<a name="line.2927"></a>
+<span class="sourceLineNo">2926</span>  public ChoreService getChoreService() {<a name="line.2926"></a>
+<span class="sourceLineNo">2927</span>    return choreService;<a name="line.2927"></a>
 <span class="sourceLineNo">2928</span>  }<a name="line.2928"></a>
 <span class="sourceLineNo">2929</span><a name="line.2929"></a>
-<span class="sourceLineNo">2930</span>  //<a name="line.2930"></a>
-<span class="sourceLineNo">2931</span>  // Main program and support routines<a name="line.2931"></a>
-<span class="sourceLineNo">2932</span>  //<a name="line.2932"></a>
-<span class="sourceLineNo">2933</span>  /**<a name="line.2933"></a>
-<span class="sourceLineNo">2934</span>   * Load the replication executorService objects, if any<a name="line.2934"></a>
-<span class="sourceLineNo">2935</span>   */<a name="line.2935"></a>
-<span class="sourceLineNo">2936</span>  private static void createNewReplicationInstance(Configuration conf, HRegionServer server,<a name="line.2936"></a>
-<span class="sourceLineNo">2937</span>      FileSystem walFs, Path walDir, Path oldWALDir, WALProvider walProvider) throws IOException {<a name="line.2937"></a>
-<span class="sourceLineNo">2938</span>    if ((server instanceof HMaster) &amp;&amp;<a name="line.2938"></a>
-<span class="sourceLineNo">2939</span>      (!LoadBalancer.isTablesOnMaster(conf) || LoadBalancer.isSystemTablesOnlyOnMaster(conf))) {<a name="line.2939"></a>
-<span class="sourceLineNo">2940</span>      return;<a name="line.2940"></a>
-<span class="sourceLineNo">2941</span>    }<a name="line.2941"></a>
-<span class="sourceLineNo">2942</span><a name="line.2942"></a>
-<span class="sourceLineNo">2943</span>    // read in the name of the source replication class from the config file.<a name="line.2943"></a>
-<span class="sourceLineNo">2944</span>    String sourceClassname = conf.get(HConstants.REPLICATION_SOURCE_SERVICE_CLASSNAME,<a name="line.2944"></a>
-<span class="sourceLineNo">2945</span>      HConstants.REPLICATION_SERVICE_CLASSNAME_DEFAULT);<a name="line.2945"></a>
-<span class="sourceLineNo">2946</span><a name="line.2946"></a>
-<span class="sourceLineNo">2947</span>    // read in the name of the sink replication class from the config file.<a name="line.2947"></a>
-<span class="sourceLineNo">2948</span>    String sinkClassname = conf.get(HConstants.REPLICATION_SINK_SERVICE_CLASSNAME,<a name="line.2948"></a>
-<span class="sourceLineNo">2949</span>      HConstants.REPLICATION_SERVICE_CLASSNAME_DEFAULT);<a name="line.2949"></a>
-<span class="sourceLineNo">2950</span><a name="line.2950"></a>
-<span class="sourceLineNo">2951</span>    // If both the sink and the source class names are the same, then instantiate<a name="line.2951"></a>
-<span class="sourceLineNo">2952</span>    // only one object.<a name="line.2952"></a>
-<span class="sourceLineNo">2953</span>    if (sourceClassname.equals(sinkClassname)) {<a name="line.2953"></a>
-<span class="sourceLineNo">2954</span>      server.replicationSourceHandler = newReplicationInstance(sourceClassname,<a name="line.2954"></a>
-<span class="sourceLineNo">2955</span>        ReplicationSourceService.class, conf, server, walFs, walDir, oldWALDir, walProvider);<a name="line.2955"></a>
-<span class="sourceLineNo">2956</span>      server.replicationSinkHandler = (ReplicationSinkService) server.replicationSourceHandler;<a name="line.2956"></a>
-<span class="sourceLineNo">2957</span>    } else {<a name="line.2957"></a>
-<span class="sourceLineNo">2958</span>      server.replicationSourceHandler = newReplicationInstance(sourceClassname,<a name="line.2958"></a>
-<span class="sourceLineNo">2959</span>        ReplicationSourceService.class, conf, server, walFs, walDir, oldWALDir, walProvider);<a name="line.2959"></a>
-<span class="sourceLineNo">2960</span>      server.replicationSinkHandler = newReplicationInstance(sinkClassname,<a name="line.2960"></a>
-<span class="sourceLineNo">2961</span>        ReplicationSinkService.class, conf, server, walFs, walDir, oldWALDir, walProvider);<a name="line.2961"></a>
-<span class="sourceLineNo">2962</span>    }<a name="line.2962"></a>
-<span class="sourceLineNo">2963</span>  }<a name="line.2963"></a>
-<span class="sourceLineNo">2964</span><a name="line.2964"></a>
-<span class="sourceLineNo">2965</span>  private static &lt;T extends ReplicationService&gt; T newReplicationInstance(String classname,<a name="line.2965"></a>
-<span class="sourceLineNo">2966</span>      Class&lt;T&gt; xface, Configuration conf, HRegionServer server, FileSystem walFs, Path logDir,<a name="line.2966"></a>
-<span class="sourceLineNo">2967</span>      Path oldLogDir, WALProvider walProvider) throws IOException {<a name="line.2967"></a>
-<span class="sourceLineNo">2968</span>    Class&lt;? extends T&gt; clazz = null;<a name="line.2968"></a>
-<span class="sourceLineNo">2969</span>    try {<a name="line.2969"></a>
-<span class="sourceLineNo">2970</span>      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();<a name="line.2970"></a>
-<span class="sourceLineNo">2971</span>      clazz = Class.forName(classname, true, classLoader).asSubclass(xface);<a name="line.2971"></a>
-<span class="sourceLineNo">2972</span>    } catch (java.lang.ClassNotFoundException nfe) {<a name="line.2972"></a>
-<span class="sourceLineNo">2973</span>      throw new IOException("Could not find class for " + classname);<a name="line.2973"></a>
-<span class="sourceLineNo">2974</span>    }<a name="line.2974"></a>
-<span class="sourceLineNo">2975</span>    T service = ReflectionUtils.newInstance(clazz, conf);<a name="line.2975"></a>
-<span class="sourceLineNo">2976</span>    service.initialize(server, walFs, logDir, oldLogDir, walProvider);<a name="line.2976"></a>
-<span class="sourceLineNo">2977</span>    return service;<a name="line.2977"></a>
-<span class="sourceLineNo">2978</span>  }<a name="line.2978"></a>
-<span class="sourceLineNo">2979</span><a name="line.2979"></a>
-<span class="sourceLineNo">2980</span>  /**<a name="line.2980"></a>
-<span class="sourceLineNo">2981</span>   * Utility for constructing an instance of the passed HRegionServer class.<a name="line.2981"></a>
-<span class="sourceLineNo">2982</span>   *<a name="line.2982"></a>
-<span class="sourceLineNo">2983</span>   * @param regionServerClass<a name="line.2983"></a>
-<span class="sourceLineNo">2984</span>   * @param conf2<a name="line.2984"></a>
-<span class="sourceLineNo">2985</span>   * @return HRegionServer instance.<a name="line.2985"></a>
-<span class="sourceLineNo">2986</span>   */<a name="line.2986"></a>
-<span class="sourceLineNo">2987</span>  public static HRegionServer constructRegionServer(<a name="line.2987"></a>
-<span class="sourceLineNo">2988</span>      Class&lt;? extends HRegionServer&gt; regionServerClass,<a name="line.2988"></a>
-<span class="sourceLineNo">2989</span>      final Configuration conf2) {<a name="line.2989"></a>
-<span class="sourceLineNo">2990</span>    try {<a name="line.2990"></a>
-<span class="sourceLineNo">2991</span>      Constructor&lt;? extends HRegionServer&gt; c = regionServerClass<a name="line.2991"></a>
-<span class="sourceLineNo">2992</span>          .getConstructor(Configuration.class);<a name="line.2992"></a>
-<span class="sourceLineNo">2993</span>      return c.newInstance(conf2);<a name="line.2993"></a>
-<span class="sourceLineNo">2994</span>    } catch (Exception e) {<a name="line.2994"></a>
-<span class="sourceLineNo">2995</span>      throw new RuntimeException("Failed construction of " + "Regionserver: "<a name="line.2995"></a>
-<span class="sourceLineNo">2996</span>          + regionServerClass.toString(), e);<a name="line.2996"></a>
-<span class="sourceLineNo">2997</span>    }<a name="line.2997"></a>
-<span class="sourceLineNo">2998</span>  }<a name="line.2998"></a>
-<span class="sourceLineNo">2999</span><a name="line.2999"></a>
-<span class="sourceLineNo">3000</span>  /**<a name="line.3000"></a>
-<span class="sourceLineNo">3001</span>   * @see org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine<a name="line.3001"></a>
-<span class="sourceLineNo">3002</span>   */<a name="line.3002"></a>
-<span class="sourceLineNo">3003</span>  public static void main(String[] args) throws Exception {<a name="line.3003"></a>
-<span class="sourceLineNo">3004</span>    LOG.info("STARTING executorService " + HRegionServer.class.getSimpleName());<a name="line.3004"></a>
-<span class="sourceLineNo">3005</span>    VersionInfo.logVersion();<a name="line.3005"></a>
-<span class="sourceLineNo">3006</span>    Configuration conf = HBaseConfiguration.create();<a name="line.3006"></a>
-<span class="sourceLineNo">3007</span>    @SuppressWarnings("unchecked")<a name="line.3007"></a>
-<span class="sourceLineNo">3008</span>    Class&lt;? extends HRegionServer&gt; regionServerClass = (Class&lt;? extends HRegionServer&gt;) conf<a name="line.3008"></a>
-<span class="sourceLineNo">3009</span>        .getClass(HConstants.REGION_SERVER_IMPL, HRegionServer.class);<a name="line.3009"></a>
-<span class="sourceLineNo">3010</span><a name="line.3010"></a>
-<span class="sourceLineNo">3011</span>    new HRegionServerCommandLine(regionServerClass).doMain(args);<a name="line.3011"></a>
-<span class="sourceLineNo">3012</span>  }<a name="line.3012"></a>
-<span class="sourceLineNo">3013</span><a name="line.3013"></a>
-<span class="sourceLineNo">3014</span>  /**<a name="line.3014"></a>
-<span class="sourceLineNo">3015</span>   * Gets the online regions of the specified table.<a name="line.3015"></a>
-<span class="sourceLineNo">3016</span>   * This method looks at the in-memory onlineRegions.  It does not go to &lt;code&gt;hbase:meta&lt;/code&gt;.<a name="line.3016"></a>
-<span class="sourceLineNo">3017</span>   * Only returns &lt;em&gt;online&lt;/em&gt; regions.  If a region on this table has been<a name="line.3017"></a>
-<span class="sourceLineNo">3018</span>   * closed during a disable, etc., it will not be included in the returned list.<a name="line.3018"></a>
-<span class="sourceLineNo">3019</span>   * So, the returned list may not necessarily be ALL regions in this table, its<a name="line.3019"></a>
-<span class="sourceLineNo">3020</span>   * all the ONLINE regions in the table.<a name="line.3020"></a>
-<span class="sourceLineNo">3021</span>   * @param tableName<a name="line.3021"></a>
-<span class="sourceLineNo">3022</span>   * @return Online regions from &lt;code&gt;tableName&lt;/code&gt;<a name="line.3022"></a>
-<span class="sourceLineNo">3023</span>   */<a name="line.3023"></a>
-<span class="sourceLineNo">3024</span>  @Override<a name="line.3024"></a>
-<span class="sourceLineNo">3025</span>  public List&lt;HRegion&gt; getRegions(TableName tableName) {<a name="line.3025"></a>
-<span class="sourceLineNo">3026</span>     List&lt;HRegion&gt; tableRegions = new ArrayList&lt;&gt;();<a name="line.3026"></a>
-<span class="sourceLineNo">3027</span>     synchronized (this.onlineRegions) {<a name="line.3027"></a>
-<span class="sourceLineNo">3028</span>       for (HRegion region: this.onlineRegions.values()) {<a name="line.3028"></a>
-<span class="sourceLineNo">3029</span>         RegionInfo regionInfo = region.getRegionInfo();<a name="line.3029"></a>
-<span class="sourceLineNo">3030</span>         if(regionInfo.getTable().equals(tableName)) {<a name="line.3030"></a>
-<span class="sourceLineNo">3031</span>           tableRegions.add(region);<a name="line.3031"></a>
-<span class="sourceLineNo">3032</span>         }<a name="line.3032"></a>
-<span class="sourceLineNo">3033</span>       }<a name="line.3033"></a>
-<span class="sourceLineNo">3034</span>     }<a name="line.3034"></a>
-<span class="sourceLineNo">3035</span>     return tableRegions;<a name="line.3035"></a>
-<span class="sourceLineNo">3036</span>   }<a name="line.3036"></a>
-<span class="sourceLineNo">3037</span><a name="line.3037"></a>
-<span class="sourceLineNo">3038</span>  @Override<a name="line.3038"></a>
-<span class="sourceLineNo">3039</span>  public List&lt;HRegion&gt; getRegions() {<a name="line.3039"></a>
-<span class="sourceLineNo">3040</span>    List&lt;HRegion&gt; allRegions = new ArrayList&lt;&gt;();<a name="line.3040"></a>
-<span class="sourceLineNo">3041</span>    synchronized (this.onlineRegions) {<a name="line.3041"></a>
-<span class="sourceLineNo">3042</span>      // Return a clone copy of the onlineRegions<a name="line.3042"></a>
-<span class="sourceLineNo">3043</span>      allRegions.addAll(onlineRegions.values());<a name="line.3043"></a>
-<span class="sourceLineNo">3044</span>    }<a name="line.3044"></a>
-<span class="sourceLineNo">3045</span>    return allRegions;<a name="line.3045"></a>
-<span class="sourceLineNo">3046</span>  }<a name="line.3046"></a>
-<span class="sourceLineNo">3047</span><a name="line.3047"></a>
-<span class="sourceLineNo">3048</span>  /**<a name="line.3048"></a>
-<span class="sourceLineNo">3049</span>   * Gets the online tables in this RS.<a name="line.3049"></a>
-<span class="sourceLineNo">3050</span>   * This method looks at the in-memory onlineRegions.<a name="line.3050"></a>
-<span class="sourceLineNo">3051</span>   * @return all the online tables in this RS<a name="line.3051"></a>
-<span class="sourceLineNo">3052</span>   */<a name="line.3052"></a>
-<span class="sourceLineNo">3053</span>  public Set&lt;TableName&gt; getOnlineTables() {<a name="line.3053"></a>
-<span class="sourceLineNo">3054</span>    Set&lt;TableName&gt; tables = new HashSet&lt;&gt;();<a name="line.3054"></a>
-<span class="sourceLineNo">3055</span>    synchronized (this.onlineRegions) {<a name="line.3055"></a>
-<span class="sourceLineNo">3056</span>      for (Region region: this.onlineRegions.values()) {<a name="line.3056"></a>
-<span class="sourceLineNo">3057</span>        tables.add(region.getTableDescriptor().getTableName());<a name="line.3057"></a>
-<span class="sourceLineNo">3058</span>      }<a name="line.3058"></a>
-<span class="sourceLineNo">3059</span>    }<a name="line.3059"></a>
-<span class="sourceLineNo">3060</span>    return tables;<a name="line.3060"></a>
-<span class="sourceLineNo">3061</span>  }<a name="line.3061"></a>
-<span class="sourceLineNo">3062</span><a name="line.3062"></a>
-<span class="sourceLineNo">3063</span>  // used by org/apache/hbase/tmpl/regionserver/RSStatusTmpl.jamon (HBASE-4070).<a name="line.3063"></a>
-<span class="sourceLineNo">3064</span>  public String[] getRegionServerCoprocessors() {<a name="line.3064"></a>
-<span class="sourceLineNo">3065</span>    TreeSet&lt;String&gt; coprocessors = new TreeSet&lt;&gt;();<a name="line.3065"></a>
-<span class="sourceLineNo">3066</span>    try {<a name="line.3066"></a>
-<span class="sourceLineNo">3067</span>      coprocessors.addAll(getWAL(null).getCoprocessorHost().getCoprocessors());<a name="line.3067"></a>
-<span class="sourceLineNo">3068</span>    } catch (IOException exception) {<a name="line.3068"></a>
-<span class="sourceLineNo">3069</span>      LOG.warn("Exception attempting to fetch wal coprocessor information for the common wal; " +<a name="line.3069"></a>
-<span class="sourceLineNo">3070</span>          "skipping.");<a name="line.3070"></a>
-<span class="sourceLineNo">3071</span>      LOG.debug("Exception details for failure to fetch wal coprocessor information.", exception);<a name="line.3071"></a>
-<span class="sourceLineNo">3072</span>    }<a name="line.3072"></a>
-<span class="sourceLineNo">3073</span>    Collection&lt;HRegion&gt; regions = getOnlineRegionsLocalContext();<a name="line.3073"></a>
-<span class="sourceLineNo">3074</span>    for (HRegion region: regions) {<a name="line.3074"></a>
-<span class="sourceLineNo">3075</span>      coprocessors.addAll(region.getCoprocessorHost().getCoprocessors());<a name="line.3075"></a>
-<span class="sourceLineNo">3076</span>      try {<a name="line.3076"></a>
-<span class="sourceLineNo">3077</span>        coprocessors.addAll(getWAL(region.getRegionInfo()).getCoprocessorHost().getCoprocessors());<a name="line.3077"></a>
-<span class="sourceLineNo">3078</span>      } catch (IOException exception) {<a name="line.3078"></a>
-<span class="sourceLineNo">3079</span>        LOG.warn("Exception attempting to fetch wal coprocessor information for region " + region +<a name="line.3079"></a>
-<span class="sourceLineNo">3080</span>            "; skipping.");<a name="line.3080"></a>
-<span class="sourceLineNo">3081</span>        LOG.debug("Exception details for failure to fetch wal coprocessor information.", exception);<a name="line.3081"></a>
-<span class="sourceLineNo">3082</span>      }<a name="line.3082"></a>
-<span class="sourceLineNo">3083</span>    }<a name="line.3083"></a>
-<span class="sourceLineNo">3084</span>    coprocessors.addAll(rsHost.getCoprocessors());<a name="line.3084"></a>
-<span class="sourceLineNo">3085</span>    return coprocessors.toArray(new String[coprocessors.size()]);<a name="line.3085"></a>
-<span class="sourceLineNo">3086</span>  }<a name="line.3086"></a>
-<span class="sourceLineNo">3087</span><a name="line.3087"></a>
-<span class="sourceLineNo">3088</span>  /**<a name="line.3088"></a>
-<span class="sourceLineNo">3089</span>   * Try to close the region, logs a warning on failure but continues.<a name="line.3089"></a>
-<span class="sourceLineNo">3090</span>   * @param region Region to close<a name="line.3090"></a>
-<span class="sourceLineNo">3091</span>   */<a name="line.3091"></a>
-<span class="sourceLineNo">3092</span>  private void closeRegionIgnoreErrors(RegionInfo region, final boolean abort) {<a name="line.3092"></a>
-<span class="sourceLineNo">3093</span>    try {<a name="line.3093"></a>
-<span class="sourceLineNo">3094</span>      if (!closeRegion(region.getEncodedName(), abort, null)) {<a name="line.3094"></a>
-<span class="sourceLineNo">3095</span>        LOG.warn("Failed to close " + region.getRegionNameAsString() +<a name="line.3095"></a>
-<span class="sourceLineNo">3096</span>            " - ignoring and continuing");<a name="line.3096"></a>
-<span class="sourceLineNo">3097</span>      }<a name="line.3097"></a>
-<span class="sourceLineNo">3098</span>    } catch (IOException e) {<a name="line.3098"></a>
-<span class="sourceLineNo">3099</span>      LOG.warn("Failed to close " + region.getRegionNameAsString() +<a name="line.3099"></a>
-<span class="sourceLineNo">3100</span>          " - ignoring and continuing", e);<a name="line.3100"></a>
-<span class="sourceLineNo">3101</span>    }<a name="line.3101"></a>
-<span class="sourceLineNo">3102</span>  }<a name="line.3102"></a>
-<span class="sourceLineNo">3103</span><a name="line.3103"></a>
-<span class="sourceLineNo">3104</span>  /**<a name="line.3104"></a>
-<span class="sourceLineNo">3105</span>   * Close asynchronously a region, can be called from the master or internally by the regionserver<a name="line.3105"></a>
-<span class="sourceLineNo">3106</span>   * when stopping. If called from the master, the region will update the znode status.<a name="line.3106"></a>
-<span class="sourceLineNo">3107</span>   *<a name="line.3107"></a>
-<span class="sourceLineNo">3108</span>   * &lt;p&gt;<a name="line.3108"></a>
-<span class="sourceLineNo">3109</span>   * If an opening was in progress, this method will cancel it, but will not start a new close. The<a name="line.3109"></a>
-<span class="sourceLineNo">3110</span>   * coprocessors are not called in this case. A NotServingRegionException exception is thrown.<a name="line.3110"></a>
-<span class="sourceLineNo">3111</span>   * &lt;/p&gt;<a name="line.3111"></a>
-<span class="sourceLineNo">3112</span><a name="line.3112"></a>
+<span class="sourceLineNo">2930</span>  @Override<a name="line.2930"></a>
+<span class="sourceLineNo">2931</span>  public RegionServerRpcQuotaManager getRegionServerRpcQuotaManager() {<a name="line.2931"></a>
+<span class="sourceLineNo">2932</span>    return rsQuotaManager;<a name="line.2932"></a>
+<span class="sourceLineNo">2933</span>  }<a name="line.2933"></a>
+<span class="sourceLineNo">2934</span><a name="line.2934"></a>
+<span class="sourceLineNo">2935</span>  //<a name="line.2935"></a>
+<span class="sourceLineNo">2936</span>  // Main program and support routines<a name="line.2936"></a>
+<span class="sourceLineNo">2937</span>  //<a name="line.2937"></a>
+<span class="sourceLineNo">2938</span>  /**<a name="line.2938"></a>
+<span class="sourceLineNo">2939</span>   * Load the replication executorService objects, if any<a name="line.2939"></a>
+<span class="sourceLineNo">2940</span>   */<a name="line.2940"></a>
+<span class="sourceLineNo">2941</span>  private static void createNewReplicationInstance(Configuration conf, HRegionServer server,<a name="line.2941"></a>
+<span class="sourceLineNo">2942</span>      FileSystem walFs, Path walDir, Path oldWALDir, WALProvider walProvider) throws IOException {<a name="line.2942"></a>
+<span class="sourceLineNo">2943</span>    if ((server instanceof HMaster) &amp;&amp;<a name="line.2943"></a>
+<span class="sourceLineNo">2944</span>      (!LoadBalancer.isTablesOnMaster(conf) || LoadBalancer.isSystemTablesOnlyOnMaster(conf))) {<a name="line.2944"></a>
+<span class="sourceLineNo">2945</span>      return;<a name="line.2945"></a>
+<span class="sourceLineNo">2946</span>    }<a name="line.2946"></a>
+<span class="sourceLineNo">2947</span><a name="line.2947"></a>
+<span class="sourceLineNo">2948</span>    // read in the name of the source replication class from the config file.<a name="line.2948"></a>
+<span class="sourceLineNo">2949</span>    String sourceClassname = conf.get(HConstants.REPLICATION_SOURCE_SERVICE_CLASSNAME,<a name="line.2949"></a>
+<span class="sourceLineNo">2950</span>      HConstants.REPLICATION_SERVICE_CLASSNAME_DEFAULT);<a name="line.2950"></a>
+<span class="sourceLineNo">2951</span><a name="line.2951"></a>
+<span class="sourceLineNo">2952</span>    // read in the name of the sink replication class from the config file.<a name="line.2952"></a>
+<span class="sourceLineNo">2953</span>    String sinkClassname = conf.get(HConstants.REPLICATION_SINK_SERVICE_CLASSNAME,<a name="line.2953"></a>
+<span class="sourceLineNo">2954</span>      HConstants.REPLICATION_SERVICE_CLASSNAME_DEFAULT);<a name="line.2954"></a>
+<span class="sourceLineNo">2955</span><a name="line.2955"></a>
+<span class="sourceLineNo">2956</span>    // If both the sink and the source class names are the same, then instantiate<a name="line.2956"></a>
+<span class="sourceLineNo">2957</span>    // only one object.<a name="line.2957"></a>
+<span class="sourceLineNo">2958</span>    if (sourceClassname.equals(sinkClassname)) {<a name="line.2958"></a>
+<span class="sourceLineNo">2959</span>      server.replicationSourceHandler = newReplicationInstance(sourceClassname,<a name="line.2959"></a>
+<span class="sourceLineNo">2960</span>        ReplicationSourceService.class, conf, server, walFs, walDir, oldWALDir, walProvider);<a name="line.2960"></a>
+<span class="sourceLineNo">2961</span>      server.replicationSinkHandler = (ReplicationSinkService) server.replicationSourceHandler;<a name="line.2961"></a>
+<span class="sourceLineNo">2962</span>    } else {<a name="line.2962"></a>
+<span class="sourceLineNo">2963</span>      server.replicationSourceHandler = newReplicationInstance(sourceClassname,<a name="line.2963"></a>
+<span class="sourceLineNo">2964</span>        ReplicationSourceService.class, conf, server, walFs, walDir, oldWALDir, walProvider);<a name="line.2964"></a>
+<span class="sourceLineNo">2965</span>      server.replicationSinkHandler = newReplicationInstance(sinkClassname,<a name="line.2965"></a>
+<span class="sourceLineNo">2966</span>        ReplicationSinkService.class, conf, server, walFs, walDir, oldWALDir, walProvider);<a name="line.2966"></a>
+<span class="sourceLineNo">2967</span>    }<a name="line.2967"></a>
+<span class="sourceLineNo">2968</span>  }<a name="line.2968"></a>
+<span class="sourceLineNo">2969</span><a name="line.2969"></a>
+<span class="sourceLineNo">2970</span>  private static &lt;T extends ReplicationService&gt; T newReplicationInstance(String classname,<a name="line.2970"></a>
+<span class="sourceLineNo">2971</span>      Class&lt;T&gt; xface, Configuration conf, HRegionServer server, FileSystem walFs, Path logDir,<a name="line.2971"></a>
+<span class="sourceLineNo">2972</span>      Path oldLogDir, WALProvider walProvider) throws IOException {<a name="line.2972"></a>
+<span class="sourceLineNo">2973</span>    Class&lt;? extends T&gt; clazz = null;<a name="line.2973"></a>
+<span class="sourceLineNo">2974</span>    try {<a name="line.2974"></a>
+<span class="sourceLineNo">2975</span>      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();<a name="line.2975"></a>
+<span class="sourceLineNo">2976</span>      clazz = Class.forName(classname, true, classLoader).asSubclass(xface);<a name="line.2976"></a>
+<span class="sourceLineNo">2977</span>    } catch (java.lang.ClassNotFoundException nfe) {<a name="line.2977"></a>
+<span class="sourceLineNo">2978</span>      throw new IOException("Could not find class for " + classname);<a name="line.2978"></a>
+<span class="sourceLineNo">2979</span>    }<a name="line.2979"></a>
+<span class="sourceLineNo">2980</span>    T service = ReflectionUtils.newInstance(clazz, conf);<a name="line.2980"></a>
+<span class="sourceLineNo">2981</span>    service.initialize(server, walFs, logDir, oldLogDir, walProvider);<a name="line.2981"></a>
+<span class="sourceLineNo">2982</span>    return service;<a name="line.2982"></a>
+<span class="sourceLineNo">2983</span>  }<a name="line.2983"></a>
+<span class="sourceLineNo">2984</span><a name="line.2984"></a>
+<span class="sourceLineNo">2985</span>  /**<a name="line.2985"></a>
+<span class="sourceLineNo">2986</span>   * Utility for constructing an instance of the passed HRegionServer class.<a name="line.2986"></a>
+<span class="sourceLineNo">2987</span>   *<a name="line.2987"></a>
+<span class="sourceLineNo">2988</span>   * @param regionServerClass<a name="line.2988"></a>
+<span class="sourceLineNo">2989</span>   * @param conf2<a name="line.2989"></a>
+<span class="sourceLineNo">2990</span>   * @return HRegionServer instance.<a name="line.2990"></a>
+<span class="sourceLineNo">2991</span>   */<a name="line.2991"></a>
+<span class="sourceLineNo">2992</span>  public static HRegionServer constructRegionServer(<a name="line.2992"></a>
+<span class="sourceLineNo">2993</span>      Class&lt;? extends HRegionServer&gt; regionServerClass,<a name="line.2993"></a>
+<span class="sourceLineNo">2994</span>      final Configuration conf2) {<a name="line.2994"></a>
+<span class="sourceLineNo">2995</span>    try {<a name="line.2995"></a>
+<span class="sourceLineNo">2996</span>      Constructor&lt;? extends HRegionServer&gt; c = regionServerClass<a name="line.2996"></a>
+<span class="sourceLineNo">2997</span>          .getConstructor(Configuration.class);<a name="line.2997"></a>
+<span class="sourceLineNo">2998</span>      return c.newInstance(conf2);<a name="line.2998"></a>
+<span class="sourceLineNo">2999</span>    } catch (Exception e) {<a name="line.2999"></a>
+<span class="sourceLineNo">3000</span>      throw new RuntimeException("Failed construction of " + "Regionserver: "<a name="line.3000"></a>
+<span class="sourceLineNo">3001</span>          + regionServerClass.toString(), e);<a name="line.3001"></a>
+<span class="sourceLineNo">3002</span>    }<a name="line.3002"></a>
+<span class="sourceLineNo">3003</span>  }<a name="line.3003"></a>
+<span class="sourceLineNo">3004</span><a name="line.3004"></a>
+<span class="sourceLineNo">3005</span>  /**<a name="line.3005"></a>
+<span class="sourceLineNo">3006</span>   * @see org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine<a name="line.3006"></a>
+<span class="sourceLineNo">3007</span>   */<a name="line.3007"></a>
+<span class="sourceLineNo">3008</span>  public static void main(String[] args) throws Exception {<a name="line.3008"></a>
+<span class="sourceLineNo">3009</span>    LOG.info("STARTING executorService " + HRegionServer.class.getSimpleName());<a name="line.3009"></a>
+<span class="sourceLineNo">3010</span>    VersionInfo.logVersion();<a name="line.3010"></a>
+<span class="sourceLineNo">3011</span>    Configuration conf = HBaseConfiguration.create();<a name="line.3011"></a>
+<span class="sourceLineNo">3012</span>    @SuppressWarnings("unchecked")<a name="line.3012"></a>
+<span class="sourceLineNo">3013</span>    Class&lt;? extends HRegionServer&gt; regionServerClass = (Class&lt;? extends HRegionServer&gt;) conf<a name="line.3013"></a>
+<span class="sourceLineNo">3014</span>        .getClass(HConstants.REGION_SERVER_IMPL, HRegionServer.class);<a name="line.3014"></a>
+<span class="sourceLineNo">3015</span><a name="line.3015"></a>
+<span class="sourceLineNo">3016</span>    new HRegionServerCommandLine(regionServerClass).doMain(args);<a name="line.3016"></a>
+<span class="sourceLineNo">3017</span>  }<a name="line.3017"></a>
+<span class="sourceLineNo">3018</span><a name="line.3018"></a>
+<span class="sourceLineNo">3019</span>  /**<a name="line.3019"></a>
+<span class="sourceLineNo">3020</span>   * Gets the online regions of the specified table.<a name="line.3020"></a>
+<span class="sourceLineNo">3021</span>   * This method looks at the in-memory onlineRegions.  It does not go to &lt;code&gt;hbase:meta&lt;/code&gt;.<a name="line.3021"></a>
+<span class="sourceLineNo">3022</span>   * Only returns &lt;em&gt;online&lt;/em&gt; regions.  If a region on this table has been<a name="line.3022"></a>
+<span class="sourceLineNo">3023</span>   * closed during a disable, etc., it will not be included in the returned list.<a name="line.3023"></a>
+<span class="sourceLineNo">3024</span>   * So, the returned list may not necessarily be ALL regions in this table, its<a name="line.3024"></a>
+<span class="sourceLineNo">3025</span>   * all the ONLINE regions in the table.<a name="line.3025"></a>
+<span class="sourceLineNo">3026</span>   * @param tableName<a name="line.3026"></a>
+<span class="sourceLineNo">3027</span>   * @return Online regions from &lt;code&gt;tableName&lt;/code&gt;<a name="line.3027"></a>
+<span class="sourceLineNo">3028</span>   */<a name="line.3028"></a>
+<span class="sourceLineNo">3029</span>  @Override<a name="line.3029"></a>
+<span class="sourceLineNo">3030</span>  public List&lt;HRegion&gt; getRegions(TableName tableName) {<a name="line.3030"></a>
+<span class="sourceLineNo">3031</span>     List&lt;HRegion&gt; tableRegions = new ArrayList&lt;&gt;();<a name="line.3031"></a>
+<span class="sourceLineNo">3032</span>     synchronized (this.onlineRegions) {<a name="line.3032"></a>
+<span class="sourceLineNo">3033</span>       for (HRegion region: this.onlineRegions.values()) {<a name="line.3033"></a>
+<span class="sourceLineNo">3034</span>         RegionInfo regionInfo = region.getRegionInfo();<a name="line.3034"></a>
+<span class="sourceLineNo">3035</span>         if(regionInfo.getTable().equals(tableName)) {<a name="line.3035"></a>
+<span class="sourceLineNo">3036</span>           tableRegions.add(region);<a name="line.3036"></a>
+<span class="sourceLineNo">3037</span>         }<a name="line.3037"></a>
+<span class="sourceLineNo">3038</span>       }<a name="line.3038"></a>
+<span class="sourceLineNo">3039</span>     }<a name="line.3039"></a>
+<span class="sourceLineNo">3040</span>     return tableRegions;<a name="line.3040"></a>
+<span class="sourceLineNo">3041</span>   }<a name="line.3041"></a>
+<span class="sourceLineNo">3042</span><a name="line.3042"></a>
+<span class="sourceLineNo">3043</span>  @Override<a name="line.3043"></a>
+<span class="sourceLineNo">3044</span>  public List&lt;HRegion&gt; getRegions() {<a name="line.3044"></a>
+<span class="sourceLineNo">3045</span>    List&lt;HRegion&gt; allRegions = new ArrayList&lt;&gt;();<a name="line.3045"></a>
+<span class="sourceLineNo">3046</span>    synchronized (this.onlineRegions) {<a name="line.3046"></a>
+<span class="sourceLineNo">3047</span>      // Return a clone copy of the onlineRegions<a name="line.3047"></a>
+<span class="sourceLineNo">3048</span>      allRegions.addAll(onlineRegions.values());<a name="line.3048"></a>
+<span class="sourceLineNo">3049</span>    }<a name="line.3049"></a>
+<span class="sourceLineNo">3050</span>    return allRegions;<a name="line.3050"></a>
+<span class="sourceLineNo">3051</span>  }<a name="line.3051"></a>
+<span class="sourceLineNo">3052</span><a name="line.3052"></a>
+<span class="sourceLineNo">3053</span>  /**<a name="line.3053"></a>
+<span class="sourceLineNo">3054</span>   * Gets the online tables in this RS.<a name="line.3054"></a>
+<span class="sourceLineNo">3055</span>   * This method looks at the in-memory onlineRegions.<a name="line.3055"></a>
+<span class="sourceLineNo">3056</span>   * @return all the online tables in this RS<a name="line.3056"></a>
+<span class="sourceLineNo">3057</span>   */<a name="line.3057"></a>
+<span class="sourceLineNo">3058</span>  public Set&lt;TableName&gt; getOnlineTables() {<a name="line.3058"></a>
+<span class="sourceLineNo">3059</span>    Set&lt;TableName&gt; tables = new HashSet&lt;&gt;();<a name="line.3059"></a>
+<span class="sourceLineNo">3060</span>    synchronized (this.onlineRegions) {<a name="line.3060"></a>
+<span class="sourceLineNo">3061</span>      for (Region region: this.onlineRegions.values()) {<a name="line.3061"></a>
+<span class="sourceLineNo">3062</span>        tables.add(region.getTableDescriptor().getTableName());<a name="line.3062"></a>
+<span class="sourceLineNo">3063</span>      }<a name="line.3063"></a>
+<span class="sourceLineNo">3064</span>    }<a name="line.3064"></a>
+<span class="sourceLineNo">3065</span>    return tables;<a name="line.3065"></a>
+<span class="sourceLineNo">3066</span>  }<a name="line.3066"></a>
+<span class="sourceLineNo">3067</span><a name="line.3067"></a>
+<span class="sourceLineNo">3068</span>  // used by org/apache/hbase/tmpl/regionserver/RSStatusTmpl.jamon (HBASE-4070).<a name="line.3068"></a>
+<span class="sourceLineNo">3069</span>  public String[] getRegionServerCoprocessors() {<a name="line.3069"></a>
+<span class="sourceLineNo">3070</span>    TreeSet&lt;String&gt; coprocessors = new TreeSet&lt;&gt;();<a name="line.3070"></a>
+<span class="sourceLineNo">3071</span>    try {<a name="line.3071"></a>
+<span class="sourceLineNo">3072</span>      coprocessors.addAll(getWAL(null).getCoprocessorHost().getCoprocessors());<a name="line.3072"></a>
+<span class="sourceLineNo">3073</span>    } catch (IOException exception) {<a name="line.3073"></a>
+<span class="sourceLineNo">3074</span>      LOG.warn("Exception attempting to fetch wal coprocessor information for the common wal; " +<a name="line.3074"></a>
+<span class="sourceLineNo">3075</span>          "skipping.");<a name="line.3075"></a>
+<span class="sourceLineNo">3076</span>      LOG.debug("Exception details for failure to fetch wal coprocessor information.", exception);<a name="line.3076"></a>
+<span class="sourceLineNo">3077</span>    }<a name="line.3077"></a>
+<span class="sourceLineNo">3078</span>    Collection&lt;HRegion&gt; regions = getOnlineRegionsLocalContext();<a name="line.3078"></a>
+<span class="sourceLineNo">3079</span>    for (HRegion region: regions) {<a name="line.3079"></a>
+<span class="sourceLineNo">3080</span>      coprocessors.addAll(region.getCoprocessorHost().getCoprocessors());<a name="line.3080"></a>
+<span class="sourceLineNo">3081</span>      try {<a name="line.3081"></a>
+<span class="sourceLineNo">3082</span>        coprocessors.addAll(getWAL(region.getRegionInfo()).getCoprocessorHost().getCoprocessors());<a name="line.3082"></a>
+<span class="sourceLineNo">3083</span>      } catch (IOException exception) {<a name="line.3083"></a>
+<span class="sourceLineNo">3084</span>        LOG.warn("Exception attempting to fetch wal coprocessor information for region " + region +<a name="line.3084"></a>
+<span class="sourceLineNo">3085</span>            "; skipping.");<a name="line.3085"></a>
+<span class="sourceLineNo">3086</span>        LOG.debug("Exception details for failure to fetch wal coprocessor information.", exception);<a name="line.3086"></a>
+<span class="sourceLineNo">3087</span>      }<a name="line.3087"></a>
+<span class="sourceLineNo">3088</span>    }<a name="line.3088"></a>
+<span class="sourceLineNo">3089</span>    coprocessors.addAll(rsHost.getCoprocessors());<a name="line.3089"></a>
+<span class="sourceLineNo">3090</span>    return coprocessors.toArray(new String[coprocessors.size()]);<a name="line.3090"></a>
+<span class="sourceLineNo">3091</span>  }<a name="line.3091"></a>
+<span class="sourceLineNo">3092</span><a name="line.3092"></a>
+<span class="sourceLineNo">3093</span>  /**<a name="line.3093"></a>
+<span class="sourceLineNo">3094</span>   * Try to close the region, logs a warning on failure but continues.<a name="line.3094"></a>
+<span class="sourceLineNo">3095</span>   * @param region Region to close<a name="line.3095"></a>
+<span class="sourceLineNo">3096</span>   */<a name="line.3096"></a>
+<span class="sourceLineNo">3097</span>  private void closeRegionIgnoreErrors(RegionInfo region, final boolean abort) {<a name="line.3097"></a>
+<span class="sourceLineNo">3098</span>    try {<a name="line.3098"></a>
+<span class="sourceLineNo">3099</span>      if (!closeRegion(region.getEncodedName(), abort, null)) {<a name="line.3099"></a>
+<span class="sourceLineNo">3100</span>        LOG.warn("Failed to close " + region.getRegionNameAsString() +<a name="line.3100"></a>
+<span class="sourceLineNo">3101</span>            " - ignoring and continuing");<a name="line.3101"></a>
+<span class="sourceLineNo">3102</span>      }<a name="line.3102"></a>
+<span class="sourceLineNo">3103</span>    } catch (IOException e) {<a name="line.3103"></a>
+<span class="sourceLineNo">3104</span>      LOG.warn("Failed to close " + region.getRegionNameAsString() +<a name="line.3104"></a>
+<span class="sourceLineNo">3105</span>          " - ignoring and continuing", e);<a name="line.3105"></a>
+<span class="sourceLineNo">3106</span>    }<a name="line.3106"></a>
+<span class="sourceLineNo">3107</span>  }<a name="line.3107"></a>
+<span class="sourceLineNo">3108</span><a name="line.3108"></a>
+<span class="sourceLineNo">3109</span>  /**<a name="line.3109"></a>
+<span class="sourceLineNo">3110</span>   * Close asynchronously a region, can be called from the master or internally by the regionserver<a name="line.3110"></a>
+<span class="sourceLineNo">3111</span>   * when stopping. If called from the master, the region will update the znode status.<a name="line.3111"></a>
+<span class="sourceLineNo">3112</span>   *<a name="line.3112"></a>
 <span class="sourceLineNo">3113</span>   * &lt;p&gt;<a name="line.3113"></a>
-<span class="sourceLineNo">3114</span>   *   If a close was in progress, this new request will be ignored, and an exception thrown.<a name="line.3114"></a>
-<span class="sourceLineNo">3115</span>   * &lt;/p&gt;<a name="line.3115"></a>
-<span class="sourceLineNo">3116</span>   *<a name="line.3116"></a>
-<span class="sourceLineNo">3117</span>   * @param encodedName Region to close<a name="line.3117"></a>
-<span class="sourceLineNo">3118</span>   * @param abort True if we are aborting<a name="line.3118"></a>
-<span class="sourceLineNo">3119</span>   * @return True if closed a region.<a name="line.3119"></a>
-<span class="sourceLineNo">3120</span>   * @throws NotServingRegionException if the region is not online<a name="line.3120"></a>
-<span class="sourceLineNo">3121</span>   */<a name="line.3121"></a>
-<span class="sourceLineNo">3122</span>  protected boolean closeRegion(String encodedName, final boolean abort, final ServerName sn)<a name="line.3122"></a>
-<span class="sourceLineNo">3123</span>      throws NotServingRegionException {<a name="line.3123"></a>
-<span class="sourceLineNo">3124</span>    //Check for permissions to close.<a name="line.3124"></a>
-<span class="sourceLineNo">3125</span>    HRegion actualRegion = this.getRegion(encodedName);<a name="line.3125"></a>
-<span class="sourceLineNo">3126</span>    // Can be null if we're calling close on a region that's not online<a name="line.3126"></a>
-<span class="sourceLineNo">3127</span>    if ((actualRegion != null) &amp;&amp; (actualRegion.getCoprocessorHost() != null)) {<a name="line.3127"></a>
-<span class="sourceLineNo">3128</span>      try {<a name="line.3128"></a>
-<span class="sourceLineNo">3129</span>        actualRegion.getCoprocessorHost().preClose(false);<a name="line.3129"></a>
-<span class="sourceLineNo">3130</span>      } catch (IOException exp) {<a name="line.3130"></a>
-<span class="sourceLineNo">3131</span>        LOG.warn("Unable to close region: the coprocessor launched an error ", exp);<a name="line.3131"></a>
-<span class="sourceLineNo">3132</span>        return false;<a name="line.3132"></a>
-<span class="sourceLineNo">3133</span>      }<a name="line.3133"></a>
-<span class="sourceLineNo">3134</span>    }<a name="line.3134"></a>
-<span class="sourceLineNo">3135</span><a name="line.3135"></a>
-<span class="sourceLineNo">3136</span>    final Boolean previous = this.regionsInTransitionInRS.putIfAbsent(Bytes.toBytes(encodedName),<a name="line.3136"></a>
-<span class="sourceLineNo">3137</span>        Boolean.FALSE);<a name="line.3137"></a>
-<span class="sourceLineNo">3138</span><a name="line.3138"></a>
-<span class="sourceLineNo">3139</span>    if (Boolean.TRUE.equals(previous)) {<a name="line.3139"></a>
-<span class="sourceLineNo">3140</span>      LOG.info("Received CLOSE for the region:" + encodedName + " , which we are already " +<a name="line.3140"></a>
-<span class="sourceLineNo">3141</span>          "trying to OPEN. Cancelling OPENING.");<a name="line.3141"></a>
-<span class="sourceLineNo">3142</span>      if (!regionsInTransitionInRS.replace(Bytes.toBytes(encodedName), previous, Boolean.FALSE)) {<a name="line.3142"></a>
-<span class="sourceLineNo">3143</span>        // The replace failed. That should be an exceptional case, but theoretically it can happen.<a name="line.3143"></a>
-<span class="sourceLineNo">3144</span>        // We're going to try to do a standard close then.<a name="line.3144"></a>
-<span class="sourceLineNo">3145</span>        LOG.warn("The opening for region " + encodedName + " was done before we could cancel it." +<a name="line.3145"></a>
-<span class="sourceLineNo">3146</span>            " Doing a standard close now");<a name="line.3146"></a>
-<span class="sourceLineNo">3147</span>        return closeRegion(encodedName, abort, sn);<a name="line.3147"></a>
-<span class="sourceLineNo">3148</span>      }<a name="line.3148"></a>
-<span class="sourceLineNo">3149</span>      // Let's get the region from the online region list again<a name="line.3149"></a>
-<span class="sourceLineNo">3150</span>      actualRegion = this.getRegion(encodedName);<a name="line.3150"></a>
-<span class="sourceLineNo">3151</span>      if (actualRegion == null) { // If already online, we still need to close it.<a name="line.3151"></a>
-<span class="sourceLineNo">3152</span>        LOG.info("The opening previously in progress has been cancelled by a CLOSE request.");<a name="line.3152"></a>
-<span class="sourceLineNo">3153</span>        // The master deletes the znode when it receives this exception.<a name="line.3153"></a>
-<span class="sourceLineNo">3154</span>        throw new NotServingRegionException("The region " + encodedName +<a name="line.3154"></a>
-<span class="sourceLineNo">3155</span>          " was opening but not yet served. Opening is cancelled.");<a name="line.3155"></a>
-<span class="sourceLineNo">3156</span>      }<a name="line.3156"></a>
-<span class="sourceLineNo">3157</span>    } else if (Boolean.FALSE.equals(previous)) {<a name="line.3157"></a>
-<span class="sourceLineNo">3158</span>      LOG.info("Received CLOSE for the region: " + encodedName +<a name="line.3158"></a>
-<span class="sourceLineNo">3159</span>        ", which we are already trying to CLOSE, but not completed yet");<a name="line.3159"></a>
-<span class="sourceLineNo">3160</span>      return true;<a name="line.3160"></a>
-<span class="sourceLineNo">3161</span>    }<a name="line.3161"></a>
-<span class="sourceLineNo">3162</span><a name="line.3162"></a>
-<span class="sourceLineNo">3163</span>    if (actualRegion == null) {<a name="line.3163"></a>
-<span class="sourceLineNo">3164</span>      LOG.debug("Received CLOSE for a region which is not online, and we're not opening.");<a name="line.3164"></a>
-<span class="sourceLineNo">3165</span>      this.regionsInTransitionInRS.remove(Bytes.toBytes(encodedName));<a name="line.3165"></a>
-<span class="sourceLineNo">3166</span>      // The master deletes the znode when it receives this exception.<a name="line.3166"></a>
-<span class="sourceLineNo">3167</span>      throw new NotServingRegionException("The region " + encodedName +<a name="line.3167"></a>
-<span class="sourceLineNo">3168</span>          " is not online, and is not opening.");<a name="line.3168"></a>
-<span class="sourceLineNo">3169</span>    }<a name="line.3169"></a>
-<span class="sourceLineNo">3170</span><a name="line.3170"></a>
-<span class="sourceLineNo">3171</span>    CloseRegionHandler crh;<a name="line.3171"></a>
-<span class="sourceLineNo">3172</span>    final RegionInfo hri = actualRegion.getRegionInfo();<a name="line.3172"></a>
-<span class="sourceLineNo">3173</span>    if (hri.isMetaRegion()) {<a name="line.3173"></a>
-<span class="sourceLineNo">3174</span>      crh = new CloseMetaHandler(this, this, hri, abort);<a name="line.3174"></a>
-<span class="sourceLineNo">3175</span>    } else {<a name="line.3175"></a>
-<span class="sourceLineNo">3176</span>      crh = new CloseRegionHandler(this, this, hri, abort, sn);<a name="line.3176"></a>
-<span class="sourceLineNo">3177</span>    }<a name="line.3177"></a>
-<span class="sourceLineNo">3178</span>    this.executorService.submit(crh);<a name="line.3178"></a>
-<span class="sourceLineNo">3179</span>    return true;<a name="line.3179"></a>
-<span class="sourceLineNo">3180</span>  }<a name="line.3180"></a>
-<span class="sourceLineNo">3181</span><a name="line.3181"></a>
-<span class="sourceLineNo">3182</span>  /**<a name="line.3182"></a>
-<span class="sourceLineNo">3183</span>   * Close and offline the region for split or merge<a name="line.3183"></a>
-<span class="sourceLineNo">3184</span>   *<a name="line.3184"></a>
-<span class="sourceLineNo">3185</span>   * @param regionEncodedName the name of the region(s) to close<a name="line.3185"></a>
-<span class="sourceLineNo">3186</span>   * @return true if closed the region successfully.<a name="line.3186"></a>
-<span class="sourceLineNo">3187</span>   * @throws IOException<a name="line.3187"></a>
-<span class="sourceLineNo">3188</span>  */<a name="line.3188"></a>
-<span class="sourceLineNo">3189</span>  protected boolean closeAndOfflineRegionForSplitOrMerge(final List&lt;String&gt; regionEncodedName)<a name="line.3189"></a>
-<span class="sourceLineNo">3190</span>      throws IOException {<a name="line.3190"></a>
-<span class="sourceLineNo">3191</span>    for (int i = 0; i &lt; regionEncodedName.size(); ++i) {<a name="line.3191"></a>
-<span class="sourceLineNo">3192</span>      HRegion regionToClose = this.getRegion(regionEncodedName.get(i));<a name="line.3192"></a>
-<span class="sourceLineNo">3193</span>      if (regionToClose != null) {<a name="line.3193"></a>
-<span class="sourceLineNo">3194</span>        Map&lt;byte[], List&lt;HStoreFile&gt;&gt; hstoreFiles = null;<a name="line.3194"></a>
-<span class="sourceLineNo">3195</span>        Exception exceptionToThrow = null;<a name="line.3195"></a>
-<span class="sourceLineNo">3196</span>        try {<a name="line.3196"></a>
-<span class="sourceLineNo">3197</span>          hstoreFiles = regionToClose.close(false);<a name="line.3197"></a>
-<span class="sourceLineNo">3198</span>        } catch (Exception e) {<a name="line.3198"></a>
-<span class="sourceLineNo">3199</span>          exceptionToThrow = e;<a name="line.3199"></a>
-<span class="sourceLineNo">3200</span>        }<a name="line.3200"></a>
-<span class="sourceLineNo">3201</span>        if (exceptionToThrow == null &amp;&amp; hstoreFiles == null) {<a name="line.3201"></a>
-<span class="sourceLineNo">3202</span>          // The region was closed by someone else<a name="line.3202"></a>
-<span class="sourceLineNo">3203</span>          exceptionToThrow =<a name="line.3203"></a>
-<span class="sourceLineNo">3204</span>            new IOException("Failed to close region: already closed by another thread");<a name="line.3204"></a>
+<span class="sourceLineNo">3114</span>   * If an opening was in progress, this method will cancel it, but will not start a new close. The<a name="line.3114"></a>
+<span class="sourceLineNo">3115</span>   * coprocessors are not called in this case. A NotServingRegionException exception is thrown.<a name="line.3115"></a>
+<span class="sourceLineNo">3116</span>   * &lt;/p&gt;<a name="line.3116"></a>
+<span class="sourceLineNo">3117</span><a name="line.3117"></a>
+<span class="sourceLineNo">3118</span>   * &lt;p&gt;<a name="line.3118"></a>
+<span class="sourceLineNo">3119</span>   *   If a close was in progress, this new request will be ignored, and an exception thrown.<a name="line.3119"></a>
+<span class="sourceLineNo">3120</span>   * &lt;/p&gt;<a name="line.3120"></a>
+<span class="sourceLineNo">3121</span>   *<a name="line.3121"></a>
+<span class="sourceLineNo">3122</span>   * @param encodedName Region to close<a name="line.3122"></a>
+<span class="sourceLineNo">3123</span>   * @param abort True if we are aborting<a name="line.3123"></a>
+<span class="sourceLineNo">3124</span>   * @return True if closed a region.<a name="line.3124"></a>
+<span class="sourceLineNo">3125</span>   * @throws NotServingRegionException if the region is not online<a name="line.3125"></a>
+<span class="sourceLineNo">3126</span>   */<a name="line.3126"></a>
+<span class="sourceLineNo">3127</span>  protected boolean closeRegion(String encodedName, final boolean abort, final ServerName sn)<a name="line.3127"></a>
+<span class="sourceLineNo">3128</span>      throws NotServingRegionException {<a name="line.3128"></a>
+<span class="sourceLineNo">3129</span>    //Check for permissions to close.<a name="line.3129"></a>
+<span class="sourceLineNo">3130</span>    HRegion actualRegion = this.getRegion(encodedName);<a name="line.3130"></a>
+<span class="sourceLineNo">3131</span>    // Can be null if we're calling close on a region that's not online<a name="line.3131"></a>
+<span class="sourceLineNo">3132</span>    if ((actualRegion != null) &amp;&amp; (actualRegion.getCoprocessorHost() != null)) {<a name="line.3132"></a>
+<span class="sourceLineNo">3133</span>      try {<a name="line.3133"></a>
+<span class="sourceLineNo">3134</span>        actualRegion.getCoprocessorHost().preClose(false);<a name="line.3134"></a>
+<span class="sourceLineNo">3135</span>      } catch (IOException exp) {<a name="line.3135"></a>
+<span class="sourceLineNo">3136</span>        LOG.warn("Unable to close region: the coprocessor launched an error ", exp);<a name="line.3136"></a>
+<span class="sourceLineNo">3137</span>        return false;<a name="line.3137"></a>
+<span class="sourceLineNo">3138</span>      }<a name="line.3138"></a>
+<span class="sourceLineNo">3139</span>    }<a name="line.3139"></a>
+<span class="sourceLineNo">3140</span><a name="line.3140"></a>
+<span class="sourceLineNo">3141</span>    final Boolean previous = this.regionsInTransitionInRS.putIfAbsent(Bytes.toBytes(encodedName),<a name="line.3141"></a>
+<span class="sourceLineNo">3142</span>        Boolean.FALSE);<a name="line.3142"></a>
+<span class="sourceLineNo">3143</span><a name="line.3143"></a>
+<span class="sourceLineNo">3144</span>    if (Boolean.TRUE.equals(previous)) {<a name="line.3144"></a>
+<span class="sourceLineNo">3145</span>      LOG.info("Received CLOSE for the region:" + encodedName + " , which we are already " +<a name="line.3145"></a>
+<span class="sourceLineNo">3146</span>          "trying to OPEN. Cancelling OPENING.");<a name="line.3146"></a>
+<span class="sourceLineNo">3147</span>      if (!regionsInTransitionInRS.replace(Bytes.toBytes(encodedName), previous, Boolean.FALSE)) {<a name="line.3147"></a>
+<span class="sourceLineNo">3148</span>        // The replace failed. That should be an exceptional case, but theoretically it can happen.<a name="line.3148"></a>
+<span class="sourceLineNo">3149</span>        // We're going to try to do a standard close then.<a name="line.3149"></a>
+<span class="sourceLineNo">3150</span>        LOG.warn("The opening for region " + encodedName + " was done before we could cancel it." +<a name="line.3150"></a>
+<span class="sourceLineNo">3151</span>            " Doing a standard close now");<a name="line.3151"></a>
+<span class="sourceLineNo">3152</span>        return closeRegion(encodedName, abort, sn);<a name="line.3152"></a>
+<span class="sourceLineNo">3153</span>      }<a name="line.3153"></a>
+<span class="sourceLineNo">3154</span>      // Let's get the region from the online region list again<a name="line.3154"></a>
+<span class="sourceLineNo">3155</span>      actualRegion = this.getRegion(encodedName);<a name="line.3155"></a>
+<span class="sourceLineNo">3156</span>      if (actualRegion == null) { // If already online, we still need to close it.<a name="line.3156"></a>
+<span class="sourceLineNo">3157</span>        LOG.info("The opening previously in progress has been cancelled by a CLOSE request.");<a name="line.3157"></a>
+<span class="sourceLineNo">3158</span>        // The master deletes the znode when it receives this exception.<a name="line.3158"></a>
+<span class="sourceLineNo">3159</span>        throw new NotServingRegionException("The region " + encodedName +<a name="line.3159"></a>
+<span class="sourceLineNo">3160</span>          " was opening but not yet served. Opening is cancelled.");<a name="line.3160"></a>
+<span class="sourceLineNo">3161</span>      }<a name="line.3161"></a>
+<span class="sourceLineNo">3162</span>    } else if (Boolean.FALSE.equals(previous)) {<a name="line.3162"></a>
+<span class="sourceLineNo">3163</span>      LOG.info("Received CLOSE for the region: " + encodedName +<a name="line.3163"></a>
+<span class="sourceLineNo">3164</span>        ", which we are already trying to CLOSE, but not completed yet");<a name="line.3164"></a>
+<span class="sourceLineNo">3165</span>      return true;<a name="line.3165"></a>
+<span class="sourceLineNo">3166</span>    }<a name="line.3166"></a>
+<span class="sourceLineNo">3167</span><a name="line.3167"></a>
+<span class="sourceLineNo">3168</span>    if (actualRegion == null) {<a name="line.3168"></a>
+<span class="sourceLineNo">3169</span>      LOG.debug("Received CLOSE for a region which is not online, and we're not opening.");<a name="line.3169"></a>
+<span class="sourceLineNo">3170</span>      this.regionsInTransitionInRS.remove(Bytes.toBytes(encodedName));<a name="line.3170"></a>
+<span class="sourceLineNo">3171</span>      // The master deletes the znode when it receives this exception.<a name="line.3171"></a>
+<span class="sourceLineNo">3172</span>      throw new NotServingRegionException("The region " + encodedName +<a name="line.3172"></a>
+<span class="sourceLineNo">3173</span>          " is not online, and is not opening.");<a name="line.3173"></a>
+<span class="sourceLineNo">3174</span>    }<a name="line.3174"></a>
+<span class="sourceLineNo">3175</span><a name="line.3175"></a>
+<span class="sourceLineNo">3176</span>    CloseRegionHandler crh;<a name="line.3176"></a>
+<span class="sourceLineNo">3177</span>    final RegionInfo hri = actualRegion.getRegionInfo();<a name="line.3177"></a>
+<span class="sourceLineNo">3178</span>    if (hri.isMetaRegion()) {<a name="line.3178"></a>
+<span class="sourceLineNo">3179</span>      crh = new CloseMetaHandler(this, this, hri, abort);<a name="line.3179"></a>
+<span class="sourceLineNo">3180</span>    } else {<a name="line.3180"></a>
+<span class="sourceLineNo">3181</span>      crh = new CloseRegionHandler(this, this, hri, abort, sn);<a name="line.3181"></a>
+<span class="sourceLineNo">3182</span>    }<a name="line.3182"></a>
+<span class="sourceLineNo">3183</span>    this.executorService.submit(crh);<a name="line.3183"></a>
+<span class="sourceLineNo">3184</span>    return true;<a name="line.3184"></a>
+<span class="sourceLineNo">3185</span>  }<a name="line.3185"></a>
+<span class="sourceLineNo">3186</span><a name="line.3186"></a>
+<span class="sourceLineNo">3187</span>  /**<a name="line.3187"></a>
+<span class="sourceLineNo">3188</span>   * Close and offline the region for split or merge<a name="line.3188"></a>
+<span class="sourceLineNo">3189</span>   *<a name="line.3189"></a>
+<span class="sourceLineNo">3190</span>   * @param regionEncodedName the name of the region(s) to close<a name="line.3190"></a>
+<span class="sourceLineNo">3191</span>   * @return true if closed the region successfully.<a name="line.3191"></a>
+<span class="sourceLineNo">3192</span>   * @throws IOException<a name="line.3192"></a>
+<span class="sourceLineNo">3193</span>  */<a name="line.3193"></a>
+<span class="sourceLineNo">3194</span>  protected boolean closeAndOfflineRegionForSplitOrMerge(final List&lt;String&gt; regionEncodedName)<a name="line.3194"></a>
+<span class="sourceLineNo">3195</span>      throws IOException {<a name="line.3195"></a>
+<span class="sourceLineNo">3196</span>    for (int i = 0; i &lt; regionEncodedName.size(); ++i) {<a name="line.3196"></a>
+<span class="sourceLineNo">3197</span>      HRegion regionToClose = this.getRegion(regionEncodedName.get(i));<a name="line.3197"></a>
+<span class="sourceLineNo">3198</span>      if (regionToClose != null) {<a name="line.3198"></a>
+<span class="sourceLineNo">3199</span>        Map&lt;byte[], List&lt;HStoreFile&gt;&gt; hstoreFiles = null;<a name="line.3199"></a>
+<span class="sourceLineNo">3200</span>        Exception exceptionToThrow = null;<a name="line.3200"></a>
+<span class="sourceLineNo">3201</span>        try {<a name="line.3201"></a>
+<span class="sourceLineNo">3202</span>          hstoreFiles = regionToClose.close(false);<a name="line.3202"></a>
+<span class="sourceLineNo">3203</span>        } catch (Exception e) {<a name="line.3203"></a>
+<span class="sourceLineNo">3204</span>          exceptionToThrow = e;<a name="line.3204"></a>
 <span class="sourceLineNo">3205</span>        }<a name="line.3205"></a>
-<span class="sourceLineNo">3206</span>        if (exceptionToThrow != null) {<a name="line.3206"></a>
-<span class="sourceLineNo">3207</span>          if (exceptionToThrow instanceof IOException) {<a name="line.3207"></a>
-<span class="sourceLineNo">3208</span>            throw (IOException) exceptionToThrow;<a name="line.3208"></a>
-<span class="sourceLineNo">3209</span>          }<a name="line.3209"></a>
-<span class="sourceLineNo">3210</span>          throw new IOException(exceptionToThrow);<a name="line.3210"></a>
-<span class="sourceLineNo">3211</span>        }<a name="line.3211"></a>
-<span class="sourceLineNo">3212</span>        // Offline the region<a name="line.3212"></a>
-<span class="sourceLineNo">3213</span>        this.removeRegion(regionToClose, null);<a name="line.3213"></a>
-<span class="sourceLineNo">3214</span>      }<a name="line.3214"></a>
-<span class="sourceLineNo">3215</span>    }<a name="line.3215"></a>
-<span class="sourceLineNo">3216</span>    return true;<a name="line.3216"></a>
-<span class="sourceLineNo">3217</span>  }<a name="line.3217"></a>
-<span class="sourceLineNo">3218</span><a name="line.3218"></a>
-<span class="sourceLineNo">3219</span>   /**<a name="line.3219"></a>
-<span class="sourceLineNo">3220</span>   * @param regionName<a name="line.3220"></a>
-<span class="sourceLineNo">3221</span>   * @return HRegion for the passed binary &lt;code&gt;regionName&lt;/code&gt; or null if<a name="line.3221"></a>
-<span class="sourceLineNo">3222</span>   *         named region is not member of the online regions.<a name="line.3222"></a>
-<span class="sourceLineNo">3223</span>   */<a name="line.3223"></a>
-<span class="sourceLineNo">3224</span>  public HRegion getOnlineRegion(final byte[] regionName) {<a name="line.3224"></a>
-<span class="sourceLineNo">3225</span>    String encodedRegionName = RegionInfo.encodeRegionName(regionName);<a name="line.3225"></a>
-<span class="sourceLineNo">3226</span>    return this.onlineRegions.get(encodedRegionName);<a name="line.3226"></a>
-<span class="sourceLineNo">3227</span>  }<a name="line.3227"></a>
-<span class="sourceLineNo">3228</span><a name="line.3228"></a>
-<span class="sourceLineNo">3229</span>  public InetSocketAddress[] getRegionBlockLocations(final String encodedRegionName) {<a name="line.3229"></a>
-<span class=

<TRUNCATED>

Mime
View raw message