hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [28/51] [partial] hbase-site git commit: Published site at .
Date Tue, 28 Nov 2017 15:18:12 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b9722a17/devapidocs/src-html/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.html b/devapidocs/src-html/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.html
index 166fc15..07e4dd5 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.html
@@ -831,235 +831,236 @@
 <span class="sourceLineNo">823</span>      org.apache.commons.lang3.ArrayUtils.class,<a name="line.823"></a>
 <span class="sourceLineNo">824</span>      com.fasterxml.jackson.databind.ObjectMapper.class,<a name="line.824"></a>
 <span class="sourceLineNo">825</span>      com.fasterxml.jackson.core.Versioned.class,<a name="line.825"></a>
-<span class="sourceLineNo">826</span>      com.fasterxml.jackson.annotation.JsonView.class);<a name="line.826"></a>
-<span class="sourceLineNo">827</span>  }<a name="line.827"></a>
-<span class="sourceLineNo">828</span><a name="line.828"></a>
-<span class="sourceLineNo">829</span>  /**<a name="line.829"></a>
-<span class="sourceLineNo">830</span>   * Returns a classpath string built from the content of the "tmpjars" value in {@code conf}.<a name="line.830"></a>
-<span class="sourceLineNo">831</span>   * Also exposed to shell scripts via `bin/hbase mapredcp`.<a name="line.831"></a>
-<span class="sourceLineNo">832</span>   */<a name="line.832"></a>
-<span class="sourceLineNo">833</span>  public static String buildDependencyClasspath(Configuration conf) {<a name="line.833"></a>
-<span class="sourceLineNo">834</span>    if (conf == null) {<a name="line.834"></a>
-<span class="sourceLineNo">835</span>      throw new IllegalArgumentException("Must provide a configuration object.");<a name="line.835"></a>
-<span class="sourceLineNo">836</span>    }<a name="line.836"></a>
-<span class="sourceLineNo">837</span>    Set&lt;String&gt; paths = new HashSet&lt;&gt;(conf.getStringCollection("tmpjars"));<a name="line.837"></a>
-<span class="sourceLineNo">838</span>    if (paths.isEmpty()) {<a name="line.838"></a>
-<span class="sourceLineNo">839</span>      throw new IllegalArgumentException("Configuration contains no tmpjars.");<a name="line.839"></a>
-<span class="sourceLineNo">840</span>    }<a name="line.840"></a>
-<span class="sourceLineNo">841</span>    StringBuilder sb = new StringBuilder();<a name="line.841"></a>
-<span class="sourceLineNo">842</span>    for (String s : paths) {<a name="line.842"></a>
-<span class="sourceLineNo">843</span>      // entries can take the form 'file:/path/to/file.jar'.<a name="line.843"></a>
-<span class="sourceLineNo">844</span>      int idx = s.indexOf(":");<a name="line.844"></a>
-<span class="sourceLineNo">845</span>      if (idx != -1) s = s.substring(idx + 1);<a name="line.845"></a>
-<span class="sourceLineNo">846</span>      if (sb.length() &gt; 0) sb.append(File.pathSeparator);<a name="line.846"></a>
-<span class="sourceLineNo">847</span>      sb.append(s);<a name="line.847"></a>
-<span class="sourceLineNo">848</span>    }<a name="line.848"></a>
-<span class="sourceLineNo">849</span>    return sb.toString();<a name="line.849"></a>
-<span class="sourceLineNo">850</span>  }<a name="line.850"></a>
-<span class="sourceLineNo">851</span><a name="line.851"></a>
-<span class="sourceLineNo">852</span>  /**<a name="line.852"></a>
-<span class="sourceLineNo">853</span>   * Add the HBase dependency jars as well as jars for any of the configured<a name="line.853"></a>
-<span class="sourceLineNo">854</span>   * job classes to the job configuration, so that JobClient will ship them<a name="line.854"></a>
-<span class="sourceLineNo">855</span>   * to the cluster and add them to the DistributedCache.<a name="line.855"></a>
-<span class="sourceLineNo">856</span>   */<a name="line.856"></a>
-<span class="sourceLineNo">857</span>  public static void addDependencyJars(Job job) throws IOException {<a name="line.857"></a>
-<span class="sourceLineNo">858</span>    addHBaseDependencyJars(job.getConfiguration());<a name="line.858"></a>
-<span class="sourceLineNo">859</span>    try {<a name="line.859"></a>
-<span class="sourceLineNo">860</span>      addDependencyJarsForClasses(job.getConfiguration(),<a name="line.860"></a>
-<span class="sourceLineNo">861</span>          // when making changes here, consider also mapred.TableMapReduceUtil<a name="line.861"></a>
-<span class="sourceLineNo">862</span>          // pull job classes<a name="line.862"></a>
-<span class="sourceLineNo">863</span>          job.getMapOutputKeyClass(),<a name="line.863"></a>
-<span class="sourceLineNo">864</span>          job.getMapOutputValueClass(),<a name="line.864"></a>
-<span class="sourceLineNo">865</span>          job.getInputFormatClass(),<a name="line.865"></a>
-<span class="sourceLineNo">866</span>          job.getOutputKeyClass(),<a name="line.866"></a>
-<span class="sourceLineNo">867</span>          job.getOutputValueClass(),<a name="line.867"></a>
-<span class="sourceLineNo">868</span>          job.getOutputFormatClass(),<a name="line.868"></a>
-<span class="sourceLineNo">869</span>          job.getPartitionerClass(),<a name="line.869"></a>
-<span class="sourceLineNo">870</span>          job.getCombinerClass());<a name="line.870"></a>
-<span class="sourceLineNo">871</span>    } catch (ClassNotFoundException e) {<a name="line.871"></a>
-<span class="sourceLineNo">872</span>      throw new IOException(e);<a name="line.872"></a>
-<span class="sourceLineNo">873</span>    }<a name="line.873"></a>
-<span class="sourceLineNo">874</span>  }<a name="line.874"></a>
-<span class="sourceLineNo">875</span><a name="line.875"></a>
-<span class="sourceLineNo">876</span>  /**<a name="line.876"></a>
-<span class="sourceLineNo">877</span>   * Add the jars containing the given classes to the job's configuration<a name="line.877"></a>
-<span class="sourceLineNo">878</span>   * such that JobClient will ship them to the cluster and add them to<a name="line.878"></a>
-<span class="sourceLineNo">879</span>   * the DistributedCache.<a name="line.879"></a>
-<span class="sourceLineNo">880</span>   * @deprecated rely on {@link #addDependencyJars(Job)} instead.<a name="line.880"></a>
-<span class="sourceLineNo">881</span>   */<a name="line.881"></a>
-<span class="sourceLineNo">882</span>  @Deprecated<a name="line.882"></a>
-<span class="sourceLineNo">883</span>  public static void addDependencyJars(Configuration conf,<a name="line.883"></a>
-<span class="sourceLineNo">884</span>      Class&lt;?&gt;... classes) throws IOException {<a name="line.884"></a>
-<span class="sourceLineNo">885</span>    LOG.warn("The addDependencyJars(Configuration, Class&lt;?&gt;...) method has been deprecated since it"<a name="line.885"></a>
-<span class="sourceLineNo">886</span>             + " is easy to use incorrectly. Most users should rely on addDependencyJars(Job) " +<a name="line.886"></a>
-<span class="sourceLineNo">887</span>             "instead. See HBASE-8386 for more details.");<a name="line.887"></a>
-<span class="sourceLineNo">888</span>    addDependencyJarsForClasses(conf, classes);<a name="line.888"></a>
-<span class="sourceLineNo">889</span>  }<a name="line.889"></a>
-<span class="sourceLineNo">890</span><a name="line.890"></a>
-<span class="sourceLineNo">891</span>  /**<a name="line.891"></a>
-<span class="sourceLineNo">892</span>   * Add the jars containing the given classes to the job's configuration<a name="line.892"></a>
-<span class="sourceLineNo">893</span>   * such that JobClient will ship them to the cluster and add them to<a name="line.893"></a>
-<span class="sourceLineNo">894</span>   * the DistributedCache.<a name="line.894"></a>
-<span class="sourceLineNo">895</span>   *<a name="line.895"></a>
-<span class="sourceLineNo">896</span>   * N.B. that this method at most adds one jar per class given. If there is more than one<a name="line.896"></a>
-<span class="sourceLineNo">897</span>   * jar available containing a class with the same name as a given class, we don't define<a name="line.897"></a>
-<span class="sourceLineNo">898</span>   * which of those jars might be chosen.<a name="line.898"></a>
-<span class="sourceLineNo">899</span>   *<a name="line.899"></a>
-<span class="sourceLineNo">900</span>   * @param conf The Hadoop Configuration to modify<a name="line.900"></a>
-<span class="sourceLineNo">901</span>   * @param classes will add just those dependencies needed to find the given classes<a name="line.901"></a>
-<span class="sourceLineNo">902</span>   * @throws IOException if an underlying library call fails.<a name="line.902"></a>
-<span class="sourceLineNo">903</span>   */<a name="line.903"></a>
-<span class="sourceLineNo">904</span>  @InterfaceAudience.Private<a name="line.904"></a>
-<span class="sourceLineNo">905</span>  public static void addDependencyJarsForClasses(Configuration conf,<a name="line.905"></a>
-<span class="sourceLineNo">906</span>      Class&lt;?&gt;... classes) throws IOException {<a name="line.906"></a>
-<span class="sourceLineNo">907</span><a name="line.907"></a>
-<span class="sourceLineNo">908</span>    FileSystem localFs = FileSystem.getLocal(conf);<a name="line.908"></a>
-<span class="sourceLineNo">909</span>    Set&lt;String&gt; jars = new HashSet&lt;&gt;();<a name="line.909"></a>
-<span class="sourceLineNo">910</span>    // Add jars that are already in the tmpjars variable<a name="line.910"></a>
-<span class="sourceLineNo">911</span>    jars.addAll(conf.getStringCollection("tmpjars"));<a name="line.911"></a>
-<span class="sourceLineNo">912</span><a name="line.912"></a>
-<span class="sourceLineNo">913</span>    // add jars as we find them to a map of contents jar name so that we can avoid<a name="line.913"></a>
-<span class="sourceLineNo">914</span>    // creating new jars for classes that have already been packaged.<a name="line.914"></a>
-<span class="sourceLineNo">915</span>    Map&lt;String, String&gt; packagedClasses = new HashMap&lt;&gt;();<a name="line.915"></a>
-<span class="sourceLineNo">916</span><a name="line.916"></a>
-<span class="sourceLineNo">917</span>    // Add jars containing the specified classes<a name="line.917"></a>
-<span class="sourceLineNo">918</span>    for (Class&lt;?&gt; clazz : classes) {<a name="line.918"></a>
-<span class="sourceLineNo">919</span>      if (clazz == null) continue;<a name="line.919"></a>
-<span class="sourceLineNo">920</span><a name="line.920"></a>
-<span class="sourceLineNo">921</span>      Path path = findOrCreateJar(clazz, localFs, packagedClasses);<a name="line.921"></a>
-<span class="sourceLineNo">922</span>      if (path == null) {<a name="line.922"></a>
-<span class="sourceLineNo">923</span>        LOG.warn("Could not find jar for class " + clazz +<a name="line.923"></a>
-<span class="sourceLineNo">924</span>                 " in order to ship it to the cluster.");<a name="line.924"></a>
-<span class="sourceLineNo">925</span>        continue;<a name="line.925"></a>
-<span class="sourceLineNo">926</span>      }<a name="line.926"></a>
-<span class="sourceLineNo">927</span>      if (!localFs.exists(path)) {<a name="line.927"></a>
-<span class="sourceLineNo">928</span>        LOG.warn("Could not validate jar file " + path + " for class "<a name="line.928"></a>
-<span class="sourceLineNo">929</span>                 + clazz);<a name="line.929"></a>
-<span class="sourceLineNo">930</span>        continue;<a name="line.930"></a>
-<span class="sourceLineNo">931</span>      }<a name="line.931"></a>
-<span class="sourceLineNo">932</span>      jars.add(path.toString());<a name="line.932"></a>
-<span class="sourceLineNo">933</span>    }<a name="line.933"></a>
-<span class="sourceLineNo">934</span>    if (jars.isEmpty()) return;<a name="line.934"></a>
-<span class="sourceLineNo">935</span><a name="line.935"></a>
-<span class="sourceLineNo">936</span>    conf.set("tmpjars", StringUtils.arrayToString(jars.toArray(new String[jars.size()])));<a name="line.936"></a>
-<span class="sourceLineNo">937</span>  }<a name="line.937"></a>
-<span class="sourceLineNo">938</span><a name="line.938"></a>
-<span class="sourceLineNo">939</span>  /**<a name="line.939"></a>
-<span class="sourceLineNo">940</span>   * Finds the Jar for a class or creates it if it doesn't exist. If the class is in<a name="line.940"></a>
-<span class="sourceLineNo">941</span>   * a directory in the classpath, it creates a Jar on the fly with the<a name="line.941"></a>
-<span class="sourceLineNo">942</span>   * contents of the directory and returns the path to that Jar. If a Jar is<a name="line.942"></a>
-<span class="sourceLineNo">943</span>   * created, it is created in the system temporary directory. Otherwise,<a name="line.943"></a>
-<span class="sourceLineNo">944</span>   * returns an existing jar that contains a class of the same name. Maintains<a name="line.944"></a>
-<span class="sourceLineNo">945</span>   * a mapping from jar contents to the tmp jar created.<a name="line.945"></a>
-<span class="sourceLineNo">946</span>   * @param my_class the class to find.<a name="line.946"></a>
-<span class="sourceLineNo">947</span>   * @param fs the FileSystem with which to qualify the returned path.<a name="line.947"></a>
-<span class="sourceLineNo">948</span>   * @param packagedClasses a map of class name to path.<a name="line.948"></a>
-<span class="sourceLineNo">949</span>   * @return a jar file that contains the class.<a name="line.949"></a>
-<span class="sourceLineNo">950</span>   * @throws IOException<a name="line.950"></a>
-<span class="sourceLineNo">951</span>   */<a name="line.951"></a>
-<span class="sourceLineNo">952</span>  private static Path findOrCreateJar(Class&lt;?&gt; my_class, FileSystem fs,<a name="line.952"></a>
-<span class="sourceLineNo">953</span>      Map&lt;String, String&gt; packagedClasses)<a name="line.953"></a>
-<span class="sourceLineNo">954</span>  throws IOException {<a name="line.954"></a>
-<span class="sourceLineNo">955</span>    // attempt to locate an existing jar for the class.<a name="line.955"></a>
-<span class="sourceLineNo">956</span>    String jar = findContainingJar(my_class, packagedClasses);<a name="line.956"></a>
-<span class="sourceLineNo">957</span>    if (null == jar || jar.isEmpty()) {<a name="line.957"></a>
-<span class="sourceLineNo">958</span>      jar = getJar(my_class);<a name="line.958"></a>
-<span class="sourceLineNo">959</span>      updateMap(jar, packagedClasses);<a name="line.959"></a>
-<span class="sourceLineNo">960</span>    }<a name="line.960"></a>
-<span class="sourceLineNo">961</span><a name="line.961"></a>
-<span class="sourceLineNo">962</span>    if (null == jar || jar.isEmpty()) {<a name="line.962"></a>
-<span class="sourceLineNo">963</span>      return null;<a name="line.963"></a>
-<span class="sourceLineNo">964</span>    }<a name="line.964"></a>
-<span class="sourceLineNo">965</span><a name="line.965"></a>
-<span class="sourceLineNo">966</span>    LOG.debug(String.format("For class %s, using jar %s", my_class.getName(), jar));<a name="line.966"></a>
-<span class="sourceLineNo">967</span>    return new Path(jar).makeQualified(fs);<a name="line.967"></a>
-<span class="sourceLineNo">968</span>  }<a name="line.968"></a>
-<span class="sourceLineNo">969</span><a name="line.969"></a>
-<span class="sourceLineNo">970</span>  /**<a name="line.970"></a>
-<span class="sourceLineNo">971</span>   * Add entries to &lt;code&gt;packagedClasses&lt;/code&gt; corresponding to class files<a name="line.971"></a>
-<span class="sourceLineNo">972</span>   * contained in &lt;code&gt;jar&lt;/code&gt;.<a name="line.972"></a>
-<span class="sourceLineNo">973</span>   * @param jar The jar who's content to list.<a name="line.973"></a>
-<span class="sourceLineNo">974</span>   * @param packagedClasses map[class -&gt; jar]<a name="line.974"></a>
-<span class="sourceLineNo">975</span>   */<a name="line.975"></a>
-<span class="sourceLineNo">976</span>  private static void updateMap(String jar, Map&lt;String, String&gt; packagedClasses) throws IOException {<a name="line.976"></a>
-<span class="sourceLineNo">977</span>    if (null == jar || jar.isEmpty()) {<a name="line.977"></a>
-<span class="sourceLineNo">978</span>      return;<a name="line.978"></a>
-<span class="sourceLineNo">979</span>    }<a name="line.979"></a>
-<span class="sourceLineNo">980</span>    ZipFile zip = null;<a name="line.980"></a>
-<span class="sourceLineNo">981</span>    try {<a name="line.981"></a>
-<span class="sourceLineNo">982</span>      zip = new ZipFile(jar);<a name="line.982"></a>
-<span class="sourceLineNo">983</span>      for (Enumeration&lt;? extends ZipEntry&gt; iter = zip.entries(); iter.hasMoreElements();) {<a name="line.983"></a>
-<span class="sourceLineNo">984</span>        ZipEntry entry = iter.nextElement();<a name="line.984"></a>
-<span class="sourceLineNo">985</span>        if (entry.getName().endsWith("class")) {<a name="line.985"></a>
-<span class="sourceLineNo">986</span>          packagedClasses.put(entry.getName(), jar);<a name="line.986"></a>
-<span class="sourceLineNo">987</span>        }<a name="line.987"></a>
-<span class="sourceLineNo">988</span>      }<a name="line.988"></a>
-<span class="sourceLineNo">989</span>    } finally {<a name="line.989"></a>
-<span class="sourceLineNo">990</span>      if (null != zip) zip.close();<a name="line.990"></a>
-<span class="sourceLineNo">991</span>    }<a name="line.991"></a>
-<span class="sourceLineNo">992</span>  }<a name="line.992"></a>
-<span class="sourceLineNo">993</span><a name="line.993"></a>
-<span class="sourceLineNo">994</span>  /**<a name="line.994"></a>
-<span class="sourceLineNo">995</span>   * Find a jar that contains a class of the same name, if any. It will return<a name="line.995"></a>
-<span class="sourceLineNo">996</span>   * a jar file, even if that is not the first thing on the class path that<a name="line.996"></a>
-<span class="sourceLineNo">997</span>   * has a class with the same name. Looks first on the classpath and then in<a name="line.997"></a>
-<span class="sourceLineNo">998</span>   * the &lt;code&gt;packagedClasses&lt;/code&gt; map.<a name="line.998"></a>
-<span class="sourceLineNo">999</span>   * @param my_class the class to find.<a name="line.999"></a>
-<span class="sourceLineNo">1000</span>   * @return a jar file that contains the class, or null.<a name="line.1000"></a>
-<span class="sourceLineNo">1001</span>   * @throws IOException<a name="line.1001"></a>
-<span class="sourceLineNo">1002</span>   */<a name="line.1002"></a>
-<span class="sourceLineNo">1003</span>  private static String findContainingJar(Class&lt;?&gt; my_class, Map&lt;String, String&gt; packagedClasses)<a name="line.1003"></a>
-<span class="sourceLineNo">1004</span>      throws IOException {<a name="line.1004"></a>
-<span class="sourceLineNo">1005</span>    ClassLoader loader = my_class.getClassLoader();<a name="line.1005"></a>
-<span class="sourceLineNo">1006</span><a name="line.1006"></a>
-<span class="sourceLineNo">1007</span>    String class_file = my_class.getName().replaceAll("\\.", "/") + ".class";<a name="line.1007"></a>
-<span class="sourceLineNo">1008</span><a name="line.1008"></a>
-<span class="sourceLineNo">1009</span>    if (loader != null) {<a name="line.1009"></a>
-<span class="sourceLineNo">1010</span>      // first search the classpath<a name="line.1010"></a>
-<span class="sourceLineNo">1011</span>      for (Enumeration&lt;URL&gt; itr = loader.getResources(class_file); itr.hasMoreElements();) {<a name="line.1011"></a>
-<span class="sourceLineNo">1012</span>        URL url = itr.nextElement();<a name="line.1012"></a>
-<span class="sourceLineNo">1013</span>        if ("jar".equals(url.getProtocol())) {<a name="line.1013"></a>
-<span class="sourceLineNo">1014</span>          String toReturn = url.getPath();<a name="line.1014"></a>
-<span class="sourceLineNo">1015</span>          if (toReturn.startsWith("file:")) {<a name="line.1015"></a>
-<span class="sourceLineNo">1016</span>            toReturn = toReturn.substring("file:".length());<a name="line.1016"></a>
-<span class="sourceLineNo">1017</span>          }<a name="line.1017"></a>
-<span class="sourceLineNo">1018</span>          // URLDecoder is a misnamed class, since it actually decodes<a name="line.1018"></a>
-<span class="sourceLineNo">1019</span>          // x-www-form-urlencoded MIME type rather than actual<a name="line.1019"></a>
-<span class="sourceLineNo">1020</span>          // URL encoding (which the file path has). Therefore it would<a name="line.1020"></a>
-<span class="sourceLineNo">1021</span>          // decode +s to ' 's which is incorrect (spaces are actually<a name="line.1021"></a>
-<span class="sourceLineNo">1022</span>          // either unencoded or encoded as "%20"). Replace +s first, so<a name="line.1022"></a>
-<span class="sourceLineNo">1023</span>          // that they are kept sacred during the decoding process.<a name="line.1023"></a>
-<span class="sourceLineNo">1024</span>          toReturn = toReturn.replaceAll("\\+", "%2B");<a name="line.1024"></a>
-<span class="sourceLineNo">1025</span>          toReturn = URLDecoder.decode(toReturn, "UTF-8");<a name="line.1025"></a>
-<span class="sourceLineNo">1026</span>          return toReturn.replaceAll("!.*$", "");<a name="line.1026"></a>
-<span class="sourceLineNo">1027</span>        }<a name="line.1027"></a>
-<span class="sourceLineNo">1028</span>      }<a name="line.1028"></a>
-<span class="sourceLineNo">1029</span>    }<a name="line.1029"></a>
-<span class="sourceLineNo">1030</span><a name="line.1030"></a>
-<span class="sourceLineNo">1031</span>    // now look in any jars we've packaged using JarFinder. Returns null when<a name="line.1031"></a>
-<span class="sourceLineNo">1032</span>    // no jar is found.<a name="line.1032"></a>
-<span class="sourceLineNo">1033</span>    return packagedClasses.get(class_file);<a name="line.1033"></a>
-<span class="sourceLineNo">1034</span>  }<a name="line.1034"></a>
-<span class="sourceLineNo">1035</span><a name="line.1035"></a>
-<span class="sourceLineNo">1036</span>  /**<a name="line.1036"></a>
-<span class="sourceLineNo">1037</span>   * Invoke 'getJar' on a custom JarFinder implementation. Useful for some job<a name="line.1037"></a>
-<span class="sourceLineNo">1038</span>   * configuration contexts (HBASE-8140) and also for testing on MRv2.<a name="line.1038"></a>
-<span class="sourceLineNo">1039</span>   * check if we have HADOOP-9426.<a name="line.1039"></a>
-<span class="sourceLineNo">1040</span>   * @param my_class the class to find.<a name="line.1040"></a>
-<span class="sourceLineNo">1041</span>   * @return a jar file that contains the class, or null.<a name="line.1041"></a>
-<span class="sourceLineNo">1042</span>   */<a name="line.1042"></a>
-<span class="sourceLineNo">1043</span>  private static String getJar(Class&lt;?&gt; my_class) {<a name="line.1043"></a>
-<span class="sourceLineNo">1044</span>    String ret = null;<a name="line.1044"></a>
-<span class="sourceLineNo">1045</span>    try {<a name="line.1045"></a>
-<span class="sourceLineNo">1046</span>      ret = JarFinder.getJar(my_class);<a name="line.1046"></a>
-<span class="sourceLineNo">1047</span>    } catch (Exception e) {<a name="line.1047"></a>
-<span class="sourceLineNo">1048</span>      // toss all other exceptions, related to reflection failure<a name="line.1048"></a>
-<span class="sourceLineNo">1049</span>      throw new RuntimeException("getJar invocation failed.", e);<a name="line.1049"></a>
-<span class="sourceLineNo">1050</span>    }<a name="line.1050"></a>
-<span class="sourceLineNo">1051</span><a name="line.1051"></a>
-<span class="sourceLineNo">1052</span>    return ret;<a name="line.1052"></a>
-<span class="sourceLineNo">1053</span>  }<a name="line.1053"></a>
-<span class="sourceLineNo">1054</span>}<a name="line.1054"></a>
+<span class="sourceLineNo">826</span>      com.fasterxml.jackson.annotation.JsonView.class,<a name="line.826"></a>
+<span class="sourceLineNo">827</span>      org.apache.hadoop.hbase.zookeeper.ZKWatcher.class);<a name="line.827"></a>
+<span class="sourceLineNo">828</span>  }<a name="line.828"></a>
+<span class="sourceLineNo">829</span><a name="line.829"></a>
+<span class="sourceLineNo">830</span>  /**<a name="line.830"></a>
+<span class="sourceLineNo">831</span>   * Returns a classpath string built from the content of the "tmpjars" value in {@code conf}.<a name="line.831"></a>
+<span class="sourceLineNo">832</span>   * Also exposed to shell scripts via `bin/hbase mapredcp`.<a name="line.832"></a>
+<span class="sourceLineNo">833</span>   */<a name="line.833"></a>
+<span class="sourceLineNo">834</span>  public static String buildDependencyClasspath(Configuration conf) {<a name="line.834"></a>
+<span class="sourceLineNo">835</span>    if (conf == null) {<a name="line.835"></a>
+<span class="sourceLineNo">836</span>      throw new IllegalArgumentException("Must provide a configuration object.");<a name="line.836"></a>
+<span class="sourceLineNo">837</span>    }<a name="line.837"></a>
+<span class="sourceLineNo">838</span>    Set&lt;String&gt; paths = new HashSet&lt;&gt;(conf.getStringCollection("tmpjars"));<a name="line.838"></a>
+<span class="sourceLineNo">839</span>    if (paths.isEmpty()) {<a name="line.839"></a>
+<span class="sourceLineNo">840</span>      throw new IllegalArgumentException("Configuration contains no tmpjars.");<a name="line.840"></a>
+<span class="sourceLineNo">841</span>    }<a name="line.841"></a>
+<span class="sourceLineNo">842</span>    StringBuilder sb = new StringBuilder();<a name="line.842"></a>
+<span class="sourceLineNo">843</span>    for (String s : paths) {<a name="line.843"></a>
+<span class="sourceLineNo">844</span>      // entries can take the form 'file:/path/to/file.jar'.<a name="line.844"></a>
+<span class="sourceLineNo">845</span>      int idx = s.indexOf(":");<a name="line.845"></a>
+<span class="sourceLineNo">846</span>      if (idx != -1) s = s.substring(idx + 1);<a name="line.846"></a>
+<span class="sourceLineNo">847</span>      if (sb.length() &gt; 0) sb.append(File.pathSeparator);<a name="line.847"></a>
+<span class="sourceLineNo">848</span>      sb.append(s);<a name="line.848"></a>
+<span class="sourceLineNo">849</span>    }<a name="line.849"></a>
+<span class="sourceLineNo">850</span>    return sb.toString();<a name="line.850"></a>
+<span class="sourceLineNo">851</span>  }<a name="line.851"></a>
+<span class="sourceLineNo">852</span><a name="line.852"></a>
+<span class="sourceLineNo">853</span>  /**<a name="line.853"></a>
+<span class="sourceLineNo">854</span>   * Add the HBase dependency jars as well as jars for any of the configured<a name="line.854"></a>
+<span class="sourceLineNo">855</span>   * job classes to the job configuration, so that JobClient will ship them<a name="line.855"></a>
+<span class="sourceLineNo">856</span>   * to the cluster and add them to the DistributedCache.<a name="line.856"></a>
+<span class="sourceLineNo">857</span>   */<a name="line.857"></a>
+<span class="sourceLineNo">858</span>  public static void addDependencyJars(Job job) throws IOException {<a name="line.858"></a>
+<span class="sourceLineNo">859</span>    addHBaseDependencyJars(job.getConfiguration());<a name="line.859"></a>
+<span class="sourceLineNo">860</span>    try {<a name="line.860"></a>
+<span class="sourceLineNo">861</span>      addDependencyJarsForClasses(job.getConfiguration(),<a name="line.861"></a>
+<span class="sourceLineNo">862</span>          // when making changes here, consider also mapred.TableMapReduceUtil<a name="line.862"></a>
+<span class="sourceLineNo">863</span>          // pull job classes<a name="line.863"></a>
+<span class="sourceLineNo">864</span>          job.getMapOutputKeyClass(),<a name="line.864"></a>
+<span class="sourceLineNo">865</span>          job.getMapOutputValueClass(),<a name="line.865"></a>
+<span class="sourceLineNo">866</span>          job.getInputFormatClass(),<a name="line.866"></a>
+<span class="sourceLineNo">867</span>          job.getOutputKeyClass(),<a name="line.867"></a>
+<span class="sourceLineNo">868</span>          job.getOutputValueClass(),<a name="line.868"></a>
+<span class="sourceLineNo">869</span>          job.getOutputFormatClass(),<a name="line.869"></a>
+<span class="sourceLineNo">870</span>          job.getPartitionerClass(),<a name="line.870"></a>
+<span class="sourceLineNo">871</span>          job.getCombinerClass());<a name="line.871"></a>
+<span class="sourceLineNo">872</span>    } catch (ClassNotFoundException e) {<a name="line.872"></a>
+<span class="sourceLineNo">873</span>      throw new IOException(e);<a name="line.873"></a>
+<span class="sourceLineNo">874</span>    }<a name="line.874"></a>
+<span class="sourceLineNo">875</span>  }<a name="line.875"></a>
+<span class="sourceLineNo">876</span><a name="line.876"></a>
+<span class="sourceLineNo">877</span>  /**<a name="line.877"></a>
+<span class="sourceLineNo">878</span>   * Add the jars containing the given classes to the job's configuration<a name="line.878"></a>
+<span class="sourceLineNo">879</span>   * such that JobClient will ship them to the cluster and add them to<a name="line.879"></a>
+<span class="sourceLineNo">880</span>   * the DistributedCache.<a name="line.880"></a>
+<span class="sourceLineNo">881</span>   * @deprecated rely on {@link #addDependencyJars(Job)} instead.<a name="line.881"></a>
+<span class="sourceLineNo">882</span>   */<a name="line.882"></a>
+<span class="sourceLineNo">883</span>  @Deprecated<a name="line.883"></a>
+<span class="sourceLineNo">884</span>  public static void addDependencyJars(Configuration conf,<a name="line.884"></a>
+<span class="sourceLineNo">885</span>      Class&lt;?&gt;... classes) throws IOException {<a name="line.885"></a>
+<span class="sourceLineNo">886</span>    LOG.warn("The addDependencyJars(Configuration, Class&lt;?&gt;...) method has been deprecated since it"<a name="line.886"></a>
+<span class="sourceLineNo">887</span>             + " is easy to use incorrectly. Most users should rely on addDependencyJars(Job) " +<a name="line.887"></a>
+<span class="sourceLineNo">888</span>             "instead. See HBASE-8386 for more details.");<a name="line.888"></a>
+<span class="sourceLineNo">889</span>    addDependencyJarsForClasses(conf, classes);<a name="line.889"></a>
+<span class="sourceLineNo">890</span>  }<a name="line.890"></a>
+<span class="sourceLineNo">891</span><a name="line.891"></a>
+<span class="sourceLineNo">892</span>  /**<a name="line.892"></a>
+<span class="sourceLineNo">893</span>   * Add the jars containing the given classes to the job's configuration<a name="line.893"></a>
+<span class="sourceLineNo">894</span>   * such that JobClient will ship them to the cluster and add them to<a name="line.894"></a>
+<span class="sourceLineNo">895</span>   * the DistributedCache.<a name="line.895"></a>
+<span class="sourceLineNo">896</span>   *<a name="line.896"></a>
+<span class="sourceLineNo">897</span>   * N.B. that this method at most adds one jar per class given. If there is more than one<a name="line.897"></a>
+<span class="sourceLineNo">898</span>   * jar available containing a class with the same name as a given class, we don't define<a name="line.898"></a>
+<span class="sourceLineNo">899</span>   * which of those jars might be chosen.<a name="line.899"></a>
+<span class="sourceLineNo">900</span>   *<a name="line.900"></a>
+<span class="sourceLineNo">901</span>   * @param conf The Hadoop Configuration to modify<a name="line.901"></a>
+<span class="sourceLineNo">902</span>   * @param classes will add just those dependencies needed to find the given classes<a name="line.902"></a>
+<span class="sourceLineNo">903</span>   * @throws IOException if an underlying library call fails.<a name="line.903"></a>
+<span class="sourceLineNo">904</span>   */<a name="line.904"></a>
+<span class="sourceLineNo">905</span>  @InterfaceAudience.Private<a name="line.905"></a>
+<span class="sourceLineNo">906</span>  public static void addDependencyJarsForClasses(Configuration conf,<a name="line.906"></a>
+<span class="sourceLineNo">907</span>      Class&lt;?&gt;... classes) throws IOException {<a name="line.907"></a>
+<span class="sourceLineNo">908</span><a name="line.908"></a>
+<span class="sourceLineNo">909</span>    FileSystem localFs = FileSystem.getLocal(conf);<a name="line.909"></a>
+<span class="sourceLineNo">910</span>    Set&lt;String&gt; jars = new HashSet&lt;&gt;();<a name="line.910"></a>
+<span class="sourceLineNo">911</span>    // Add jars that are already in the tmpjars variable<a name="line.911"></a>
+<span class="sourceLineNo">912</span>    jars.addAll(conf.getStringCollection("tmpjars"));<a name="line.912"></a>
+<span class="sourceLineNo">913</span><a name="line.913"></a>
+<span class="sourceLineNo">914</span>    // add jars as we find them to a map of contents jar name so that we can avoid<a name="line.914"></a>
+<span class="sourceLineNo">915</span>    // creating new jars for classes that have already been packaged.<a name="line.915"></a>
+<span class="sourceLineNo">916</span>    Map&lt;String, String&gt; packagedClasses = new HashMap&lt;&gt;();<a name="line.916"></a>
+<span class="sourceLineNo">917</span><a name="line.917"></a>
+<span class="sourceLineNo">918</span>    // Add jars containing the specified classes<a name="line.918"></a>
+<span class="sourceLineNo">919</span>    for (Class&lt;?&gt; clazz : classes) {<a name="line.919"></a>
+<span class="sourceLineNo">920</span>      if (clazz == null) continue;<a name="line.920"></a>
+<span class="sourceLineNo">921</span><a name="line.921"></a>
+<span class="sourceLineNo">922</span>      Path path = findOrCreateJar(clazz, localFs, packagedClasses);<a name="line.922"></a>
+<span class="sourceLineNo">923</span>      if (path == null) {<a name="line.923"></a>
+<span class="sourceLineNo">924</span>        LOG.warn("Could not find jar for class " + clazz +<a name="line.924"></a>
+<span class="sourceLineNo">925</span>                 " in order to ship it to the cluster.");<a name="line.925"></a>
+<span class="sourceLineNo">926</span>        continue;<a name="line.926"></a>
+<span class="sourceLineNo">927</span>      }<a name="line.927"></a>
+<span class="sourceLineNo">928</span>      if (!localFs.exists(path)) {<a name="line.928"></a>
+<span class="sourceLineNo">929</span>        LOG.warn("Could not validate jar file " + path + " for class "<a name="line.929"></a>
+<span class="sourceLineNo">930</span>                 + clazz);<a name="line.930"></a>
+<span class="sourceLineNo">931</span>        continue;<a name="line.931"></a>
+<span class="sourceLineNo">932</span>      }<a name="line.932"></a>
+<span class="sourceLineNo">933</span>      jars.add(path.toString());<a name="line.933"></a>
+<span class="sourceLineNo">934</span>    }<a name="line.934"></a>
+<span class="sourceLineNo">935</span>    if (jars.isEmpty()) return;<a name="line.935"></a>
+<span class="sourceLineNo">936</span><a name="line.936"></a>
+<span class="sourceLineNo">937</span>    conf.set("tmpjars", StringUtils.arrayToString(jars.toArray(new String[jars.size()])));<a name="line.937"></a>
+<span class="sourceLineNo">938</span>  }<a name="line.938"></a>
+<span class="sourceLineNo">939</span><a name="line.939"></a>
+<span class="sourceLineNo">940</span>  /**<a name="line.940"></a>
+<span class="sourceLineNo">941</span>   * Finds the Jar for a class or creates it if it doesn't exist. If the class is in<a name="line.941"></a>
+<span class="sourceLineNo">942</span>   * a directory in the classpath, it creates a Jar on the fly with the<a name="line.942"></a>
+<span class="sourceLineNo">943</span>   * contents of the directory and returns the path to that Jar. If a Jar is<a name="line.943"></a>
+<span class="sourceLineNo">944</span>   * created, it is created in the system temporary directory. Otherwise,<a name="line.944"></a>
+<span class="sourceLineNo">945</span>   * returns an existing jar that contains a class of the same name. Maintains<a name="line.945"></a>
+<span class="sourceLineNo">946</span>   * a mapping from jar contents to the tmp jar created.<a name="line.946"></a>
+<span class="sourceLineNo">947</span>   * @param my_class the class to find.<a name="line.947"></a>
+<span class="sourceLineNo">948</span>   * @param fs the FileSystem with which to qualify the returned path.<a name="line.948"></a>
+<span class="sourceLineNo">949</span>   * @param packagedClasses a map of class name to path.<a name="line.949"></a>
+<span class="sourceLineNo">950</span>   * @return a jar file that contains the class.<a name="line.950"></a>
+<span class="sourceLineNo">951</span>   * @throws IOException<a name="line.951"></a>
+<span class="sourceLineNo">952</span>   */<a name="line.952"></a>
+<span class="sourceLineNo">953</span>  private static Path findOrCreateJar(Class&lt;?&gt; my_class, FileSystem fs,<a name="line.953"></a>
+<span class="sourceLineNo">954</span>      Map&lt;String, String&gt; packagedClasses)<a name="line.954"></a>
+<span class="sourceLineNo">955</span>  throws IOException {<a name="line.955"></a>
+<span class="sourceLineNo">956</span>    // attempt to locate an existing jar for the class.<a name="line.956"></a>
+<span class="sourceLineNo">957</span>    String jar = findContainingJar(my_class, packagedClasses);<a name="line.957"></a>
+<span class="sourceLineNo">958</span>    if (null == jar || jar.isEmpty()) {<a name="line.958"></a>
+<span class="sourceLineNo">959</span>      jar = getJar(my_class);<a name="line.959"></a>
+<span class="sourceLineNo">960</span>      updateMap(jar, packagedClasses);<a name="line.960"></a>
+<span class="sourceLineNo">961</span>    }<a name="line.961"></a>
+<span class="sourceLineNo">962</span><a name="line.962"></a>
+<span class="sourceLineNo">963</span>    if (null == jar || jar.isEmpty()) {<a name="line.963"></a>
+<span class="sourceLineNo">964</span>      return null;<a name="line.964"></a>
+<span class="sourceLineNo">965</span>    }<a name="line.965"></a>
+<span class="sourceLineNo">966</span><a name="line.966"></a>
+<span class="sourceLineNo">967</span>    LOG.debug(String.format("For class %s, using jar %s", my_class.getName(), jar));<a name="line.967"></a>
+<span class="sourceLineNo">968</span>    return new Path(jar).makeQualified(fs);<a name="line.968"></a>
+<span class="sourceLineNo">969</span>  }<a name="line.969"></a>
+<span class="sourceLineNo">970</span><a name="line.970"></a>
+<span class="sourceLineNo">971</span>  /**<a name="line.971"></a>
+<span class="sourceLineNo">972</span>   * Add entries to &lt;code&gt;packagedClasses&lt;/code&gt; corresponding to class files<a name="line.972"></a>
+<span class="sourceLineNo">973</span>   * contained in &lt;code&gt;jar&lt;/code&gt;.<a name="line.973"></a>
+<span class="sourceLineNo">974</span>   * @param jar The jar who's content to list.<a name="line.974"></a>
+<span class="sourceLineNo">975</span>   * @param packagedClasses map[class -&gt; jar]<a name="line.975"></a>
+<span class="sourceLineNo">976</span>   */<a name="line.976"></a>
+<span class="sourceLineNo">977</span>  private static void updateMap(String jar, Map&lt;String, String&gt; packagedClasses) throws IOException {<a name="line.977"></a>
+<span class="sourceLineNo">978</span>    if (null == jar || jar.isEmpty()) {<a name="line.978"></a>
+<span class="sourceLineNo">979</span>      return;<a name="line.979"></a>
+<span class="sourceLineNo">980</span>    }<a name="line.980"></a>
+<span class="sourceLineNo">981</span>    ZipFile zip = null;<a name="line.981"></a>
+<span class="sourceLineNo">982</span>    try {<a name="line.982"></a>
+<span class="sourceLineNo">983</span>      zip = new ZipFile(jar);<a name="line.983"></a>
+<span class="sourceLineNo">984</span>      for (Enumeration&lt;? extends ZipEntry&gt; iter = zip.entries(); iter.hasMoreElements();) {<a name="line.984"></a>
+<span class="sourceLineNo">985</span>        ZipEntry entry = iter.nextElement();<a name="line.985"></a>
+<span class="sourceLineNo">986</span>        if (entry.getName().endsWith("class")) {<a name="line.986"></a>
+<span class="sourceLineNo">987</span>          packagedClasses.put(entry.getName(), jar);<a name="line.987"></a>
+<span class="sourceLineNo">988</span>        }<a name="line.988"></a>
+<span class="sourceLineNo">989</span>      }<a name="line.989"></a>
+<span class="sourceLineNo">990</span>    } finally {<a name="line.990"></a>
+<span class="sourceLineNo">991</span>      if (null != zip) zip.close();<a name="line.991"></a>
+<span class="sourceLineNo">992</span>    }<a name="line.992"></a>
+<span class="sourceLineNo">993</span>  }<a name="line.993"></a>
+<span class="sourceLineNo">994</span><a name="line.994"></a>
+<span class="sourceLineNo">995</span>  /**<a name="line.995"></a>
+<span class="sourceLineNo">996</span>   * Find a jar that contains a class of the same name, if any. It will return<a name="line.996"></a>
+<span class="sourceLineNo">997</span>   * a jar file, even if that is not the first thing on the class path that<a name="line.997"></a>
+<span class="sourceLineNo">998</span>   * has a class with the same name. Looks first on the classpath and then in<a name="line.998"></a>
+<span class="sourceLineNo">999</span>   * the &lt;code&gt;packagedClasses&lt;/code&gt; map.<a name="line.999"></a>
+<span class="sourceLineNo">1000</span>   * @param my_class the class to find.<a name="line.1000"></a>
+<span class="sourceLineNo">1001</span>   * @return a jar file that contains the class, or null.<a name="line.1001"></a>
+<span class="sourceLineNo">1002</span>   * @throws IOException<a name="line.1002"></a>
+<span class="sourceLineNo">1003</span>   */<a name="line.1003"></a>
+<span class="sourceLineNo">1004</span>  private static String findContainingJar(Class&lt;?&gt; my_class, Map&lt;String, String&gt; packagedClasses)<a name="line.1004"></a>
+<span class="sourceLineNo">1005</span>      throws IOException {<a name="line.1005"></a>
+<span class="sourceLineNo">1006</span>    ClassLoader loader = my_class.getClassLoader();<a name="line.1006"></a>
+<span class="sourceLineNo">1007</span><a name="line.1007"></a>
+<span class="sourceLineNo">1008</span>    String class_file = my_class.getName().replaceAll("\\.", "/") + ".class";<a name="line.1008"></a>
+<span class="sourceLineNo">1009</span><a name="line.1009"></a>
+<span class="sourceLineNo">1010</span>    if (loader != null) {<a name="line.1010"></a>
+<span class="sourceLineNo">1011</span>      // first search the classpath<a name="line.1011"></a>
+<span class="sourceLineNo">1012</span>      for (Enumeration&lt;URL&gt; itr = loader.getResources(class_file); itr.hasMoreElements();) {<a name="line.1012"></a>
+<span class="sourceLineNo">1013</span>        URL url = itr.nextElement();<a name="line.1013"></a>
+<span class="sourceLineNo">1014</span>        if ("jar".equals(url.getProtocol())) {<a name="line.1014"></a>
+<span class="sourceLineNo">1015</span>          String toReturn = url.getPath();<a name="line.1015"></a>
+<span class="sourceLineNo">1016</span>          if (toReturn.startsWith("file:")) {<a name="line.1016"></a>
+<span class="sourceLineNo">1017</span>            toReturn = toReturn.substring("file:".length());<a name="line.1017"></a>
+<span class="sourceLineNo">1018</span>          }<a name="line.1018"></a>
+<span class="sourceLineNo">1019</span>          // URLDecoder is a misnamed class, since it actually decodes<a name="line.1019"></a>
+<span class="sourceLineNo">1020</span>          // x-www-form-urlencoded MIME type rather than actual<a name="line.1020"></a>
+<span class="sourceLineNo">1021</span>          // URL encoding (which the file path has). Therefore it would<a name="line.1021"></a>
+<span class="sourceLineNo">1022</span>          // decode +s to ' 's which is incorrect (spaces are actually<a name="line.1022"></a>
+<span class="sourceLineNo">1023</span>          // either unencoded or encoded as "%20"). Replace +s first, so<a name="line.1023"></a>
+<span class="sourceLineNo">1024</span>          // that they are kept sacred during the decoding process.<a name="line.1024"></a>
+<span class="sourceLineNo">1025</span>          toReturn = toReturn.replaceAll("\\+", "%2B");<a name="line.1025"></a>
+<span class="sourceLineNo">1026</span>          toReturn = URLDecoder.decode(toReturn, "UTF-8");<a name="line.1026"></a>
+<span class="sourceLineNo">1027</span>          return toReturn.replaceAll("!.*$", "");<a name="line.1027"></a>
+<span class="sourceLineNo">1028</span>        }<a name="line.1028"></a>
+<span class="sourceLineNo">1029</span>      }<a name="line.1029"></a>
+<span class="sourceLineNo">1030</span>    }<a name="line.1030"></a>
+<span class="sourceLineNo">1031</span><a name="line.1031"></a>
+<span class="sourceLineNo">1032</span>    // now look in any jars we've packaged using JarFinder. Returns null when<a name="line.1032"></a>
+<span class="sourceLineNo">1033</span>    // no jar is found.<a name="line.1033"></a>
+<span class="sourceLineNo">1034</span>    return packagedClasses.get(class_file);<a name="line.1034"></a>
+<span class="sourceLineNo">1035</span>  }<a name="line.1035"></a>
+<span class="sourceLineNo">1036</span><a name="line.1036"></a>
+<span class="sourceLineNo">1037</span>  /**<a name="line.1037"></a>
+<span class="sourceLineNo">1038</span>   * Invoke 'getJar' on a custom JarFinder implementation. Useful for some job<a name="line.1038"></a>
+<span class="sourceLineNo">1039</span>   * configuration contexts (HBASE-8140) and also for testing on MRv2.<a name="line.1039"></a>
+<span class="sourceLineNo">1040</span>   * check if we have HADOOP-9426.<a name="line.1040"></a>
+<span class="sourceLineNo">1041</span>   * @param my_class the class to find.<a name="line.1041"></a>
+<span class="sourceLineNo">1042</span>   * @return a jar file that contains the class, or null.<a name="line.1042"></a>
+<span class="sourceLineNo">1043</span>   */<a name="line.1043"></a>
+<span class="sourceLineNo">1044</span>  private static String getJar(Class&lt;?&gt; my_class) {<a name="line.1044"></a>
+<span class="sourceLineNo">1045</span>    String ret = null;<a name="line.1045"></a>
+<span class="sourceLineNo">1046</span>    try {<a name="line.1046"></a>
+<span class="sourceLineNo">1047</span>      ret = JarFinder.getJar(my_class);<a name="line.1047"></a>
+<span class="sourceLineNo">1048</span>    } catch (Exception e) {<a name="line.1048"></a>
+<span class="sourceLineNo">1049</span>      // toss all other exceptions, related to reflection failure<a name="line.1049"></a>
+<span class="sourceLineNo">1050</span>      throw new RuntimeException("getJar invocation failed.", e);<a name="line.1050"></a>
+<span class="sourceLineNo">1051</span>    }<a name="line.1051"></a>
+<span class="sourceLineNo">1052</span><a name="line.1052"></a>
+<span class="sourceLineNo">1053</span>    return ret;<a name="line.1053"></a>
+<span class="sourceLineNo">1054</span>  }<a name="line.1054"></a>
+<span class="sourceLineNo">1055</span>}<a name="line.1055"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b9722a17/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterCoprocessorHost.MasterEnvironment.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterCoprocessorHost.MasterEnvironment.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterCoprocessorHost.MasterEnvironment.html
index 860d344..9fa61e7 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterCoprocessorHost.MasterEnvironment.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterCoprocessorHost.MasterEnvironment.html
@@ -1604,71 +1604,72 @@
 <span class="sourceLineNo">1596</span>    });<a name="line.1596"></a>
 <span class="sourceLineNo">1597</span>  }<a name="line.1597"></a>
 <span class="sourceLineNo">1598</span><a name="line.1598"></a>
-<span class="sourceLineNo">1599</span>  public void postClearDeadServers() throws IOException {<a name="line.1599"></a>
-<span class="sourceLineNo">1600</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1600"></a>
-<span class="sourceLineNo">1601</span>      @Override<a name="line.1601"></a>
-<span class="sourceLineNo">1602</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1602"></a>
-<span class="sourceLineNo">1603</span>        observer.postClearDeadServers(this);<a name="line.1603"></a>
-<span class="sourceLineNo">1604</span>      }<a name="line.1604"></a>
-<span class="sourceLineNo">1605</span>    });<a name="line.1605"></a>
-<span class="sourceLineNo">1606</span>  }<a name="line.1606"></a>
-<span class="sourceLineNo">1607</span><a name="line.1607"></a>
-<span class="sourceLineNo">1608</span>  public void preDecommissionRegionServers(List&lt;ServerName&gt; servers, boolean offload) throws IOException {<a name="line.1608"></a>
-<span class="sourceLineNo">1609</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1609"></a>
-<span class="sourceLineNo">1610</span>      @Override<a name="line.1610"></a>
-<span class="sourceLineNo">1611</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1611"></a>
-<span class="sourceLineNo">1612</span>        observer.preDecommissionRegionServers(this, servers, offload);<a name="line.1612"></a>
-<span class="sourceLineNo">1613</span>      }<a name="line.1613"></a>
-<span class="sourceLineNo">1614</span>    });<a name="line.1614"></a>
-<span class="sourceLineNo">1615</span>  }<a name="line.1615"></a>
-<span class="sourceLineNo">1616</span><a name="line.1616"></a>
-<span class="sourceLineNo">1617</span>  public void postDecommissionRegionServers(List&lt;ServerName&gt; servers, boolean offload) throws IOException {<a name="line.1617"></a>
-<span class="sourceLineNo">1618</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1618"></a>
-<span class="sourceLineNo">1619</span>      @Override<a name="line.1619"></a>
-<span class="sourceLineNo">1620</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1620"></a>
-<span class="sourceLineNo">1621</span>        observer.postDecommissionRegionServers(this, servers, offload);<a name="line.1621"></a>
-<span class="sourceLineNo">1622</span>      }<a name="line.1622"></a>
-<span class="sourceLineNo">1623</span>    });<a name="line.1623"></a>
-<span class="sourceLineNo">1624</span>  }<a name="line.1624"></a>
-<span class="sourceLineNo">1625</span><a name="line.1625"></a>
-<span class="sourceLineNo">1626</span>  public void preListDecommissionedRegionServers() throws IOException {<a name="line.1626"></a>
-<span class="sourceLineNo">1627</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1627"></a>
-<span class="sourceLineNo">1628</span>      @Override<a name="line.1628"></a>
-<span class="sourceLineNo">1629</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1629"></a>
-<span class="sourceLineNo">1630</span>        observer.preListDecommissionedRegionServers(this);<a name="line.1630"></a>
-<span class="sourceLineNo">1631</span>      }<a name="line.1631"></a>
-<span class="sourceLineNo">1632</span>    });<a name="line.1632"></a>
-<span class="sourceLineNo">1633</span>  }<a name="line.1633"></a>
-<span class="sourceLineNo">1634</span><a name="line.1634"></a>
-<span class="sourceLineNo">1635</span>  public void postListDecommissionedRegionServers() throws IOException {<a name="line.1635"></a>
-<span class="sourceLineNo">1636</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1636"></a>
-<span class="sourceLineNo">1637</span>      @Override<a name="line.1637"></a>
-<span class="sourceLineNo">1638</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1638"></a>
-<span class="sourceLineNo">1639</span>        observer.postListDecommissionedRegionServers(this);<a name="line.1639"></a>
-<span class="sourceLineNo">1640</span>      }<a name="line.1640"></a>
-<span class="sourceLineNo">1641</span>    });<a name="line.1641"></a>
-<span class="sourceLineNo">1642</span>  }<a name="line.1642"></a>
-<span class="sourceLineNo">1643</span><a name="line.1643"></a>
-<span class="sourceLineNo">1644</span>  public void preRecommissionRegionServer(ServerName server, List&lt;byte[]&gt; encodedRegionNames)<a name="line.1644"></a>
-<span class="sourceLineNo">1645</span>      throws IOException {<a name="line.1645"></a>
-<span class="sourceLineNo">1646</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1646"></a>
-<span class="sourceLineNo">1647</span>      @Override<a name="line.1647"></a>
-<span class="sourceLineNo">1648</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1648"></a>
-<span class="sourceLineNo">1649</span>        observer.preRecommissionRegionServer(this, server, encodedRegionNames);<a name="line.1649"></a>
-<span class="sourceLineNo">1650</span>      }<a name="line.1650"></a>
-<span class="sourceLineNo">1651</span>    });<a name="line.1651"></a>
-<span class="sourceLineNo">1652</span>  }<a name="line.1652"></a>
-<span class="sourceLineNo">1653</span><a name="line.1653"></a>
-<span class="sourceLineNo">1654</span>  public void postRecommissionRegionServer(ServerName server, List&lt;byte[]&gt; encodedRegionNames)<a name="line.1654"></a>
-<span class="sourceLineNo">1655</span>      throws IOException {<a name="line.1655"></a>
-<span class="sourceLineNo">1656</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1656"></a>
-<span class="sourceLineNo">1657</span>      @Override<a name="line.1657"></a>
-<span class="sourceLineNo">1658</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1658"></a>
-<span class="sourceLineNo">1659</span>        observer.postRecommissionRegionServer(this, server, encodedRegionNames);<a name="line.1659"></a>
-<span class="sourceLineNo">1660</span>      }<a name="line.1660"></a>
-<span class="sourceLineNo">1661</span>    });<a name="line.1661"></a>
-<span class="sourceLineNo">1662</span>  }<a name="line.1662"></a>
-<span class="sourceLineNo">1663</span>}<a name="line.1663"></a>
+<span class="sourceLineNo">1599</span>  public void postClearDeadServers(List&lt;ServerName&gt; servers,<a name="line.1599"></a>
+<span class="sourceLineNo">1600</span>      List&lt;ServerName&gt; notClearedServers) throws IOException {<a name="line.1600"></a>
+<span class="sourceLineNo">1601</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1601"></a>
+<span class="sourceLineNo">1602</span>      @Override<a name="line.1602"></a>
+<span class="sourceLineNo">1603</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1603"></a>
+<span class="sourceLineNo">1604</span>        observer.postClearDeadServers(this, servers, notClearedServers);<a name="line.1604"></a>
+<span class="sourceLineNo">1605</span>      }<a name="line.1605"></a>
+<span class="sourceLineNo">1606</span>    });<a name="line.1606"></a>
+<span class="sourceLineNo">1607</span>  }<a name="line.1607"></a>
+<span class="sourceLineNo">1608</span><a name="line.1608"></a>
+<span class="sourceLineNo">1609</span>  public void preDecommissionRegionServers(List&lt;ServerName&gt; servers, boolean offload) throws IOException {<a name="line.1609"></a>
+<span class="sourceLineNo">1610</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1610"></a>
+<span class="sourceLineNo">1611</span>      @Override<a name="line.1611"></a>
+<span class="sourceLineNo">1612</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1612"></a>
+<span class="sourceLineNo">1613</span>        observer.preDecommissionRegionServers(this, servers, offload);<a name="line.1613"></a>
+<span class="sourceLineNo">1614</span>      }<a name="line.1614"></a>
+<span class="sourceLineNo">1615</span>    });<a name="line.1615"></a>
+<span class="sourceLineNo">1616</span>  }<a name="line.1616"></a>
+<span class="sourceLineNo">1617</span><a name="line.1617"></a>
+<span class="sourceLineNo">1618</span>  public void postDecommissionRegionServers(List&lt;ServerName&gt; servers, boolean offload) throws IOException {<a name="line.1618"></a>
+<span class="sourceLineNo">1619</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1619"></a>
+<span class="sourceLineNo">1620</span>      @Override<a name="line.1620"></a>
+<span class="sourceLineNo">1621</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1621"></a>
+<span class="sourceLineNo">1622</span>        observer.postDecommissionRegionServers(this, servers, offload);<a name="line.1622"></a>
+<span class="sourceLineNo">1623</span>      }<a name="line.1623"></a>
+<span class="sourceLineNo">1624</span>    });<a name="line.1624"></a>
+<span class="sourceLineNo">1625</span>  }<a name="line.1625"></a>
+<span class="sourceLineNo">1626</span><a name="line.1626"></a>
+<span class="sourceLineNo">1627</span>  public void preListDecommissionedRegionServers() throws IOException {<a name="line.1627"></a>
+<span class="sourceLineNo">1628</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1628"></a>
+<span class="sourceLineNo">1629</span>      @Override<a name="line.1629"></a>
+<span class="sourceLineNo">1630</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1630"></a>
+<span class="sourceLineNo">1631</span>        observer.preListDecommissionedRegionServers(this);<a name="line.1631"></a>
+<span class="sourceLineNo">1632</span>      }<a name="line.1632"></a>
+<span class="sourceLineNo">1633</span>    });<a name="line.1633"></a>
+<span class="sourceLineNo">1634</span>  }<a name="line.1634"></a>
+<span class="sourceLineNo">1635</span><a name="line.1635"></a>
+<span class="sourceLineNo">1636</span>  public void postListDecommissionedRegionServers() throws IOException {<a name="line.1636"></a>
+<span class="sourceLineNo">1637</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1637"></a>
+<span class="sourceLineNo">1638</span>      @Override<a name="line.1638"></a>
+<span class="sourceLineNo">1639</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1639"></a>
+<span class="sourceLineNo">1640</span>        observer.postListDecommissionedRegionServers(this);<a name="line.1640"></a>
+<span class="sourceLineNo">1641</span>      }<a name="line.1641"></a>
+<span class="sourceLineNo">1642</span>    });<a name="line.1642"></a>
+<span class="sourceLineNo">1643</span>  }<a name="line.1643"></a>
+<span class="sourceLineNo">1644</span><a name="line.1644"></a>
+<span class="sourceLineNo">1645</span>  public void preRecommissionRegionServer(ServerName server, List&lt;byte[]&gt; encodedRegionNames)<a name="line.1645"></a>
+<span class="sourceLineNo">1646</span>      throws IOException {<a name="line.1646"></a>
+<span class="sourceLineNo">1647</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1647"></a>
+<span class="sourceLineNo">1648</span>      @Override<a name="line.1648"></a>
+<span class="sourceLineNo">1649</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1649"></a>
+<span class="sourceLineNo">1650</span>        observer.preRecommissionRegionServer(this, server, encodedRegionNames);<a name="line.1650"></a>
+<span class="sourceLineNo">1651</span>      }<a name="line.1651"></a>
+<span class="sourceLineNo">1652</span>    });<a name="line.1652"></a>
+<span class="sourceLineNo">1653</span>  }<a name="line.1653"></a>
+<span class="sourceLineNo">1654</span><a name="line.1654"></a>
+<span class="sourceLineNo">1655</span>  public void postRecommissionRegionServer(ServerName server, List&lt;byte[]&gt; encodedRegionNames)<a name="line.1655"></a>
+<span class="sourceLineNo">1656</span>      throws IOException {<a name="line.1656"></a>
+<span class="sourceLineNo">1657</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1657"></a>
+<span class="sourceLineNo">1658</span>      @Override<a name="line.1658"></a>
+<span class="sourceLineNo">1659</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1659"></a>
+<span class="sourceLineNo">1660</span>        observer.postRecommissionRegionServer(this, server, encodedRegionNames);<a name="line.1660"></a>
+<span class="sourceLineNo">1661</span>      }<a name="line.1661"></a>
+<span class="sourceLineNo">1662</span>    });<a name="line.1662"></a>
+<span class="sourceLineNo">1663</span>  }<a name="line.1663"></a>
+<span class="sourceLineNo">1664</span>}<a name="line.1664"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/b9722a17/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterCoprocessorHost.MasterEnvironmentForCoreCoprocessors.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterCoprocessorHost.MasterEnvironmentForCoreCoprocessors.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterCoprocessorHost.MasterEnvironmentForCoreCoprocessors.html
index 860d344..9fa61e7 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterCoprocessorHost.MasterEnvironmentForCoreCoprocessors.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterCoprocessorHost.MasterEnvironmentForCoreCoprocessors.html
@@ -1604,71 +1604,72 @@
 <span class="sourceLineNo">1596</span>    });<a name="line.1596"></a>
 <span class="sourceLineNo">1597</span>  }<a name="line.1597"></a>
 <span class="sourceLineNo">1598</span><a name="line.1598"></a>
-<span class="sourceLineNo">1599</span>  public void postClearDeadServers() throws IOException {<a name="line.1599"></a>
-<span class="sourceLineNo">1600</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1600"></a>
-<span class="sourceLineNo">1601</span>      @Override<a name="line.1601"></a>
-<span class="sourceLineNo">1602</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1602"></a>
-<span class="sourceLineNo">1603</span>        observer.postClearDeadServers(this);<a name="line.1603"></a>
-<span class="sourceLineNo">1604</span>      }<a name="line.1604"></a>
-<span class="sourceLineNo">1605</span>    });<a name="line.1605"></a>
-<span class="sourceLineNo">1606</span>  }<a name="line.1606"></a>
-<span class="sourceLineNo">1607</span><a name="line.1607"></a>
-<span class="sourceLineNo">1608</span>  public void preDecommissionRegionServers(List&lt;ServerName&gt; servers, boolean offload) throws IOException {<a name="line.1608"></a>
-<span class="sourceLineNo">1609</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1609"></a>
-<span class="sourceLineNo">1610</span>      @Override<a name="line.1610"></a>
-<span class="sourceLineNo">1611</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1611"></a>
-<span class="sourceLineNo">1612</span>        observer.preDecommissionRegionServers(this, servers, offload);<a name="line.1612"></a>
-<span class="sourceLineNo">1613</span>      }<a name="line.1613"></a>
-<span class="sourceLineNo">1614</span>    });<a name="line.1614"></a>
-<span class="sourceLineNo">1615</span>  }<a name="line.1615"></a>
-<span class="sourceLineNo">1616</span><a name="line.1616"></a>
-<span class="sourceLineNo">1617</span>  public void postDecommissionRegionServers(List&lt;ServerName&gt; servers, boolean offload) throws IOException {<a name="line.1617"></a>
-<span class="sourceLineNo">1618</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1618"></a>
-<span class="sourceLineNo">1619</span>      @Override<a name="line.1619"></a>
-<span class="sourceLineNo">1620</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1620"></a>
-<span class="sourceLineNo">1621</span>        observer.postDecommissionRegionServers(this, servers, offload);<a name="line.1621"></a>
-<span class="sourceLineNo">1622</span>      }<a name="line.1622"></a>
-<span class="sourceLineNo">1623</span>    });<a name="line.1623"></a>
-<span class="sourceLineNo">1624</span>  }<a name="line.1624"></a>
-<span class="sourceLineNo">1625</span><a name="line.1625"></a>
-<span class="sourceLineNo">1626</span>  public void preListDecommissionedRegionServers() throws IOException {<a name="line.1626"></a>
-<span class="sourceLineNo">1627</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1627"></a>
-<span class="sourceLineNo">1628</span>      @Override<a name="line.1628"></a>
-<span class="sourceLineNo">1629</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1629"></a>
-<span class="sourceLineNo">1630</span>        observer.preListDecommissionedRegionServers(this);<a name="line.1630"></a>
-<span class="sourceLineNo">1631</span>      }<a name="line.1631"></a>
-<span class="sourceLineNo">1632</span>    });<a name="line.1632"></a>
-<span class="sourceLineNo">1633</span>  }<a name="line.1633"></a>
-<span class="sourceLineNo">1634</span><a name="line.1634"></a>
-<span class="sourceLineNo">1635</span>  public void postListDecommissionedRegionServers() throws IOException {<a name="line.1635"></a>
-<span class="sourceLineNo">1636</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1636"></a>
-<span class="sourceLineNo">1637</span>      @Override<a name="line.1637"></a>
-<span class="sourceLineNo">1638</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1638"></a>
-<span class="sourceLineNo">1639</span>        observer.postListDecommissionedRegionServers(this);<a name="line.1639"></a>
-<span class="sourceLineNo">1640</span>      }<a name="line.1640"></a>
-<span class="sourceLineNo">1641</span>    });<a name="line.1641"></a>
-<span class="sourceLineNo">1642</span>  }<a name="line.1642"></a>
-<span class="sourceLineNo">1643</span><a name="line.1643"></a>
-<span class="sourceLineNo">1644</span>  public void preRecommissionRegionServer(ServerName server, List&lt;byte[]&gt; encodedRegionNames)<a name="line.1644"></a>
-<span class="sourceLineNo">1645</span>      throws IOException {<a name="line.1645"></a>
-<span class="sourceLineNo">1646</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1646"></a>
-<span class="sourceLineNo">1647</span>      @Override<a name="line.1647"></a>
-<span class="sourceLineNo">1648</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1648"></a>
-<span class="sourceLineNo">1649</span>        observer.preRecommissionRegionServer(this, server, encodedRegionNames);<a name="line.1649"></a>
-<span class="sourceLineNo">1650</span>      }<a name="line.1650"></a>
-<span class="sourceLineNo">1651</span>    });<a name="line.1651"></a>
-<span class="sourceLineNo">1652</span>  }<a name="line.1652"></a>
-<span class="sourceLineNo">1653</span><a name="line.1653"></a>
-<span class="sourceLineNo">1654</span>  public void postRecommissionRegionServer(ServerName server, List&lt;byte[]&gt; encodedRegionNames)<a name="line.1654"></a>
-<span class="sourceLineNo">1655</span>      throws IOException {<a name="line.1655"></a>
-<span class="sourceLineNo">1656</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1656"></a>
-<span class="sourceLineNo">1657</span>      @Override<a name="line.1657"></a>
-<span class="sourceLineNo">1658</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1658"></a>
-<span class="sourceLineNo">1659</span>        observer.postRecommissionRegionServer(this, server, encodedRegionNames);<a name="line.1659"></a>
-<span class="sourceLineNo">1660</span>      }<a name="line.1660"></a>
-<span class="sourceLineNo">1661</span>    });<a name="line.1661"></a>
-<span class="sourceLineNo">1662</span>  }<a name="line.1662"></a>
-<span class="sourceLineNo">1663</span>}<a name="line.1663"></a>
+<span class="sourceLineNo">1599</span>  public void postClearDeadServers(List&lt;ServerName&gt; servers,<a name="line.1599"></a>
+<span class="sourceLineNo">1600</span>      List&lt;ServerName&gt; notClearedServers) throws IOException {<a name="line.1600"></a>
+<span class="sourceLineNo">1601</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1601"></a>
+<span class="sourceLineNo">1602</span>      @Override<a name="line.1602"></a>
+<span class="sourceLineNo">1603</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1603"></a>
+<span class="sourceLineNo">1604</span>        observer.postClearDeadServers(this, servers, notClearedServers);<a name="line.1604"></a>
+<span class="sourceLineNo">1605</span>      }<a name="line.1605"></a>
+<span class="sourceLineNo">1606</span>    });<a name="line.1606"></a>
+<span class="sourceLineNo">1607</span>  }<a name="line.1607"></a>
+<span class="sourceLineNo">1608</span><a name="line.1608"></a>
+<span class="sourceLineNo">1609</span>  public void preDecommissionRegionServers(List&lt;ServerName&gt; servers, boolean offload) throws IOException {<a name="line.1609"></a>
+<span class="sourceLineNo">1610</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1610"></a>
+<span class="sourceLineNo">1611</span>      @Override<a name="line.1611"></a>
+<span class="sourceLineNo">1612</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1612"></a>
+<span class="sourceLineNo">1613</span>        observer.preDecommissionRegionServers(this, servers, offload);<a name="line.1613"></a>
+<span class="sourceLineNo">1614</span>      }<a name="line.1614"></a>
+<span class="sourceLineNo">1615</span>    });<a name="line.1615"></a>
+<span class="sourceLineNo">1616</span>  }<a name="line.1616"></a>
+<span class="sourceLineNo">1617</span><a name="line.1617"></a>
+<span class="sourceLineNo">1618</span>  public void postDecommissionRegionServers(List&lt;ServerName&gt; servers, boolean offload) throws IOException {<a name="line.1618"></a>
+<span class="sourceLineNo">1619</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1619"></a>
+<span class="sourceLineNo">1620</span>      @Override<a name="line.1620"></a>
+<span class="sourceLineNo">1621</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1621"></a>
+<span class="sourceLineNo">1622</span>        observer.postDecommissionRegionServers(this, servers, offload);<a name="line.1622"></a>
+<span class="sourceLineNo">1623</span>      }<a name="line.1623"></a>
+<span class="sourceLineNo">1624</span>    });<a name="line.1624"></a>
+<span class="sourceLineNo">1625</span>  }<a name="line.1625"></a>
+<span class="sourceLineNo">1626</span><a name="line.1626"></a>
+<span class="sourceLineNo">1627</span>  public void preListDecommissionedRegionServers() throws IOException {<a name="line.1627"></a>
+<span class="sourceLineNo">1628</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1628"></a>
+<span class="sourceLineNo">1629</span>      @Override<a name="line.1629"></a>
+<span class="sourceLineNo">1630</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1630"></a>
+<span class="sourceLineNo">1631</span>        observer.preListDecommissionedRegionServers(this);<a name="line.1631"></a>
+<span class="sourceLineNo">1632</span>      }<a name="line.1632"></a>
+<span class="sourceLineNo">1633</span>    });<a name="line.1633"></a>
+<span class="sourceLineNo">1634</span>  }<a name="line.1634"></a>
+<span class="sourceLineNo">1635</span><a name="line.1635"></a>
+<span class="sourceLineNo">1636</span>  public void postListDecommissionedRegionServers() throws IOException {<a name="line.1636"></a>
+<span class="sourceLineNo">1637</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1637"></a>
+<span class="sourceLineNo">1638</span>      @Override<a name="line.1638"></a>
+<span class="sourceLineNo">1639</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1639"></a>
+<span class="sourceLineNo">1640</span>        observer.postListDecommissionedRegionServers(this);<a name="line.1640"></a>
+<span class="sourceLineNo">1641</span>      }<a name="line.1641"></a>
+<span class="sourceLineNo">1642</span>    });<a name="line.1642"></a>
+<span class="sourceLineNo">1643</span>  }<a name="line.1643"></a>
+<span class="sourceLineNo">1644</span><a name="line.1644"></a>
+<span class="sourceLineNo">1645</span>  public void preRecommissionRegionServer(ServerName server, List&lt;byte[]&gt; encodedRegionNames)<a name="line.1645"></a>
+<span class="sourceLineNo">1646</span>      throws IOException {<a name="line.1646"></a>
+<span class="sourceLineNo">1647</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1647"></a>
+<span class="sourceLineNo">1648</span>      @Override<a name="line.1648"></a>
+<span class="sourceLineNo">1649</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1649"></a>
+<span class="sourceLineNo">1650</span>        observer.preRecommissionRegionServer(this, server, encodedRegionNames);<a name="line.1650"></a>
+<span class="sourceLineNo">1651</span>      }<a name="line.1651"></a>
+<span class="sourceLineNo">1652</span>    });<a name="line.1652"></a>
+<span class="sourceLineNo">1653</span>  }<a name="line.1653"></a>
+<span class="sourceLineNo">1654</span><a name="line.1654"></a>
+<span class="sourceLineNo">1655</span>  public void postRecommissionRegionServer(ServerName server, List&lt;byte[]&gt; encodedRegionNames)<a name="line.1655"></a>
+<span class="sourceLineNo">1656</span>      throws IOException {<a name="line.1656"></a>
+<span class="sourceLineNo">1657</span>    execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {<a name="line.1657"></a>
+<span class="sourceLineNo">1658</span>      @Override<a name="line.1658"></a>
+<span class="sourceLineNo">1659</span>      public void call(MasterObserver observer) throws IOException {<a name="line.1659"></a>
+<span class="sourceLineNo">1660</span>        observer.postRecommissionRegionServer(this, server, encodedRegionNames);<a name="line.1660"></a>
+<span class="sourceLineNo">1661</span>      }<a name="line.1661"></a>
+<span class="sourceLineNo">1662</span>    });<a name="line.1662"></a>
+<span class="sourceLineNo">1663</span>  }<a name="line.1663"></a>
+<span class="sourceLineNo">1664</span>}<a name="line.1664"></a>
 
 
 


Mime
View raw message