http://git-wip-us.apache.org/repos/asf/hbase-site/blob/7bcc960d/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.html 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.html
index a97dfdc..2b1b6c6 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.html
@@ -2370,1287 +2370,1292 @@
 <span class="sourceLineNo">2362</span>  }<a name="line.2362"></a>
 <span class="sourceLineNo">2363</span><a name="line.2363"></a>
 <span class="sourceLineNo">2364</span>  @Override<a name="line.2364"></a>
-<span class="sourceLineNo">2365</span>  public long modifyTable(final 
TableName tableName, final TableDescriptor descriptor,<a name="line.2365"></a>
+<span class="sourceLineNo">2365</span>  public long modifyTable(final 
TableName tableName, final TableDescriptor newDescriptor,<a 
name="line.2365"></a>
 <span class="sourceLineNo">2366</span>      final long nonceGroup, final long 
nonce) throws IOException {<a name="line.2366"></a>
 <span class="sourceLineNo">2367</span>    checkInitialized();<a 
name="line.2367"></a>
-<span class="sourceLineNo">2368</span>    
sanityCheckTableDescriptor(descriptor);<a name="line.2368"></a>
+<span class="sourceLineNo">2368</span>    
sanityCheckTableDescriptor(newDescriptor);<a name="line.2368"></a>
 <span class="sourceLineNo">2369</span><a name="line.2369"></a>
 <span class="sourceLineNo">2370</span>    return 
MasterProcedureUtil.submitProcedure(<a name="line.2370"></a>
 <span class="sourceLineNo">2371</span>        new 
MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a 
name="line.2371"></a>
 <span class="sourceLineNo">2372</span>      @Override<a name="line.2372"></a>
 <span class="sourceLineNo">2373</span>      protected void run() throws 
IOException {<a name="line.2373"></a>
-<span class="sourceLineNo">2374</span>        
getMaster().getMasterCoprocessorHost().preModifyTable(tableName, descriptor);<a 
name="line.2374"></a>
-<span class="sourceLineNo">2375</span><a name="line.2375"></a>
-<span class="sourceLineNo">2376</span>        
LOG.info(getClientIdAuditPrefix() + " modify " + tableName);<a 
name="line.2376"></a>
+<span class="sourceLineNo">2374</span>        TableDescriptor oldDescriptor = 
getMaster().getTableDescriptors().get(tableName);<a name="line.2374"></a>
+<span class="sourceLineNo">2375</span>        
getMaster().getMasterCoprocessorHost()<a name="line.2375"></a>
+<span class="sourceLineNo">2376</span>          .preModifyTable(tableName, 
oldDescriptor, newDescriptor);<a name="line.2376"></a>
 <span class="sourceLineNo">2377</span><a name="line.2377"></a>
-<span class="sourceLineNo">2378</span>        // Execute the operation 
synchronously - wait for the operation completes before continuing.<a 
name="line.2378"></a>
-<span class="sourceLineNo">2379</span>        //<a name="line.2379"></a>
-<span class="sourceLineNo">2380</span>        // We need to wait for the 
procedure to potentially fail due to "prepare" sanity<a name="line.2380"></a>
-<span class="sourceLineNo">2381</span>        // checks. This will block only 
the beginning of the procedure. See HBASE-19953.<a name="line.2381"></a>
-<span class="sourceLineNo">2382</span>        ProcedurePrepareLatch latch = 
ProcedurePrepareLatch.createBlockingLatch();<a name="line.2382"></a>
-<span class="sourceLineNo">2383</span>        submitProcedure(new 
ModifyTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2383"></a>
-<span class="sourceLineNo">2384</span>            descriptor, latch));<a 
name="line.2384"></a>
-<span class="sourceLineNo">2385</span>        latch.await();<a 
name="line.2385"></a>
-<span class="sourceLineNo">2386</span><a name="line.2386"></a>
-<span class="sourceLineNo">2387</span>        
getMaster().getMasterCoprocessorHost().postModifyTable(tableName, 
descriptor);<a name="line.2387"></a>
-<span class="sourceLineNo">2388</span>      }<a name="line.2388"></a>
-<span class="sourceLineNo">2389</span><a name="line.2389"></a>
-<span class="sourceLineNo">2390</span>      @Override<a name="line.2390"></a>
-<span class="sourceLineNo">2391</span>      protected String getDescription() 
{<a name="line.2391"></a>
-<span class="sourceLineNo">2392</span>        return "ModifyTableProcedure";<a 
name="line.2392"></a>
-<span class="sourceLineNo">2393</span>      }<a name="line.2393"></a>
-<span class="sourceLineNo">2394</span>    });<a name="line.2394"></a>
-<span class="sourceLineNo">2395</span>  }<a name="line.2395"></a>
-<span class="sourceLineNo">2396</span><a name="line.2396"></a>
-<span class="sourceLineNo">2397</span>  public long restoreSnapshot(final 
SnapshotDescription snapshotDesc,<a name="line.2397"></a>
-<span class="sourceLineNo">2398</span>      final long nonceGroup, final long 
nonce, final boolean restoreAcl) throws IOException {<a name="line.2398"></a>
-<span class="sourceLineNo">2399</span>    checkInitialized();<a 
name="line.2399"></a>
-<span class="sourceLineNo">2400</span>    
getSnapshotManager().checkSnapshotSupport();<a name="line.2400"></a>
-<span class="sourceLineNo">2401</span><a name="line.2401"></a>
-<span class="sourceLineNo">2402</span>    // Ensure namespace exists. Will 
throw exception if non-known NS.<a name="line.2402"></a>
-<span class="sourceLineNo">2403</span>    final TableName dstTable = 
TableName.valueOf(snapshotDesc.getTable());<a name="line.2403"></a>
-<span class="sourceLineNo">2404</span>    
getClusterSchema().getNamespace(dstTable.getNamespaceAsString());<a 
name="line.2404"></a>
-<span class="sourceLineNo">2405</span><a name="line.2405"></a>
-<span class="sourceLineNo">2406</span>    return 
MasterProcedureUtil.submitProcedure(<a name="line.2406"></a>
-<span class="sourceLineNo">2407</span>        new 
MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a 
name="line.2407"></a>
-<span class="sourceLineNo">2408</span>      @Override<a name="line.2408"></a>
-<span class="sourceLineNo">2409</span>      protected void run() throws 
IOException {<a name="line.2409"></a>
-<span class="sourceLineNo">2410</span>          setProcId(<a 
name="line.2410"></a>
-<span class="sourceLineNo">2411</span>            
getSnapshotManager().restoreOrCloneSnapshot(snapshotDesc, getNonceKey(), 
restoreAcl));<a name="line.2411"></a>
-<span class="sourceLineNo">2412</span>      }<a name="line.2412"></a>
-<span class="sourceLineNo">2413</span><a name="line.2413"></a>
-<span class="sourceLineNo">2414</span>      @Override<a name="line.2414"></a>
-<span class="sourceLineNo">2415</span>      protected String getDescription() 
{<a name="line.2415"></a>
-<span class="sourceLineNo">2416</span>        return 
"RestoreSnapshotProcedure";<a name="line.2416"></a>
-<span class="sourceLineNo">2417</span>      }<a name="line.2417"></a>
-<span class="sourceLineNo">2418</span>    });<a name="line.2418"></a>
-<span class="sourceLineNo">2419</span>  }<a name="line.2419"></a>
-<span class="sourceLineNo">2420</span><a name="line.2420"></a>
-<span class="sourceLineNo">2421</span>  private void checkTableExists(final 
TableName tableName)<a name="line.2421"></a>
-<span class="sourceLineNo">2422</span>      throws IOException, 
TableNotFoundException {<a name="line.2422"></a>
-<span class="sourceLineNo">2423</span>    if 
(!MetaTableAccessor.tableExists(getConnection(), tableName)) {<a 
name="line.2423"></a>
-<span class="sourceLineNo">2424</span>      throw new 
TableNotFoundException(tableName);<a name="line.2424"></a>
-<span class="sourceLineNo">2425</span>    }<a name="line.2425"></a>
-<span class="sourceLineNo">2426</span>  }<a name="line.2426"></a>
-<span class="sourceLineNo">2427</span><a name="line.2427"></a>
-<span class="sourceLineNo">2428</span>  @Override<a name="line.2428"></a>
-<span class="sourceLineNo">2429</span>  public void checkTableModifiable(final 
TableName tableName)<a name="line.2429"></a>
-<span class="sourceLineNo">2430</span>      throws IOException, 
TableNotFoundException, TableNotDisabledException {<a name="line.2430"></a>
-<span class="sourceLineNo">2431</span>    if (isCatalogTable(tableName)) {<a 
name="line.2431"></a>
-<span class="sourceLineNo">2432</span>      throw new IOException("Can't 
modify catalog tables");<a name="line.2432"></a>
-<span class="sourceLineNo">2433</span>    }<a name="line.2433"></a>
-<span class="sourceLineNo">2434</span>    checkTableExists(tableName);<a 
name="line.2434"></a>
-<span class="sourceLineNo">2435</span>    TableState ts = 
getTableStateManager().getTableState(tableName);<a name="line.2435"></a>
-<span class="sourceLineNo">2436</span>    if (!ts.isDisabled()) {<a 
name="line.2436"></a>
-<span class="sourceLineNo">2437</span>      throw new 
TableNotDisabledException("Not DISABLED; " + ts);<a name="line.2437"></a>
-<span class="sourceLineNo">2438</span>    }<a name="line.2438"></a>
-<span class="sourceLineNo">2439</span>  }<a name="line.2439"></a>
-<span class="sourceLineNo">2440</span><a name="line.2440"></a>
-<span class="sourceLineNo">2441</span>  public ClusterMetrics 
getClusterMetricsWithoutCoprocessor() throws InterruptedIOException {<a 
name="line.2441"></a>
-<span class="sourceLineNo">2442</span>    return 
getClusterMetricsWithoutCoprocessor(EnumSet.allOf(Option.class));<a 
name="line.2442"></a>
-<span class="sourceLineNo">2443</span>  }<a name="line.2443"></a>
-<span class="sourceLineNo">2444</span><a name="line.2444"></a>
-<span class="sourceLineNo">2445</span>  public ClusterMetrics 
getClusterMetricsWithoutCoprocessor(EnumSet&lt;Option&gt; options)<a 
name="line.2445"></a>
-<span class="sourceLineNo">2446</span>      throws InterruptedIOException {<a 
name="line.2446"></a>
-<span class="sourceLineNo">2447</span>    ClusterMetricsBuilder builder = 
ClusterMetricsBuilder.newBuilder();<a name="line.2447"></a>
-<span class="sourceLineNo">2448</span>    // given that hbase1 can't submit 
the request with Option,<a name="line.2448"></a>
-<span class="sourceLineNo">2449</span>    // we return all information to 
client if the list of Option is empty.<a name="line.2449"></a>
-<span class="sourceLineNo">2450</span>    if (options.isEmpty()) {<a 
name="line.2450"></a>
-<span class="sourceLineNo">2451</span>      options = 
EnumSet.allOf(Option.class);<a name="line.2451"></a>
-<span class="sourceLineNo">2452</span>    }<a name="line.2452"></a>
-<span class="sourceLineNo">2453</span><a name="line.2453"></a>
-<span class="sourceLineNo">2454</span>    for (Option opt : options) {<a 
name="line.2454"></a>
-<span class="sourceLineNo">2455</span>      switch (opt) {<a 
name="line.2455"></a>
-<span class="sourceLineNo">2456</span>        case HBASE_VERSION: 
builder.setHBaseVersion(VersionInfo.getVersion()); break;<a 
name="line.2456"></a>
-<span class="sourceLineNo">2457</span>        case CLUSTER_ID: 
builder.setClusterId(getClusterId()); break;<a name="line.2457"></a>
-<span class="sourceLineNo">2458</span>        case MASTER: 
builder.setMasterName(getServerName()); break;<a name="line.2458"></a>
-<span class="sourceLineNo">2459</span>        case BACKUP_MASTERS: 
builder.setBackerMasterNames(getBackupMasters()); break;<a name="line.2459"></a>
-<span class="sourceLineNo">2460</span>        case LIVE_SERVERS: {<a 
name="line.2460"></a>
-<span class="sourceLineNo">2461</span>          if (serverManager != null) {<a 
name="line.2461"></a>
-<span class="sourceLineNo">2462</span>            
builder.setLiveServerMetrics(serverManager.getOnlineServers().entrySet().stream()<a
 name="line.2462"></a>
-<span class="sourceLineNo">2463</span>              
.collect(Collectors.toMap(e -&gt; e.getKey(), e -&gt; e.getValue())));<a 
name="line.2463"></a>
-<span class="sourceLineNo">2464</span>          }<a name="line.2464"></a>
-<span class="sourceLineNo">2465</span>          break;<a name="line.2465"></a>
-<span class="sourceLineNo">2466</span>        }<a name="line.2466"></a>
-<span class="sourceLineNo">2467</span>        case DEAD_SERVERS: {<a 
name="line.2467"></a>
-<span class="sourceLineNo">2468</span>          if (serverManager != null) {<a 
name="line.2468"></a>
-<span class="sourceLineNo">2469</span>            
builder.setDeadServerNames(new ArrayList&lt;&gt;(<a name="line.2469"></a>
-<span class="sourceLineNo">2470</span>              
serverManager.getDeadServers().copyServerNames()));<a name="line.2470"></a>
-<span class="sourceLineNo">2471</span>          }<a name="line.2471"></a>
-<span class="sourceLineNo">2472</span>          break;<a name="line.2472"></a>
-<span class="sourceLineNo">2473</span>        }<a name="line.2473"></a>
-<span class="sourceLineNo">2474</span>        case MASTER_COPROCESSORS: {<a 
name="line.2474"></a>
-<span class="sourceLineNo">2475</span>          if (cpHost != null) {<a 
name="line.2475"></a>
-<span class="sourceLineNo">2476</span>            
builder.setMasterCoprocessorNames(Arrays.asList(getMasterCoprocessors()));<a 
name="line.2476"></a>
-<span class="sourceLineNo">2477</span>          }<a name="line.2477"></a>
-<span class="sourceLineNo">2478</span>          break;<a name="line.2478"></a>
-<span class="sourceLineNo">2479</span>        }<a name="line.2479"></a>
-<span class="sourceLineNo">2480</span>        case REGIONS_IN_TRANSITION: {<a 
name="line.2480"></a>
-<span class="sourceLineNo">2481</span>          if (assignmentManager != null) 
{<a name="line.2481"></a>
-<span class="sourceLineNo">2482</span>            
builder.setRegionsInTransition(assignmentManager.getRegionStates()<a 
name="line.2482"></a>
-<span class="sourceLineNo">2483</span>                
.getRegionsStateInTransition());<a name="line.2483"></a>
-<span class="sourceLineNo">2484</span>          }<a name="line.2484"></a>
-<span class="sourceLineNo">2485</span>          break;<a name="line.2485"></a>
-<span class="sourceLineNo">2486</span>        }<a name="line.2486"></a>
-<span class="sourceLineNo">2487</span>        case BALANCER_ON: {<a 
name="line.2487"></a>
-<span class="sourceLineNo">2488</span>          if (loadBalancerTracker != 
null) {<a name="line.2488"></a>
-<span class="sourceLineNo">2489</span>            
builder.setBalancerOn(loadBalancerTracker.isBalancerOn());<a 
name="line.2489"></a>
-<span class="sourceLineNo">2490</span>          }<a name="line.2490"></a>
-<span class="sourceLineNo">2491</span>          break;<a name="line.2491"></a>
-<span class="sourceLineNo">2492</span>        }<a name="line.2492"></a>
-<span class="sourceLineNo">2493</span>        case MASTER_INFO_PORT: {<a 
name="line.2493"></a>
-<span class="sourceLineNo">2494</span>          if (infoServer != null) {<a 
name="line.2494"></a>
-<span class="sourceLineNo">2495</span>            
builder.setMasterInfoPort(infoServer.getPort());<a name="line.2495"></a>
-<span class="sourceLineNo">2496</span>          }<a name="line.2496"></a>
-<span class="sourceLineNo">2497</span>          break;<a name="line.2497"></a>
-<span class="sourceLineNo">2498</span>        }<a name="line.2498"></a>
-<span class="sourceLineNo">2499</span>      }<a name="line.2499"></a>
-<span class="sourceLineNo">2500</span>    }<a name="line.2500"></a>
-<span class="sourceLineNo">2501</span>    return builder.build();<a 
name="line.2501"></a>
-<span class="sourceLineNo">2502</span>  }<a name="line.2502"></a>
-<span class="sourceLineNo">2503</span><a name="line.2503"></a>
-<span class="sourceLineNo">2504</span>  /**<a name="line.2504"></a>
-<span class="sourceLineNo">2505</span>   * @return cluster status<a 
name="line.2505"></a>
-<span class="sourceLineNo">2506</span>   */<a name="line.2506"></a>
-<span class="sourceLineNo">2507</span>  public ClusterMetrics 
getClusterMetrics() throws IOException {<a name="line.2507"></a>
-<span class="sourceLineNo">2508</span>    return 
getClusterMetrics(EnumSet.allOf(Option.class));<a name="line.2508"></a>
-<span class="sourceLineNo">2509</span>  }<a name="line.2509"></a>
-<span class="sourceLineNo">2510</span><a name="line.2510"></a>
-<span class="sourceLineNo">2511</span>  public ClusterMetrics 
getClusterMetrics(EnumSet&lt;Option&gt; options) throws IOException {<a 
name="line.2511"></a>
-<span class="sourceLineNo">2512</span>    if (cpHost != null) {<a 
name="line.2512"></a>
-<span class="sourceLineNo">2513</span>      cpHost.preGetClusterMetrics();<a 
name="line.2513"></a>
-<span class="sourceLineNo">2514</span>    }<a name="line.2514"></a>
-<span class="sourceLineNo">2515</span>    ClusterMetrics status = 
getClusterMetricsWithoutCoprocessor(options);<a name="line.2515"></a>
-<span class="sourceLineNo">2516</span>    if (cpHost != null) {<a 
name="line.2516"></a>
-<span class="sourceLineNo">2517</span>      
cpHost.postGetClusterMetrics(status);<a name="line.2517"></a>
-<span class="sourceLineNo">2518</span>    }<a name="line.2518"></a>
-<span class="sourceLineNo">2519</span>    return status;<a 
name="line.2519"></a>
-<span class="sourceLineNo">2520</span>  }<a name="line.2520"></a>
-<span class="sourceLineNo">2521</span><a name="line.2521"></a>
-<span class="sourceLineNo">2522</span>  private List&lt;ServerName&gt; 
getBackupMasters() throws InterruptedIOException {<a name="line.2522"></a>
-<span class="sourceLineNo">2523</span>    // Build Set of backup masters from 
ZK nodes<a name="line.2523"></a>
-<span class="sourceLineNo">2524</span>    List&lt;String&gt; 
backupMasterStrings;<a name="line.2524"></a>
-<span class="sourceLineNo">2525</span>    try {<a name="line.2525"></a>
-<span class="sourceLineNo">2526</span>      backupMasterStrings = 
ZKUtil.listChildrenNoWatch(this.zooKeeper,<a name="line.2526"></a>
-<span class="sourceLineNo">2527</span>        
this.zooKeeper.znodePaths.backupMasterAddressesZNode);<a name="line.2527"></a>
-<span class="sourceLineNo">2528</span>    } catch (KeeperException e) {<a 
name="line.2528"></a>
-<span class="sourceLineNo">2529</span>      
LOG.warn(this.zooKeeper.prefix("Unable to list backup servers"), e);<a 
name="line.2529"></a>
-<span class="sourceLineNo">2530</span>      backupMasterStrings = null;<a 
name="line.2530"></a>
-<span class="sourceLineNo">2531</span>    }<a name="line.2531"></a>
-<span class="sourceLineNo">2532</span><a name="line.2532"></a>
-<span class="sourceLineNo">2533</span>    List&lt;ServerName&gt; backupMasters 
= Collections.emptyList();<a name="line.2533"></a>
-<span class="sourceLineNo">2534</span>    if (backupMasterStrings != null 
&amp;&amp; !backupMasterStrings.isEmpty()) {<a name="line.2534"></a>
-<span class="sourceLineNo">2535</span>      backupMasters = new 
ArrayList&lt;&gt;(backupMasterStrings.size());<a name="line.2535"></a>
-<span class="sourceLineNo">2536</span>      for (String s: 
backupMasterStrings) {<a name="line.2536"></a>
-<span class="sourceLineNo">2537</span>        try {<a name="line.2537"></a>
-<span class="sourceLineNo">2538</span>          byte [] bytes;<a 
name="line.2538"></a>
-<span class="sourceLineNo">2539</span>          try {<a name="line.2539"></a>
-<span class="sourceLineNo">2540</span>            bytes = 
ZKUtil.getData(this.zooKeeper, ZNodePaths.joinZNode(<a name="line.2540"></a>
-<span class="sourceLineNo">2541</span>                
this.zooKeeper.znodePaths.backupMasterAddressesZNode, s));<a 
name="line.2541"></a>
-<span class="sourceLineNo">2542</span>          } catch (InterruptedException 
e) {<a name="line.2542"></a>
-<span class="sourceLineNo">2543</span>            throw new 
InterruptedIOException();<a name="line.2543"></a>
-<span class="sourceLineNo">2544</span>          }<a name="line.2544"></a>
-<span class="sourceLineNo">2545</span>          if (bytes != null) {<a 
name="line.2545"></a>
-<span class="sourceLineNo">2546</span>            ServerName sn;<a 
name="line.2546"></a>
-<span class="sourceLineNo">2547</span>            try {<a name="line.2547"></a>
-<span class="sourceLineNo">2548</span>              sn = 
ProtobufUtil.parseServerNameFrom(bytes);<a name="line.2548"></a>
-<span class="sourceLineNo">2549</span>            } catch 
(DeserializationException e) {<a name="line.2549"></a>
-<span class="sourceLineNo">2550</span>              LOG.warn("Failed parse, 
skipping registering backup server", e);<a name="line.2550"></a>
-<span class="sourceLineNo">2551</span>              continue;<a 
name="line.2551"></a>
-<span class="sourceLineNo">2552</span>            }<a name="line.2552"></a>
-<span class="sourceLineNo">2553</span>            backupMasters.add(sn);<a 
name="line.2553"></a>
-<span class="sourceLineNo">2554</span>          }<a name="line.2554"></a>
-<span class="sourceLineNo">2555</span>        } catch (KeeperException e) {<a 
name="line.2555"></a>
-<span class="sourceLineNo">2556</span>          
LOG.warn(this.zooKeeper.prefix("Unable to get information about " +<a 
name="line.2556"></a>
-<span class="sourceLineNo">2557</span>                   "backup servers"), 
e);<a name="line.2557"></a>
-<span class="sourceLineNo">2558</span>        }<a name="line.2558"></a>
-<span class="sourceLineNo">2559</span>      }<a name="line.2559"></a>
-<span class="sourceLineNo">2560</span>      Collections.sort(backupMasters, 
new Comparator&lt;ServerName&gt;() {<a name="line.2560"></a>
-<span class="sourceLineNo">2561</span>        @Override<a name="line.2561"></a>
-<span class="sourceLineNo">2562</span>        public int compare(ServerName 
s1, ServerName s2) {<a name="line.2562"></a>
-<span class="sourceLineNo">2563</span>          return 
s1.getServerName().compareTo(s2.getServerName());<a name="line.2563"></a>
-<span class="sourceLineNo">2564</span>        }});<a name="line.2564"></a>
-<span class="sourceLineNo">2565</span>    }<a name="line.2565"></a>
-<span class="sourceLineNo">2566</span>    return backupMasters;<a 
name="line.2566"></a>
-<span class="sourceLineNo">2567</span>  }<a name="line.2567"></a>
-<span class="sourceLineNo">2568</span><a name="line.2568"></a>
-<span class="sourceLineNo">2569</span>  /**<a name="line.2569"></a>
-<span class="sourceLineNo">2570</span>   * The set of loaded coprocessors is 
stored in a static set. Since it's<a name="line.2570"></a>
-<span class="sourceLineNo">2571</span>   * statically allocated, it does not 
require that HMaster's cpHost be<a name="line.2571"></a>
-<span class="sourceLineNo">2572</span>   * initialized prior to accessing 
it.<a name="line.2572"></a>
-<span class="sourceLineNo">2573</span>   * @return a String representation of 
the set of names of the loaded coprocessors.<a name="line.2573"></a>
-<span class="sourceLineNo">2574</span>   */<a name="line.2574"></a>
-<span class="sourceLineNo">2575</span>  public static String 
getLoadedCoprocessors() {<a name="line.2575"></a>
-<span class="sourceLineNo">2576</span>    return 
CoprocessorHost.getLoadedCoprocessors().toString();<a name="line.2576"></a>
-<span class="sourceLineNo">2577</span>  }<a name="line.2577"></a>
-<span class="sourceLineNo">2578</span><a name="line.2578"></a>
-<span class="sourceLineNo">2579</span>  /**<a name="line.2579"></a>
-<span class="sourceLineNo">2580</span>   * @return timestamp in millis when 
HMaster was started.<a name="line.2580"></a>
-<span class="sourceLineNo">2581</span>   */<a name="line.2581"></a>
-<span class="sourceLineNo">2582</span>  public long getMasterStartTime() {<a 
name="line.2582"></a>
-<span class="sourceLineNo">2583</span>    return startcode;<a 
name="line.2583"></a>
-<span class="sourceLineNo">2584</span>  }<a name="line.2584"></a>
-<span class="sourceLineNo">2585</span><a name="line.2585"></a>
-<span class="sourceLineNo">2586</span>  /**<a name="line.2586"></a>
-<span class="sourceLineNo">2587</span>   * @return timestamp in millis when 
HMaster became the active master.<a name="line.2587"></a>
-<span class="sourceLineNo">2588</span>   */<a name="line.2588"></a>
-<span class="sourceLineNo">2589</span>  public long getMasterActiveTime() {<a 
name="line.2589"></a>
-<span class="sourceLineNo">2590</span>    return masterActiveTime;<a 
name="line.2590"></a>
-<span class="sourceLineNo">2591</span>  }<a name="line.2591"></a>
-<span class="sourceLineNo">2592</span><a name="line.2592"></a>
-<span class="sourceLineNo">2593</span>  /**<a name="line.2593"></a>
-<span class="sourceLineNo">2594</span>   * @return timestamp in millis when 
HMaster finished becoming the active master<a name="line.2594"></a>
-<span class="sourceLineNo">2595</span>   */<a name="line.2595"></a>
-<span class="sourceLineNo">2596</span>  public long 
getMasterFinishedInitializationTime() {<a name="line.2596"></a>
-<span class="sourceLineNo">2597</span>    return 
masterFinishedInitializationTime;<a name="line.2597"></a>
-<span class="sourceLineNo">2598</span>  }<a name="line.2598"></a>
-<span class="sourceLineNo">2599</span><a name="line.2599"></a>
-<span class="sourceLineNo">2600</span>  public int getNumWALFiles() {<a 
name="line.2600"></a>
-<span class="sourceLineNo">2601</span>    return procedureStore != null ? 
procedureStore.getActiveLogs().size() : 0;<a name="line.2601"></a>
-<span class="sourceLineNo">2602</span>  }<a name="line.2602"></a>
-<span class="sourceLineNo">2603</span><a name="line.2603"></a>
-<span class="sourceLineNo">2604</span>  public WALProcedureStore 
getWalProcedureStore() {<a name="line.2604"></a>
-<span class="sourceLineNo">2605</span>    return procedureStore;<a 
name="line.2605"></a>
-<span class="sourceLineNo">2606</span>  }<a name="line.2606"></a>
-<span class="sourceLineNo">2607</span><a name="line.2607"></a>
-<span class="sourceLineNo">2608</span>  public int 
getRegionServerInfoPort(final ServerName sn) {<a name="line.2608"></a>
-<span class="sourceLineNo">2609</span>    RegionServerInfo info = 
this.regionServerTracker.getRegionServerInfo(sn);<a name="line.2609"></a>
-<span class="sourceLineNo">2610</span>    if (info == null || 
info.getInfoPort() == 0) {<a name="line.2610"></a>
-<span class="sourceLineNo">2611</span>      return 
conf.getInt(HConstants.REGIONSERVER_INFO_PORT,<a name="line.2611"></a>
-<span class="sourceLineNo">2612</span>        
HConstants.DEFAULT_REGIONSERVER_INFOPORT);<a name="line.2612"></a>
-<span class="sourceLineNo">2613</span>    }<a name="line.2613"></a>
-<span class="sourceLineNo">2614</span>    return info.getInfoPort();<a 
name="line.2614"></a>
-<span class="sourceLineNo">2615</span>  }<a name="line.2615"></a>
-<span class="sourceLineNo">2616</span><a name="line.2616"></a>
-<span class="sourceLineNo">2617</span>  @Override<a name="line.2617"></a>
-<span class="sourceLineNo">2618</span>  public String 
getRegionServerVersion(final ServerName sn) {<a name="line.2618"></a>
-<span class="sourceLineNo">2619</span>    RegionServerInfo info = 
this.regionServerTracker.getRegionServerInfo(sn);<a name="line.2619"></a>
-<span class="sourceLineNo">2620</span>    if (info != null &amp;&amp; 
info.hasVersionInfo()) {<a name="line.2620"></a>
-<span class="sourceLineNo">2621</span>      return 
info.getVersionInfo().getVersion();<a name="line.2621"></a>
-<span class="sourceLineNo">2622</span>    }<a name="line.2622"></a>
-<span class="sourceLineNo">2623</span>    return "0.0.0"; //Lowest version to 
prevent move system region to unknown version RS.<a name="line.2623"></a>
-<span class="sourceLineNo">2624</span>  }<a name="line.2624"></a>
-<span class="sourceLineNo">2625</span><a name="line.2625"></a>
-<span class="sourceLineNo">2626</span>  @Override<a name="line.2626"></a>
-<span class="sourceLineNo">2627</span>  public void 
checkIfShouldMoveSystemRegionAsync() {<a name="line.2627"></a>
-<span class="sourceLineNo">2628</span>    
assignmentManager.checkIfShouldMoveSystemRegionAsync();<a name="line.2628"></a>
-<span class="sourceLineNo">2629</span>  }<a name="line.2629"></a>
-<span class="sourceLineNo">2630</span><a name="line.2630"></a>
-<span class="sourceLineNo">2631</span>  /**<a name="line.2631"></a>
-<span class="sourceLineNo">2632</span>   * @return array of coprocessor 
SimpleNames.<a name="line.2632"></a>
-<span class="sourceLineNo">2633</span>   */<a name="line.2633"></a>
-<span class="sourceLineNo">2634</span>  public String[] 
getMasterCoprocessors() {<a name="line.2634"></a>
-<span class="sourceLineNo">2635</span>    Set&lt;String&gt; masterCoprocessors 
= getMasterCoprocessorHost().getCoprocessors();<a name="line.2635"></a>
-<span class="sourceLineNo">2636</span>    return 
masterCoprocessors.toArray(new String[masterCoprocessors.size()]);<a 
name="line.2636"></a>
-<span class="sourceLineNo">2637</span>  }<a name="line.2637"></a>
-<span class="sourceLineNo">2638</span><a name="line.2638"></a>
-<span class="sourceLineNo">2639</span>  @Override<a name="line.2639"></a>
-<span class="sourceLineNo">2640</span>  public void abort(String reason, 
Throwable cause) {<a name="line.2640"></a>
-<span class="sourceLineNo">2641</span>    if (isAborted() || isStopped()) {<a 
name="line.2641"></a>
-<span class="sourceLineNo">2642</span>      return;<a name="line.2642"></a>
-<span class="sourceLineNo">2643</span>    }<a name="line.2643"></a>
-<span class="sourceLineNo">2644</span>    if (cpHost != null) {<a 
name="line.2644"></a>
-<span class="sourceLineNo">2645</span>      // HBASE-4014: dump a list of 
loaded coprocessors.<a name="line.2645"></a>
-<span class="sourceLineNo">2646</span>      LOG.error(HBaseMarkers.FATAL, 
"Master server abort: loaded coprocessors are: " +<a name="line.2646"></a>
-<span class="sourceLineNo">2647</span>          getLoadedCoprocessors());<a 
name="line.2647"></a>
-<span class="sourceLineNo">2648</span>    }<a name="line.2648"></a>
-<span class="sourceLineNo">2649</span>    String msg = "***** ABORTING master 
" + this + ": " + reason + " *****";<a name="line.2649"></a>
-<span class="sourceLineNo">2650</span>    if (cause != null) {<a 
name="line.2650"></a>
-<span class="sourceLineNo">2651</span>      LOG.error(HBaseMarkers.FATAL, msg, 
cause);<a name="line.2651"></a>
-<span class="sourceLineNo">2652</span>    } else {<a name="line.2652"></a>
-<span class="sourceLineNo">2653</span>      LOG.error(HBaseMarkers.FATAL, 
msg);<a name="line.2653"></a>
-<span class="sourceLineNo">2654</span>    }<a name="line.2654"></a>
-<span class="sourceLineNo">2655</span><a name="line.2655"></a>
-<span class="sourceLineNo">2656</span>    try {<a name="line.2656"></a>
-<span class="sourceLineNo">2657</span>      stopMaster();<a 
name="line.2657"></a>
-<span class="sourceLineNo">2658</span>    } catch (IOException e) {<a 
name="line.2658"></a>
-<span class="sourceLineNo">2659</span>      LOG.error("Exception occurred 
while stopping master", e);<a name="line.2659"></a>
-<span class="sourceLineNo">2660</span>    }<a name="line.2660"></a>
-<span class="sourceLineNo">2661</span>  }<a name="line.2661"></a>
-<span class="sourceLineNo">2662</span><a name="line.2662"></a>
-<span class="sourceLineNo">2663</span>  @Override<a name="line.2663"></a>
-<span class="sourceLineNo">2664</span>  public ZKWatcher getZooKeeper() {<a 
name="line.2664"></a>
-<span class="sourceLineNo">2665</span>    return zooKeeper;<a 
name="line.2665"></a>
-<span class="sourceLineNo">2666</span>  }<a name="line.2666"></a>
-<span class="sourceLineNo">2667</span><a name="line.2667"></a>
-<span class="sourceLineNo">2668</span>  @Override<a name="line.2668"></a>
-<span class="sourceLineNo">2669</span>  public MasterCoprocessorHost 
getMasterCoprocessorHost() {<a name="line.2669"></a>
-<span class="sourceLineNo">2670</span>    return cpHost;<a 
name="line.2670"></a>
-<span class="sourceLineNo">2671</span>  }<a name="line.2671"></a>
-<span class="sourceLineNo">2672</span><a name="line.2672"></a>
-<span class="sourceLineNo">2673</span>  @Override<a name="line.2673"></a>
-<span class="sourceLineNo">2674</span>  public MasterQuotaManager 
getMasterQuotaManager() {<a name="line.2674"></a>
-<span class="sourceLineNo">2675</span>    return quotaManager;<a 
name="line.2675"></a>
-<span class="sourceLineNo">2676</span>  }<a name="line.2676"></a>
-<span class="sourceLineNo">2677</span><a name="line.2677"></a>
-<span class="sourceLineNo">2678</span>  @Override<a name="line.2678"></a>
-<span class="sourceLineNo">2679</span>  public 
ProcedureExecutor&lt;MasterProcedureEnv&gt; getMasterProcedureExecutor() {<a 
name="line.2679"></a>
-<span class="sourceLineNo">2680</span>    return procedureExecutor;<a 
name="line.2680"></a>
-<span class="sourceLineNo">2681</span>  }<a name="line.2681"></a>
-<span class="sourceLineNo">2682</span><a name="line.2682"></a>
-<span class="sourceLineNo">2683</span>  @Override<a name="line.2683"></a>
-<span class="sourceLineNo">2684</span>  public ServerName getServerName() {<a 
name="line.2684"></a>
-<span class="sourceLineNo">2685</span>    return this.serverName;<a 
name="line.2685"></a>
-<span class="sourceLineNo">2686</span>  }<a name="line.2686"></a>
-<span class="sourceLineNo">2687</span><a name="line.2687"></a>
-<span class="sourceLineNo">2688</span>  @Override<a name="line.2688"></a>
-<span class="sourceLineNo">2689</span>  public AssignmentManager 
getAssignmentManager() {<a name="line.2689"></a>
-<span class="sourceLineNo">2690</span>    return this.assignmentManager;<a 
name="line.2690"></a>
-<span class="sourceLineNo">2691</span>  }<a name="line.2691"></a>
-<span class="sourceLineNo">2692</span><a name="line.2692"></a>
-<span class="sourceLineNo">2693</span>  @Override<a name="line.2693"></a>
-<span class="sourceLineNo">2694</span>  public CatalogJanitor 
getCatalogJanitor() {<a name="line.2694"></a>
-<span class="sourceLineNo">2695</span>    return this.catalogJanitorChore;<a 
name="line.2695"></a>
-<span class="sourceLineNo">2696</span>  }<a name="line.2696"></a>
-<span class="sourceLineNo">2697</span><a name="line.2697"></a>
-<span class="sourceLineNo">2698</span>  public MemoryBoundedLogMessageBuffer 
getRegionServerFatalLogBuffer() {<a name="line.2698"></a>
-<span class="sourceLineNo">2699</span>    return rsFatals;<a 
name="line.2699"></a>
-<span class="sourceLineNo">2700</span>  }<a name="line.2700"></a>
-<span class="sourceLineNo">2701</span><a name="line.2701"></a>
-<span class="sourceLineNo">2702</span>  /**<a name="line.2702"></a>
-<span class="sourceLineNo">2703</span>   * Shutdown the cluster.<a 
name="line.2703"></a>
-<span class="sourceLineNo">2704</span>   * Master runs a coordinated stop of 
all RegionServers and then itself.<a name="line.2704"></a>
-<span class="sourceLineNo">2705</span>   */<a name="line.2705"></a>
-<span class="sourceLineNo">2706</span>  public void shutdown() throws 
IOException {<a name="line.2706"></a>
-<span class="sourceLineNo">2707</span>    if (cpHost != null) {<a 
name="line.2707"></a>
-<span class="sourceLineNo">2708</span>      cpHost.preShutdown();<a 
name="line.2708"></a>
-<span class="sourceLineNo">2709</span>    }<a name="line.2709"></a>
-<span class="sourceLineNo">2710</span>    // Tell the servermanager cluster 
shutdown has been called. This makes it so when Master is<a 
name="line.2710"></a>
-<span class="sourceLineNo">2711</span>    // last running server, it'll stop 
itself. Next, we broadcast the cluster shutdown by setting<a 
name="line.2711"></a>
-<span class="sourceLineNo">2712</span>    // the cluster status as down. 
RegionServers will notice this change in state and will start<a 
name="line.2712"></a>
-<span class="sourceLineNo">2713</span>    // shutting themselves down. When 
last has exited, Master can go down.<a name="line.2713"></a>
-<span class="sourceLineNo">2714</span>    if (this.serverManager != null) {<a 
name="line.2714"></a>
-<span class="sourceLineNo">2715</span>      
this.serverManager.shutdownCluster();<a name="line.2715"></a>
-<span class="sourceLineNo">2716</span>    }<a name="line.2716"></a>
-<span class="sourceLineNo">2717</span>    if (this.clusterStatusTracker != 
null) {<a name="line.2717"></a>
-<span class="sourceLineNo">2718</span>      try {<a name="line.2718"></a>
-<span class="sourceLineNo">2719</span>        
this.clusterStatusTracker.setClusterDown();<a name="line.2719"></a>
-<span class="sourceLineNo">2720</span>      } catch (KeeperException e) {<a 
name="line.2720"></a>
-<span class="sourceLineNo">2721</span>        LOG.error("ZooKeeper exception 
trying to set cluster as down in ZK", e);<a name="line.2721"></a>
-<span class="sourceLineNo">2722</span>      }<a name="line.2722"></a>
-<span class="sourceLineNo">2723</span>    }<a name="line.2723"></a>
-<span class="sourceLineNo">2724</span>    // Stop the procedure executor. Will 
stop any ongoing assign, unassign, server crash etc.,<a name="line.2724"></a>
-<span class="sourceLineNo">2725</span>    // processing so we can go down.<a 
name="line.2725"></a>
-<span class="sourceLineNo">2726</span>    if (this.procedureExecutor != null) 
{<a name="line.2726"></a>
-<span class="sourceLineNo">2727</span>      this.procedureExecutor.stop();<a 
name="line.2727"></a>
-<span class="sourceLineNo">2728</span>    }<a name="line.2728"></a>
-<span class="sourceLineNo">2729</span>    // Shutdown our cluster connection. 
This will kill any hosted RPCs that might be going on;<a name="line.2729"></a>
-<span class="sourceLineNo">2730</span>    // this is what we want especially 
if the Master is in startup phase doing call outs to<a name="line.2730"></a>
-<span class="sourceLineNo">2731</span>    // hbase:meta, etc. when cluster is 
down. Without ths connection close, we'd have to wait on<a name="line.2731"></a>
-<span class="sourceLineNo">2732</span>    // the rpc to timeout.<a 
name="line.2732"></a>
-<span class="sourceLineNo">2733</span>    if (this.clusterConnection != null) 
{<a name="line.2733"></a>
-<span class="sourceLineNo">2734</span>      this.clusterConnection.close();<a 
name="line.2734"></a>
-<span class="sourceLineNo">2735</span>    }<a name="line.2735"></a>
-<span class="sourceLineNo">2736</span>  }<a name="line.2736"></a>
-<span class="sourceLineNo">2737</span><a name="line.2737"></a>
-<span class="sourceLineNo">2738</span>  public void stopMaster() throws 
IOException {<a name="line.2738"></a>
-<span class="sourceLineNo">2739</span>    if (cpHost != null) {<a 
name="line.2739"></a>
-<span class="sourceLineNo">2740</span>      cpHost.preStopMaster();<a 
name="line.2740"></a>
-<span class="sourceLineNo">2741</span>    }<a name="line.2741"></a>
-<span class="sourceLineNo">2742</span>    stop("Stopped by " + 
Thread.currentThread().getName());<a name="line.2742"></a>
-<span class="sourceLineNo">2743</span>  }<a name="line.2743"></a>
-<span class="sourceLineNo">2744</span><a name="line.2744"></a>
-<span class="sourceLineNo">2745</span>  @Override<a name="line.2745"></a>
-<span class="sourceLineNo">2746</span>  public void stop(String msg) {<a 
name="line.2746"></a>
-<span class="sourceLineNo">2747</span>    if (!isStopped()) {<a 
name="line.2747"></a>
-<span class="sourceLineNo">2748</span>      super.stop(msg);<a 
name="line.2748"></a>
-<span class="sourceLineNo">2749</span>      if (this.activeMasterManager != 
null) {<a name="line.2749"></a>
-<span class="sourceLineNo">2750</span>        
this.activeMasterManager.stop();<a name="line.2750"></a>
-<span class="sourceLineNo">2751</span>      }<a name="line.2751"></a>
-<span class="sourceLineNo">2752</span>    }<a name="line.2752"></a>
-<span class="sourceLineNo">2753</span>  }<a name="line.2753"></a>
-<span class="sourceLineNo">2754</span><a name="line.2754"></a>
-<span class="sourceLineNo">2755</span>  void checkServiceStarted() throws 
ServerNotRunningYetException {<a name="line.2755"></a>
-<span class="sourceLineNo">2756</span>    if (!serviceStarted) {<a 
name="line.2756"></a>
-<span class="sourceLineNo">2757</span>      throw new 
ServerNotRunningYetException("Server is not running yet");<a 
name="line.2757"></a>
-<span class="sourceLineNo">2758</span>    }<a name="line.2758"></a>
-<span class="sourceLineNo">2759</span>  }<a name="line.2759"></a>
-<span class="sourceLineNo">2760</span><a name="line.2760"></a>
-<span class="sourceLineNo">2761</span>  public static class 
MasterStoppedException extends DoNotRetryIOException {<a name="line.2761"></a>
-<span class="sourceLineNo">2762</span>    MasterStoppedException() {<a 
name="line.2762"></a>
-<span class="sourceLineNo">2763</span>      super();<a name="line.2763"></a>
-<span class="sourceLineNo">2764</span>    }<a name="line.2764"></a>
-<span class="sourceLineNo">2765</span>  }<a name="line.2765"></a>
-<span class="sourceLineNo">2766</span><a name="line.2766"></a>
-<span class="sourceLineNo">2767</span>  void checkInitialized() throws 
PleaseHoldException, ServerNotRunningYetException,<a name="line.2767"></a>
-<span class="sourceLineNo">2768</span>      MasterNotRunningException, 
MasterStoppedException {<a name="line.2768"></a>
-<span class="sourceLineNo">2769</span>    checkServiceStarted();<a 
name="line.2769"></a>
-<span class="sourceLineNo">2770</span>    if (!isInitialized()) {<a 
name="line.2770"></a>
-<span class="sourceLineNo">2771</span>      throw new 
PleaseHoldException("Master is initializing");<a name="line.2771"></a>
-<span class="sourceLineNo">2772</span>    }<a name="line.2772"></a>
-<span class="sourceLineNo">2773</span>    if (isStopped()) {<a 
name="line.2773"></a>
-<span class="sourceLineNo">2774</span>      throw new 
MasterStoppedException();<a name="line.2774"></a>
+<span class="sourceLineNo">2378</span>        
LOG.info(getClientIdAuditPrefix() + " modify " + tableName);<a 
name="line.2378"></a>
+<span class="sourceLineNo">2379</span><a name="line.2379"></a>
+<span class="sourceLineNo">2380</span>        // Execute the operation 
synchronously - wait for the operation completes before continuing.<a 
name="line.2380"></a>
+<span class="sourceLineNo">2381</span>        //<a name="line.2381"></a>
+<span class="sourceLineNo">2382</span>        // We need to wait for the 
procedure to potentially fail due to "prepare" sanity<a name="line.2382"></a>
+<span class="sourceLineNo">2383</span>        // checks. This will block only 
the beginning of the procedure. See HBASE-19953.<a name="line.2383"></a>
+<span class="sourceLineNo">2384</span>        ProcedurePrepareLatch latch = 
ProcedurePrepareLatch.createBlockingLatch();<a name="line.2384"></a>
+<span class="sourceLineNo">2385</span>        submitProcedure(<a 
name="line.2385"></a>
+<span class="sourceLineNo">2386</span>          new 
ModifyTableProcedure(procedureExecutor.getEnvironment(), newDescriptor, 
latch));<a name="line.2386"></a>
+<span class="sourceLineNo">2387</span>        latch.await();<a 
name="line.2387"></a>
+<span class="sourceLineNo">2388</span><a name="line.2388"></a>
+<span class="sourceLineNo">2389</span>        
getMaster().getMasterCoprocessorHost()<a name="line.2389"></a>
+<span class="sourceLineNo">2390</span>          .postModifyTable(tableName, 
oldDescriptor, newDescriptor);<a name="line.2390"></a>
+<span class="sourceLineNo">2391</span>      }<a name="line.2391"></a>
+<span class="sourceLineNo">2392</span><a name="line.2392"></a>
+<span class="sourceLineNo">2393</span>      @Override<a name="line.2393"></a>
+<span class="sourceLineNo">2394</span>      protected String getDescription() 
{<a name="line.2394"></a>
+<span class="sourceLineNo">2395</span>        return "ModifyTableProcedure";<a 
name="line.2395"></a>
+<span class="sourceLineNo">2396</span>      }<a name="line.2396"></a>
+<span class="sourceLineNo">2397</span>    });<a name="line.2397"></a>
+<span class="sourceLineNo">2398</span>  }<a name="line.2398"></a>
+<span class="sourceLineNo">2399</span><a name="line.2399"></a>
+<span class="sourceLineNo">2400</span>  public long restoreSnapshot(final 
SnapshotDescription snapshotDesc,<a name="line.2400"></a>
+<span class="sourceLineNo">2401</span>      final long nonceGroup, final long 
nonce, final boolean restoreAcl) throws IOException {<a name="line.2401"></a>
+<span class="sourceLineNo">2402</span>    checkInitialized();<a 
name="line.2402"></a>
+<span class="sourceLineNo">2403</span>    
getSnapshotManager().checkSnapshotSupport();<a name="line.2403"></a>
+<span class="sourceLineNo">2404</span><a name="line.2404"></a>
+<span class="sourceLineNo">2405</span>    // Ensure namespace exists. Will 
throw exception if non-known NS.<a name="line.2405"></a>
+<span class="sourceLineNo">2406</span>    final TableName dstTable = 
TableName.valueOf(snapshotDesc.getTable());<a name="line.2406"></a>
+<span class="sourceLineNo">2407</span>    
getClusterSchema().getNamespace(dstTable.getNamespaceAsString());<a 
name="line.2407"></a>
+<span class="sourceLineNo">2408</span><a name="line.2408"></a>
+<span class="sourceLineNo">2409</span>    return 
MasterProcedureUtil.submitProcedure(<a name="line.2409"></a>
+<span class="sourceLineNo">2410</span>        new 
MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a 
name="line.2410"></a>
+<span class="sourceLineNo">2411</span>      @Override<a name="line.2411"></a>
+<span class="sourceLineNo">2412</span>      protected void run() throws 
IOException {<a name="line.2412"></a>
+<span class="sourceLineNo">2413</span>          setProcId(<a 
name="line.2413"></a>
+<span class="sourceLineNo">2414</span>            
getSnapshotManager().restoreOrCloneSnapshot(snapshotDesc, getNonceKey(), 
restoreAcl));<a name="line.2414"></a>
+<span class="sourceLineNo">2415</span>      }<a name="line.2415"></a>
+<span class="sourceLineNo">2416</span><a name="line.2416"></a>
+<span class="sourceLineNo">2417</span>      @Override<a name="line.2417"></a>
+<span class="sourceLineNo">2418</span>      protected String getDescription() 
{<a name="line.2418"></a>
+<span class="sourceLineNo">2419</span>        return 
"RestoreSnapshotProcedure";<a name="line.2419"></a>
+<span class="sourceLineNo">2420</span>      }<a name="line.2420"></a>
+<span class="sourceLineNo">2421</span>    });<a name="line.2421"></a>
+<span class="sourceLineNo">2422</span>  }<a name="line.2422"></a>
+<span class="sourceLineNo">2423</span><a name="line.2423"></a>
+<span class="sourceLineNo">2424</span>  private void checkTableExists(final 
TableName tableName)<a name="line.2424"></a>
+<span class="sourceLineNo">2425</span>      throws IOException, 
TableNotFoundException {<a name="line.2425"></a>
+<span class="sourceLineNo">2426</span>    if 
(!MetaTableAccessor.tableExists(getConnection(), tableName)) {<a 
name="line.2426"></a>
+<span class="sourceLineNo">2427</span>      throw new 
TableNotFoundException(tableName);<a name="line.2427"></a>
+<span class="sourceLineNo">2428</span>    }<a name="line.2428"></a>
+<span class="sourceLineNo">2429</span>  }<a name="line.2429"></a>
+<span class="sourceLineNo">2430</span><a name="line.2430"></a>
+<span class="sourceLineNo">2431</span>  @Override<a name="line.2431"></a>
+<span class="sourceLineNo">2432</span>  public void checkTableModifiable(final 
TableName tableName)<a name="line.2432"></a>
+<span class="sourceLineNo">2433</span>      throws IOException, 
TableNotFoundException, TableNotDisabledException {<a name="line.2433"></a>
+<span class="sourceLineNo">2434</span>    if (isCatalogTable(tableName)) {<a 
name="line.2434"></a>
+<span class="sourceLineNo">2435</span>      throw new IOException("Can't 
modify catalog tables");<a name="line.2435"></a>
+<span class="sourceLineNo">2436</span>    }<a name="line.2436"></a>
+<span class="sourceLineNo">2437</span>    checkTableExists(tableName);<a 
name="line.2437"></a>
+<span class="sourceLineNo">2438</span>    TableState ts = 
getTableStateManager().getTableState(tableName);<a name="line.2438"></a>
+<span class="sourceLineNo">2439</span>    if (!ts.isDisabled()) {<a 
name="line.2439"></a>
+<span class="sourceLineNo">2440</span>      throw new 
TableNotDisabledException("Not DISABLED; " + ts);<a name="line.2440"></a>
+<span class="sourceLineNo">2441</span>    }<a name="line.2441"></a>
+<span class="sourceLineNo">2442</span>  }<a name="line.2442"></a>
+<span class="sourceLineNo">2443</span><a name="line.2443"></a>
+<span class="sourceLineNo">2444</span>  public ClusterMetrics 
getClusterMetricsWithoutCoprocessor() throws InterruptedIOException {<a 
name="line.2444"></a>
+<span class="sourceLineNo">2445</span>    return 
getClusterMetricsWithoutCoprocessor(EnumSet.allOf(Option.class));<a 
name="line.2445"></a>
+<span class="sourceLineNo">2446</span>  }<a name="line.2446"></a>
+<span class="sourceLineNo">2447</span><a name="line.2447"></a>
+<span class="sourceLineNo">2448</span>  public ClusterMetrics 
getClusterMetricsWithoutCoprocessor(EnumSet&lt;Option&gt; options)<a 
name="line.2448"></a>
+<span class="sourceLineNo">2449</span>      throws InterruptedIOException {<a 
name="line.2449"></a>
+<span class="sourceLineNo">2450</span>    ClusterMetricsBuilder builder = 
ClusterMetricsBuilder.newBuilder();<a name="line.2450"></a>
+<span class="sourceLineNo">2451</span>    // given that hbase1 can't submit 
the request with Option,<a name="line.2451"></a>
+<span class="sourceLineNo">2452</span>    // we return all information to 
client if the list of Option is empty.<a name="line.2452"></a>
+<span class="sourceLineNo">2453</span>    if (options.isEmpty()) {<a 
name="line.2453"></a>
+<span class="sourceLineNo">2454</span>      options = 
EnumSet.allOf(Option.class);<a name="line.2454"></a>
+<span class="sourceLineNo">2455</span>    }<a name="line.2455"></a>
+<span class="sourceLineNo">2456</span><a name="line.2456"></a>
+<span class="sourceLineNo">2457</span>    for (Option opt : options) {<a 
name="line.2457"></a>
+<span class="sourceLineNo">2458</span>      switch (opt) {<a 
name="line.2458"></a>
+<span class="sourceLineNo">2459</span>        case HBASE_VERSION: 
builder.setHBaseVersion(VersionInfo.getVersion()); break;<a 
name="line.2459"></a>
+<span class="sourceLineNo">2460</span>        case CLUSTER_ID: 
builder.setClusterId(getClusterId()); break;<a name="line.2460"></a>
+<span class="sourceLineNo">2461</span>        case MASTER: 
builder.setMasterName(getServerName()); break;<a name="line.2461"></a>
+<span class="sourceLineNo">2462</span>        case BACKUP_MASTERS: 
builder.setBackerMasterNames(getBackupMasters()); break;<a name="line.2462"></a>
+<span class="sourceLineNo">2463</span>        case LIVE_SERVERS: {<a 
name="line.2463"></a>
+<span class="sourceLineNo">2464</span>          if (serverManager != null) {<a 
name="line.2464"></a>
+<span class="sourceLineNo">2465</span>            
builder.setLiveServerMetrics(serverManager.getOnlineServers().entrySet().stream()<a
 name="line.2465"></a>
+<span class="sourceLineNo">2466</span>              
.collect(Collectors.toMap(e -&gt; e.getKey(), e -&gt; e.getValue())));<a 
name="line.2466"></a>
+<span class="sourceLineNo">2467</span>          }<a name="line.2467"></a>
+<span class="sourceLineNo">2468</span>          break;<a name="line.2468"></a>
+<span class="sourceLineNo">2469</span>        }<a name="line.2469"></a>
+<span class="sourceLineNo">2470</span>        case DEAD_SERVERS: {<a 
name="line.2470"></a>
+<span class="sourceLineNo">2471</span>          if (serverManager != null) {<a 
name="line.2471"></a>
+<span class="sourceLineNo">2472</span>            
builder.setDeadServerNames(new ArrayList&lt;&gt;(<a name="line.2472"></a>
+<span class="sourceLineNo">2473</span>              
serverManager.getDeadServers().copyServerNames()));<a name="line.2473"></a>
+<span class="sourceLineNo">2474</span>          }<a name="line.2474"></a>
+<span class="sourceLineNo">2475</span>          break;<a name="line.2475"></a>
+<span class="sourceLineNo">2476</span>        }<a name="line.2476"></a>
+<span class="sourceLineNo">2477</span>        case MASTER_COPROCESSORS: {<a 
name="line.2477"></a>
+<span class="sourceLineNo">2478</span>          if (cpHost != null) {<a 
name="line.2478"></a>
+<span class="sourceLineNo">2479</span>            
builder.setMasterCoprocessorNames(Arrays.asList(getMasterCoprocessors()));<a 
name="line.2479"></a>
+<span class="sourceLineNo">2480</span>          }<a name="line.2480"></a>
+<span class="sourceLineNo">2481</span>          break;<a name="line.2481"></a>
+<span class="sourceLineNo">2482</span>        }<a name="line.2482"></a>
+<span class="sourceLineNo">2483</span>        case REGIONS_IN_TRANSITION: {<a 
name="line.2483"></a>
+<span class="sourceLineNo">2484</span>          if (assignmentManager != null) 
{<a name="line.2484"></a>
+<span class="sourceLineNo">2485</span>            
builder.setRegionsInTransition(assignmentManager.getRegionStates()<a 
name="line.2485"></a>
+<span class="sourceLineNo">2486</span>                
.getRegionsStateInTransition());<a name="line.2486"></a>
+<span class="sourceLineNo">2487</span>          }<a name="line.2487"></a>
+<span class="sourceLineNo">2488</span>          break;<a name="line.2488"></a>
+<span class="sourceLineNo">2489</span>        }<a name="line.2489"></a>
+<span class="sourceLineNo">2490</span>        case BALANCER_ON: {<a 
name="line.2490"></a>
+<span class="sourceLineNo">2491</span>          if (loadBalancerTracker != 
null) {<a name="line.2491"></a>
+<span class="sourceLineNo">2492</span>            
builder.setBalancerOn(loadBalancerTracker.isBalancerOn());<a 
name="line.2492"></a>
+<span class="sourceLineNo">2493</span>          }<a name="line.2493"></a>
+<span class="sourceLineNo">2494</span>          break;<a name="line.2494"></a>
+<span class="sourceLineNo">2495</span>        }<a name="line.2495"></a>
+<span class="sourceLineNo">2496</span>        case MASTER_INFO_PORT: {<a 
name="line.2496"></a>
+<span class="sourceLineNo">2497</span>          if (infoServer != null) {<a 
name="line.2497"></a>
+<span class="sourceLineNo">2498</span>            
builder.setMasterInfoPort(infoServer.getPort());<a name="line.2498"></a>
+<span class="sourceLineNo">2499</span>          }<a name="line.2499"></a>
+<span class="sourceLineNo">2500</span>          break;<a name="line.2500"></a>
+<span class="sourceLineNo">2501</span>        }<a name="line.2501"></a>
+<span class="sourceLineNo">2502</span>      }<a name="line.2502"></a>
+<span class="sourceLineNo">2503</span>    }<a name="line.2503"></a>
+<span class="sourceLineNo">2504</span>    return builder.build();<a 
name="line.2504"></a>
+<span class="sourceLineNo">2505</span>  }<a name="line.2505"></a>
+<span class="sourceLineNo">2506</span><a name="line.2506"></a>
+<span class="sourceLineNo">2507</span>  /**<a name="line.2507"></a>
+<span class="sourceLineNo">2508</span>   * @return cluster status<a 
name="line.2508"></a>
+<span class="sourceLineNo">2509</span>   */<a name="line.2509"></a>
+<span class="sourceLineNo">2510</span>  public ClusterMetrics 
getClusterMetrics() throws IOException {<a name="line.2510"></a>
+<span class="sourceLineNo">2511</span>    return 
getClusterMetrics(EnumSet.allOf(Option.class));<a name="line.2511"></a>
+<span class="sourceLineNo">2512</span>  }<a name="line.2512"></a>
+<span class="sourceLineNo">2513</span><a name="line.2513"></a>
+<span class="sourceLineNo">2514</span>  public ClusterMetrics 
getClusterMetrics(EnumSet&lt;Option&gt; options) throws IOException {<a 
name="line.2514"></a>
+<span class="sourceLineNo">2515</span>    if (cpHost != null) {<a 
name="line.2515"></a>
+<span class="sourceLineNo">2516</span>      cpHost.preGetClusterMetrics();<a 
name="line.2516"></a>
+<span class="sourceLineNo">2517</span>    }<a name="line.2517"></a>
+<span class="sourceLineNo">2518</span>    ClusterMetrics status = 
getClusterMetricsWithoutCoprocessor(options);<a name="line.2518"></a>
+<span class="sourceLineNo">2519</span>    if (cpHost != null) {<a 
name="line.2519"></a>
+<span class="sourceLineNo">2520</span>      
cpHost.postGetClusterMetrics(status);<a name="line.2520"></a>
+<span class="sourceLineNo">2521</span>    }<a name="line.2521"></a>
+<span class="sourceLineNo">2522</span>    return status;<a 
name="line.2522"></a>
+<span class="sourceLineNo">2523</span>  }<a name="line.2523"></a>
+<span class="sourceLineNo">2524</span><a name="line.2524"></a>
+<span class="sourceLineNo">2525</span>  private List&lt;ServerName&gt; 
getBackupMasters() throws InterruptedIOException {<a name="line.2525"></a>
+<span class="sourceLineNo">2526</span>    // Build Set of backup masters from 
ZK nodes<a name="line.2526"></a>
+<span class="sourceLineNo">2527</span>    List&lt;String&gt; 
backupMasterStrings;<a name="line.2527"></a>
+<span class="sourceLineNo">2528</span>    try {<a name="line.2528"></a>
+<span class="sourceLineNo">2529</span>      backupMasterStrings = 
ZKUtil.listChildrenNoWatch(this.zooKeeper,<a name="line.2529"></a>
+<span class="sourceLineNo">2530</span>        
this.zooKeeper.znodePaths.backupMasterAddressesZNode);<a name="line.2530"></a>
+<span class="sourceLineNo">2531</span>    } catch (KeeperException e) {<a 
name="line.2531"></a>
+<span class="sourceLineNo">2532</span>      
LOG.warn(this.zooKeeper.prefix("Unable to list backup servers"), e);<a 
name="line.2532"></a>
+<span class="sourceLineNo">2533</span>      backupMasterStrings = null;<a 
name="line.2533"></a>
+<span class="sourceLineNo">2534</span>    }<a name="line.2534"></a>
+<span class="sourceLineNo">2535</span><a name="line.2535"></a>
+<span class="sourceLineNo">2536</span>    List&lt;ServerName&gt; backupMasters 
= Collections.emptyList();<a name="line.2536"></a>
+<span class="sourceLineNo">2537</span>    if (backupMasterStrings != null 
&amp;&amp; !backupMasterStrings.isEmpty()) {<a name="line.2537"></a>
+<span class="sourceLineNo">2538</span>      backupMasters = new 
ArrayList&lt;&gt;(backupMasterStrings.size());<a name="line.2538"></a>
+<span class="sourceLineNo">2539</span>      for (String s: 
backupMasterStrings) {<a name="line.2539"></a>
+<span class="sourceLineNo">2540</span>        try {<a name="line.2540"></a>
+<span class="sourceLineNo">2541</span>          byte [] bytes;<a 
name="line.2541"></a>
+<span class="sourceLineNo">2542</span>          try {<a name="line.2542"></a>
+<span class="sourceLineNo">2543</span>            bytes = 
ZKUtil.getData(this.zooKeeper, ZNodePaths.joinZNode(<a name="line.2543"></a>
+<span class="sourceLineNo">2544</span>                
this.zooKeeper.znodePaths.backupMasterAddressesZNode, s));<a 
name="line.2544"></a>
+<span class="sourceLineNo">2545</span>          } catch (InterruptedException 
e) {<a name="line.2545"></a>
+<span class="sourceLineNo">2546</span>            throw new 
InterruptedIOException();<a name="line.2546"></a>
+<span class="sourceLineNo">2547</span>          }<a name="line.2547"></a>
+<span class="sourceLineNo">2548</span>          if (bytes != null) {<a 
name="line.2548"></a>
+<span class="sourceLineNo">2549</span>            ServerName sn;<a 
name="line.2549"></a>
+<span class="sourceLineNo">2550</span>            try {<a name="line.2550"></a>
+<span class="sourceLineNo">2551</span>              sn = 
ProtobufUtil.parseServerNameFrom(bytes);<a name="line.2551"></a>
+<span class="sourceLineNo">2552</span>            } catch 
(DeserializationException e) {<a name="line.2552"></a>
+<span class="sourceLineNo">2553</span>              LOG.warn("Failed parse, 
skipping registering backup server", e);<a name="line.2553"></a>
+<span class="sourceLineNo">2554</span>              continue;<a 
name="line.2554"></a>
+<span class="sourceLineNo">2555</span>            }<a name="line.2555"></a>
+<span class="sourceLineNo">2556</span>            backupMasters.add(sn);<a 
name="line.2556"></a>
+<span class="sourceLineNo">2557</span>          }<a name="line.2557"></a>
+<span class="sourceLineNo">2558</span>        } catch (KeeperException e) {<a 
name="line.2558"></a>
+<span class="sourceLineNo">2559</span>          
LOG.warn(this.zooKeeper.prefix("Unable to get information about " +<a 
name="line.2559"></a>
+<span class="sourceLineNo">2560</span>                   "backup servers"), 
e);<a name="line.2560"></a>
+<span class="sourceLineNo">2561</span>        }<a name="line.2561"></a>
+<span class="sourceLineNo">2562</span>      }<a name="line.2562"></a>
+<span class="sourceLineNo">2563</span>      Collections.sort(backupMasters, 
new Comparator&lt;ServerName&gt;() {<a name="line.2563"></a>
+<span class="sourceLineNo">2564</span>        @Override<a name="line.2564"></a>
+<span class="sourceLineNo">2565</span>        public int compare(ServerName 
s1, ServerName s2) {<a name="line.2565"></a>
+<span class="sourceLineNo">2566</span>          return 
s1.getServerName().compareTo(s2.getServerName());<a name="line.2566"></a>
+<span class="sourceLineNo">2567</span>        }});<a name="line.2567"></a>
+<span class="sourceLineNo">2568</span>    }<a name="line.2568"></a>
+<span class="sourceLineNo">2569</span>    return backupMasters;<a 
name="line.2569"></a>
+<span class="sourceLineNo">2570</span>  }<a name="line.2570"></a>
+<span class="sourceLineNo">2571</span><a name="line.2571"></a>
+<span class="sourceLineNo">2572</span>  /**<a name="line.2572"></a>
+<span class="sourceLineNo">2573</span>   * The set of loaded coprocessors is 
stored in a static set. Since it's<a name="line.2573"></a>
+<span class="sourceLineNo">2574</span>   * statically allocated, it does not 
require that HMaster's cpHost be<a name="line.2574"></a>
+<span class="sourceLineNo">2575</span>   * initialized prior to accessing 
it.<a name="line.2575"></a>
+<span class="sourceLineNo">2576</span>   * @return a String representation of 
the set of names of the loaded coprocessors.<a name="line.2576"></a>
+<span class="sourceLineNo">2577</span>   */<a name="line.2577"></a>
+<span class="sourceLineNo">2578</span>  public static String 
getLoadedCoprocessors() {<a name="line.2578"></a>
+<span class="sourceLineNo">2579</span>    return 
CoprocessorHost.getLoadedCoprocessors().toString();<a name="line.2579"></a>
+<span class="sourceLineNo">2580</span>  }<a name="line.2580"></a>
+<span class="sourceLineNo">2581</span><a name="line.2581"></a>
+<span class="sourceLineNo">2582</span>  /**<a name="line.2582"></a>
+<span class="sourceLineNo">2583</span>   * @return timestamp in millis when 
HMaster was started.<a name="line.2583"></a>
+<span class="sourceLineNo">2584</span>   */<a name="line.2584"></a>
+<span class="sourceLineNo">2585</span>  public long getMasterStartTime() {<a 
name="line.2585"></a>
+<span class="sourceLineNo">2586</span>    return startcode;<a 
name="line.2586"></a>
+<span class="sourceLineNo">2587</span>  }<a name="line.2587"></a>
+<span class="sourceLineNo">2588</span><a name="line.2588"></a>
+<span class="sourceLineNo">2589</span>  /**<a name="line.2589"></a>
+<span class="sourceLineNo">2590</span>   * @return timestamp in millis when 
HMaster became the active master.<a name="line.2590"></a>
+<span class="sourceLineNo">2591</span>   */<a name="line.2591"></a>
+<span class="sourceLineNo">2592</span>  public long getMasterActiveTime() {<a 
name="line.2592"></a>
+<span class="sourceLineNo">2593</span>    return masterActiveTime;<a 
name="line.2593"></a>
+<span class="sourceLineNo">2594</span>  }<a name="line.2594"></a>
+<span class="sourceLineNo">2595</span><a name="line.2595"></a>
+<span class="sourceLineNo">2596</span>  /**<a name="line.2596"></a>
+<span class="sourceLineNo">2597</span>   * @return timestamp in millis when 
HMaster finished becoming the active master<a name="line.2597"></a>
+<span class="sourceLineNo">2598</span>   */<a name="line.2598"></a>
+<span class="sourceLineNo">2599</span>  public long 
getMasterFinishedInitializationTime() {<a name="line.2599"></a>
+<span class="sourceLineNo">2600</span>    return 
masterFinishedInitializationTime;<a name="line.2600"></a>
+<span class="sourceLineNo">2601</span>  }<a name="line.2601"></a>
+<span class="sourceLineNo">2602</span><a name="line.2602"></a>
+<span class="sourceLineNo">2603</span>  public int getNumWALFiles() {<a 
name="line.2603"></a>
+<span class="sourceLineNo">2604</span>    return procedureStore != null ? 
procedureStore.getActiveLogs().size() : 0;<a name="line.2604"></a>
+<span class="sourceLineNo">2605</span>  }<a name="line.2605"></a>
+<span class="sourceLineNo">2606</span><a name="line.2606"></a>
+<span class="sourceLineNo">2607</span>  public WALProcedureStore 
getWalProcedureStore() {<a name="line.2607"></a>
+<span class="sourceLineNo">2608</span>    return procedureStore;<a 
name="line.2608"></a>
+<span class="sourceLineNo">2609</span>  }<a name="line.2609"></a>
+<span class="sourceLineNo">2610</span><a name="line.2610"></a>
+<span class="sourceLineNo">2611</span>  public int 
getRegionServerInfoPort(final ServerName sn) {<a name="line.2611"></a>
+<span class="sourceLineNo">2612</span>    RegionServerInfo info = 
this.regionServerTracker.getRegionServerInfo(sn);<a name="line.2612"></a>
+<span class="sourceLineNo">2613</span>    if (info == null || 
info.getInfoPort() == 0) {<a name="line.2613"></a>
+<span class="sourceLineNo">2614</span>      return 
conf.getInt(HConstants.REGIONSERVER_INFO_PORT,<a name="line.2614"></a>
+<span class="sourceLineNo">2615</span>        
HConstants.DEFAULT_REGIONSERVER_INFOPORT);<a name="line.2615"></a>
+<span class="sourceLineNo">2616</span>    }<a name="line.2616"></a>
+<span class="sourceLineNo">2617</span>    return info.getInfoPort();<a 
name="line.2617"></a>
+<span class="sourceLineNo">2618</span>  }<a name="line.2618"></a>
+<span class="sourceLineNo">2619</span><a name="line.2619"></a>
+<span class="sourceLineNo">2620</span>  @Override<a name="line.2620"></a>
+<span class="sourceLineNo">2621</span>  public String 
getRegionServerVersion(final ServerName sn) {<a name="line.2621"></a>
+<span class="sourceLineNo">2622</span>    RegionServerInfo info = 
this.regionServerTracker.getRegionServerInfo(sn);<a name="line.2622"></a>
+<span class="sourceLineNo">2623</span>    if (info != null &amp;&amp; 
info.hasVersionInfo()) {<a name="line.2623"></a>
+<span class="sourceLineNo">2624</span>      return 
info.getVersionInfo().getVersion();<a name="line.2624"></a>
+<span class="sourceLineNo">2625</span>    }<a name="line.2625"></a>
+<span class="sourceLineNo">2626</span>    return "0.0.0"; //Lowest version to 
prevent move system region to unknown version RS.<a name="line.2626"></a>
+<span class="sourceLineNo">2627</span>  }<a name="line.2627"></a>
+<span class="sourceLineNo">2628</span><a name="line.2628"></a>
+<span class="sourceLineNo">2629</span>  @Override<a name="line.2629"></a>
+<span class="sourceLineNo">2630</span>  public void 
checkIfShouldMoveSystemRegionAsync() {<a name="line.2630"></a>
+<span class="sourceLineNo">2631</span>    
assignmentManager.checkIfShouldMoveSystemRegionAsync();<a name="line.2631"></a>
+<span class="sourceLineNo">2632</span>  }<a name="line.2632"></a>
+<span class="sourceLineNo">2633</span><a name="line.2633"></a>
+<span class="sourceLineNo">2634</span>  /**<a name="line.2634"></a>
+<span class="sourceLineNo">2635</span>   * @return array of coprocessor 
SimpleNames.<a name="line.2635"></a>
+<span class="sourceLineNo">2636</span>   */<a name="line.2636"></a>
+<span class="sourceLineNo">2637</span>  public String[] 
getMasterCoprocessors() {<a name="line.2637"></a>
+<span class="sourceLineNo">2638</span>    Set&lt;String&gt; masterCoprocessors 
= getMasterCoprocessorHost().getCoprocessors();<a name="line.2638"></a>
+<span class="sourceLineNo">2639</span>    return 
masterCoprocessors.toArray(new String[masterCoprocessors.size()]);<a 
name="line.2639"></a>
+<span class="sourceLineNo">2640</span>  }<a name="line.2640"></a>
+<span class="sourceLineNo">2641</span><a name="line.2641"></a>
+<span class="sourceLineNo">2642</span>  @Override<a name="line.2642"></a>
+<span class="sourceLineNo">2643</span>  public void abort(String reason, 
Throwable cause) {<a name="line.2643"></a>
+<span class="sourceLineNo">2644</span>    if (isAborted() || isStopped()) {<a 
name="line.2644"></a>
+<span class="sourceLineNo">2645</span>      return;<a name="line.2645"></a>
+<span class="sourceLineNo">2646</span>    }<a name="line.2646"></a>
+<span class="sourceLineNo">2647</span>    if (cpHost != null) {<a 
name="line.2647"></a>
+<span class="sourceLineNo">2648</span>      // HBASE-4014: dump a list of 
loaded coprocessors.<a name="line.2648"></a>
+<span class="sourceLineNo">2649</span>      LOG.error(HBaseMarkers.FATAL, 
"Master server abort: loaded coprocessors are: " +<a name="line.2649"></a>
+<span class="sourceLineNo">2650</span>          getLoadedCoprocessors());<a 
name="line.2650"></a>
+<span class="sourceLineNo">2651</span>    }<a name="line.2651"></a>
+<span class="sourceLineNo">2652</span>    String msg = "***** ABORTING master 
" + this + ": " + reason + " *****";<a name="line.2652"></a>
+<span class="sourceLineNo">2653</span>    if (cause != null) {<a 
name="line.2653"></a>
+<span class="sourceLineNo">2654</span>      LOG.error(HBaseMarkers.FATAL, msg, 
cause);<a name="line.2654"></a>
+<span class="sourceLineNo">2655</span>    } else {<a name="line.2655"></a>
+<span class="sourceLineNo">2656</span>      LOG.error(HBaseMarkers.FATAL, 
msg);<a name="line.2656"></a>
+<span class="sourceLineNo">2657</span>    }<a name="line.2657"></a>
+<span class="sourceLineNo">2658</span><a name="line.2658"></a>
+<span class="sourceLineNo">2659</span>    try {<a name="line.2659"></a>
+<span class="sourceLineNo">2660</span>      stopMaster();<a 
name="line.2660"></a>
+<span class="sourceLineNo">2661</span>    } catch (IOException e) {<a 
name="line.2661"></a>
+<span class="sourceLineNo">2662</span>      LOG.error("Exception occurred 
while stopping master", e);<a name="line.2662"></a>
+<span class="sourceLineNo">2663</span>    }<a name="line.2663"></a>
+<span class="sourceLineNo">2664</span>  }<a name="line.2664"></a>
+<span class="sourceLineNo">2665</span><a name="line.2665"></a>
+<span class="sourceLineNo">2666</span>  @Override<a name="line.2666"></a>
+<span class="sourceLineNo">2667</span>  public ZKWatcher getZooKeeper() {<a 
name="line.2667"></a>
+<span class="sourceLineNo">2668</span>    return zooKeeper;<a 
name="line.2668"></a>
+<span class="sourceLineNo">2669</span>  }<a name="line.2669"></a>
+<span class="sourceLineNo">2670</span><a name="line.2670"></a>
+<span class="sourceLineNo">2671</span>  @Override<a name="line.2671"></a>
+<span class="sourceLineNo">2672</span>  public MasterCoprocessorHost 
getMasterCoprocessorHost() {<a name="line.2672"></a>
+<span class="sourceLineNo">2673</span>    return cpHost;<a 
name="line.2673"></a>
+<span class="sourceLineNo">2674</span>  }<a name="line.2674"></a>
+<span class="sourceLineNo">2675</span><a name="line.2675"></a>
+<span class="sourceLineNo">2676</span>  @Override<a name="line.2676"></a>
+<span class="sourceLineNo">2677</span>  public MasterQuotaManager 
getMasterQuotaManager() {<a name="line.2677"></a>
+<span class="sourceLineNo">2678</span>    return quotaManager;<a 
name="line.2678"></a>
+<span class="sourceLineNo">2679</span>  }<a name="line.2679"></a>
+<span class="sourceLineNo">2680</span><a name="line.2680"></a>
+<span class="sourceLineNo">2681</span>  @Override<a name="line.2681"></a>
+<span class="sourceLineNo">2682</span>  public 
ProcedureExecutor&lt;MasterProcedureEnv&gt; getMasterProcedureExecutor() {<a 
name="line.2682"></a>
+<span class="sourceLineNo">2683</span>    return procedureExecutor;<a 
name="line.2683"></a>
+<span class="sourceLineNo">2684</span>  }<a name="line.2684"></a>
+<span class="sourceLineNo">2685</span><a name="line.2685"></a>
+<span class="sourceLineNo">2686</span>  @Override<a name="line.2686"></a>
+<span class="sourceLineNo">2687</span>  public ServerName getServerName() {<a 
name="line.2687"></a>
+<span class="sourceLineNo">2688</span>    return this.serverName;<a 
name="line.2688"></a>
+<span class="sourceLineNo">2689</span>  }<a name="line.2689"></a>
+<span class="sourceLineNo">2690</span><a name="line.2690"></a>
+<span class="sourceLineNo">2691</span>  @Override<a name="line.2691"></a>
+<span class="sourceLineNo">2692</span>  public AssignmentManager 
getAssignmentManager() {<a name="line.2692"></a>
+<span class="sourceLineNo">2693</span>    return this.assignmentManager;<a 
name="line.2693"></a>
+<span class="sourceLineNo">2694</span>  }<a name="line.2694"></a>
+<span class="sourceLineNo">2695</span><a name="line.2695"></a>
+<span class="sourceLineNo">2696</span>  @Override<a name="line.2696"></a>
+<span class="sourceLineNo">2697</span>  public CatalogJanitor 
getCatalogJanitor() {<a name="line.2697"></a>
+<span class="sourceLineNo">2698</span>    return this.catalogJanitorChore;<a 
name="line.2698"></a>
+<span class="sourceLineNo">2699</span>  }<a name="line.2699"></a>
+<span class="sourceLineNo">2700</span><a name="line.2700"></a>
+<span class="sourceLineNo">2701</span>  public MemoryBoundedLogMessageBuffer 
getRegionServerFatalLogBuffer() {<a name="line.2701"></a>
+<span class="sourceLineNo">2702</span>    return rsFatals;<a 
name="line.2702"></a>
+<span class="sourceLineNo">2703</span>  }<a name="line.2703"></a>
+<span class="sourceLineNo">2704</span><a name="line.2704"></a>
+<span class="sourceLineNo">2705</span>  /**<a name="line.2705"></a>
+<span class="sourceLineNo">2706</span>   * Shutdown the cluster.<a 
name="line.2706"></a>
+<span class="sourceLineNo">2707</span>   * Master runs a coordinated stop of 
all RegionServers and then itself.<a name="line.2707"></a>
+<span class="sourceLineNo">2708</span>   */<a name="line.2708"></a>
+<span class="sourceLineNo">2709</span>  public void shutdown() throws 
IOException {<a name="line.2709"></a>
+<span class="sourceLineNo">2710</span>    if (cpHost != null) {<a 
name="line.2710"></a>
+<span class="sourceLineNo">2711</span>      cpHost.preShutdown();<a 
name="line.2711"></a>
+<span class="sourceLineNo">2712</span>    }<a name="line.2712"></a>
+<span class="sourceLineNo">2713</span>    // Tell the servermanager cluster 
shutdown has been called. This makes it so when Master is<a 
name="line.2713"></a>
+<span class="sourceLineNo">2714</span>    // last running server, it'll stop 
itself. Next, we broadcast the cluster shutdown by setting<a 
name="line.2714"></a>
+<span class="sourceLineNo">2715</span>    // the cluster status as down. 
RegionServers will notice this change in state and will start<a 
name="line.2715"></a>
+<span class="sourceLineNo">2716</span>    // shutting themselves down. When 
last has exited, Master can go down.<a name="line.2716"></a>
+<span class="sourceLineNo">2717</span>    if (this.serverManager != null) {<a 
name="line.2717"></a>
+<span class="sourceLineNo">2718</span>      
this.serverManager.shutdownCluster();<a name="line.2718"></a>
+<span class="sourceLineNo">2719</span>    }<a name="line.2719"></a>
+<span class="sourceLineNo">2720</span>    if (this.clusterStatusTracker != 
null) {<a name="line.2720"></a>
+<span class="sourceLineNo">2721</span>      try {<a name="line.2721"></a>
+<span class="sourceLineNo">2722</span>        
this.clusterStatusTracker.setClusterDown();<a name="line.2722"></a>
+<span class="sourceLineNo">2723</span>      } catch (KeeperException e) {<a 
name="line.2723"></a>
+<span class="sourceLineNo">2724</span>        LOG.error("ZooKeeper exception 
trying to set cluster as down in ZK", e);<a name="line.2724"></a>
+<span class="sourceLineNo">2725</span>      }<a name="line.2725"></a>
+<span class="sourceLineNo">2726</span>    }<a name="line.2726"></a>
+<span class="sourceLineNo">2727</span>    // Stop the procedure executor. Will 
stop any ongoing assign, unassign, server crash etc.,<a name="line.2727"></a>
+<span class="sourceLineNo">2728</span>    // processing so we can go down.<a 
name="line.2728"></a>
+<span class="sourceLineNo">2729</span>    if (this.procedureExecutor != null) 
{<a name="line.2729"></a>
+<span class="sourceLineNo">2730</span>      this.procedureExecutor.stop();<a 
name="line.2730"></a>
+<span class="sourceLineNo">2731</span>    }<a name="line.2731"></a>
+<span class="sourceLineNo">2732</span>    // Shutdown our cluster connection. 
This will kill any hosted RPCs that might be going on;<a name="line.2732"></a>
+<span class="sourceLineNo">2733</span>    // this is what we want especially 
if the Master is in startup phase doing call outs to<a name="line.2733"></a>
+<span class="sourceLineNo">2734</span>    // hbase:meta, etc. when cluster is 
down. Without ths connection close, we'd have to wait on<a name="line.2734"></a>
+<span class="sourceLineNo">2735</span>    // the rpc to timeout.<a 
name="line.2735"></a>
+<span class="sourceLineNo">2736</span>    if (this.clusterConnection != null) 
{<a name="line.2736"></a>
+<span class="sourceLineNo">2737</span>      this.clusterConnection.close();<a 
name="line.2737"></a>
+<span class="sourceLineNo">2738</span>    }<a name="line.2738"></a>
+<span class="sourceLineNo">2739</span>  }<a name="line.2739"></a>
+<span class="sourceLineNo">2740</span><a name="line.2740"></a>
+<span class="sourceLineNo">2741</span>  public void stopMaster() throws 
IOException {<a name="line.2741"></a>
+<span class="sourceLineNo">2742</span>    if (cpHost != null) {<a 
name="line.2742"></a>
+<span class="sourceLineNo">2743</span>      cpHost.preStopMaster();<a 
name="line.2743"></a>
+<span class="sourceLineNo">2744</span>    }<a name="line.2744"></a>
+<span class="sourceLineNo">2745</span>    stop("Stopped by " + 
Thread.currentThread().getName());<a name="line.2745"></a>
+<span class="sourceLineNo">2746</span>  }<a name="line.2746"></a>
+<span class="sourceLineNo">2747</span><a name="line.2747"></a>
+<span class="sourceLineNo">2748</span>  @Override<a name="line.2748"></a>
+<span class="sourceLineNo">2749</span>  public void stop(String msg) {<a 
name="line.2749"></a>
+<span class="sourceLineNo">2750</span>    if (!isStopped()) {<a 
name="line.2750"></a>
+<span class="sourceLineNo">2751</span>      super.stop(msg);<a 
name="line.2751"></a>
+<span class="sourceLineNo">2752</span>      if (this.activeMasterManager != 
null) {<a name="line.2752"></a>
+<span class="sourceLineNo">2753</span>        
this.activeMasterManager.stop();<a name="line.2753"></a>
+<span class="sourceLineNo">2754</span>      }<a name="line.2754"></a>
+<span class="sourceLineNo">2755</span>    }<a name="line.2755"></a>
+<span class="sourceLineNo">2756</span>  }<a name="line.2756"></a>
+<span class="sourceLineNo">2757</span><a name="line.2757"></a>
+<span class="sourceLineNo">2758</span>  void checkServiceStarted() throws 
ServerNotRunningYetException {<a name="line.2758"></a>
+<span class="sourceLineNo">2759</span>    if (!serviceStarted) {<a 
name="line.2759"></a>
+<span class="sourceLineNo">2760</span>      throw new 
ServerNotRunningYetException("Server is not running yet");<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><a name="line.2763"></a>
+<span class="sourceLineNo">2764</span>  public static class 
MasterStoppedException extends DoNotRetryIOException {<a name="line.2764"></a>
+<span class="sourceLineNo">2765</span>    MasterStoppedException() {<a 
name="line.2765"></a>
+<span class="sourceLineNo">2766</span>      super();<a name="line.2766"></a>
+<span class="sourceLineNo">2767</span>    }<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>  void checkInitialized() throws 
PleaseHoldException, ServerNotRunningYetException,<a name="line.2770"></a>
+<span class="sourceLineNo">2771</span>      MasterNotRunningException, 
MasterStoppedException {<a name="line.2771"></a>
+<span class="sourceLineNo">2772</span>    checkServiceStarted();<a 
name="line.2772"></a>
+<span class="sourceLineNo">2773</span>    if (!isInitialized()) {<a 
name="line.2773"></a>
+<span class="sourceLineNo">2774</span>      throw new 
PleaseHoldException("Master is initializing");<a name="line.2774"></a>
 <span class="sourceLineNo">2775</span>    }<a name="line.2775"></a>
-<span class="sourceLineNo">2776</span>  }<a name="line.2776"></a>
-<span class="sourceLineNo">2777</span><a name="line.2777"></a>
-<span class="sourceLineNo">2778</span>  /**<a name="line.2778"></a>
-<span class="sourceLineNo">2779</span>   * Report whether this master is 
currently the active master or not.<a name="line.2779"></a>
-<span class="sourceLineNo">2780</span>   * If not active master, we are parked 
on ZK waiting to become active.<a name="line.2780"></a>
-<span class="sourceLineNo">2781</span>   *<a name="line.2781"></a>
-<span class="sourceLineNo">2782</span>   * This method is used for testing.<a 
name="line.2782"></a>
-<span class="sourceLineNo">2783</span>   *<a name="line.2783"></a>
-<span class="sourceLineNo">2784</span>   * @return true if active master, 
false if not.<a name="line.2784"></a>
-<span class="sourceLineNo">2785</span>   */<a name="line.2785"></a>
-<span class="sourceLineNo">2786</span>  @Override<a name="line.2786"></a>
-<span class="sourceLineNo">2787</span>  public boolean isActiveMaster() {<a 
name="line.2787"></a>
-<span class="sourceLineNo">2788</span>    return activeMaster;<a 
name="line.2788"></a>
-<span class="sourceLineNo">2789</span>  }<a name="line.2789"></a>
-<span class="sourceLineNo">2790</span><a name="line.2790"></a>
-<span class="sourceLineNo">2791</span>  /**<a name="line.2791"></a>
-<span class="sourceLineNo">2792</span>   * Report whether this master has 
completed with its initialization and is<a name="line.2792"></a>
-<span class="sourceLineNo">2793</span>   * ready.  If ready, the master is 
also the active master.  A standby master<a name="line.2793"></a>
-<span class="sourceLineNo">2794</span>   * is never ready.<a 
name="line.2794"></a>
-<span class="sourceLineNo">2795</span>   *<a name="line.2795"></a>
-<span class="sourceLineNo">2796</span>   * This method is used for testing.<a 
name="line.2796"></a>
-<span class="sourceLineNo">2797</span>   *<a name="line.2797"></a>
-<span class="sourceLineNo">2798</span>   * @return true if master is ready to 
go, false if not.<a name="line.2798"></a>
-<span class="sourceLineNo">2799</span>   */<a name="line.2799"></a>
-<span class="sourceLineNo">2800</span>  @Override<a name="line.2800"></a>
-<span class="sourceLineNo">2801</span>  public boolean isInitialized() {<a 
name="line.2801"></a>
-<span class="sourceLineNo">2802</span>    return initialized.isReady();<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>  /**<a name="line.2805"></a>
-<span class="sourceLineNo">2806</span>   * Report whether this master is in 
maintenance mode.<a name="line.2806"></a>
-<span class="sourceLineNo">2807</span>   *<a name="line.2807"></a>
-<span class="sourceLineNo">2808</span>   * @return true if master is in 
maintenanceMode<a name="line.2808"></a>
-<span class="sourceLineNo">2809</span>   */<a name="line.2809"></a>
-<span class="sourceLineNo">2810</span>  @Override<a name="line.2810"></a>
-<span class="sourceLineNo">2811</span>  public boolean isInMaintenanceMode() 
{<a name="line.2811"></a>
-<span class="sourceLineNo">2812</span>    return 
maintenanceModeTracker.isInMaintenanceMode();<a name="line.2812"></a>
-<span class="sourceLineNo">2813</span>  }<a name="line.2813"></a>
-<span class="sourceLineNo">2814</span><a name="line.2814"></a>
-<span class="sourceLineNo">2815</span>  @VisibleForTesting<a 
name="line.2815"></a>
-<span class="sourceLineNo">2816</span>  public void setInitialized(boolean 
isInitialized) {<a name="line.2816"></a>
-<span class="sourceLineNo">2817</span>    
procedureExecutor.getEnvironment().setEventReady(initialized, isInitialized);<a 
name="line.2817"></a>
-<span class="sourceLineNo">2818</span>  }<a name="line.2818"></a>
-<span class="sourceLineNo">2819</span><a name="line.2819"></a>
-<span class="sourceLineNo">2820</span>  @Override<a name="line.2820"></a>
-<span class="sourceLineNo">2821</span>  public ProcedureEvent&lt;?&gt; 
getInitializedEvent() {<a name="line.2821"></a>
-<span class="sourceLineNo">2822</span>    return initialized;<a 
name="line.2822"></a>
-<span class="sourceLineNo">2823</span>  }<a name="line.2823"></a>
-<span class="sourceLineNo">2824</span><a name="line.2824"></a>
-<span class="sourceLineNo">2825</span>  /**<a name="line.2825"></a>
-<span class="sourceLineNo">2826</span>   * ServerCrashProcessingEnabled is set 
false before completing assignMeta to prevent processing<a name="line.2826"></a>
-<span class="sourceLineNo">2827</span>   * of crashed servers.<a 
name="line.2827"></a>
-<span class="sourceLineNo">2828</span>   * @return true if assignMeta has 
completed;<a name="line.2828"></a>
-<span class="sourceLineNo">2829</span>   */<a name="line.2829"></a>
-<span class="sourceLineNo">2830</span>  @Override<a name="line.2830"></a>
-<span class="sourceLineNo">2831</span>  public boolean 
isServerCrashProcessingEnabled() {<a name="line.2831"></a>
-<span class="sourceLineNo">2832</span>    return 
serverCrashProcessingEnabled.isReady();<a name="line.2832"></a>
-<span class="sourceLineNo">2833</span>  }<a name="line.2833"></a>
-<span class="sourceLineNo">2834</span><a name="line.2834"></a>
-<span class="sourceLineNo">2835</span>  @VisibleForTesting<a 
name="line.2835"></a>
-<span class="sourceLineNo">2836</span>  public void 
setServerCrashProcessingEnabled(final boolean b) {<a name="line.2836"></a>
-<span class="sourceLineNo">2837</span>    
procedureExecutor.getEnvironment().setEventReady(serverCrashProcessingEnabled, 
b);<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>  public ProcedureEvent&lt;?&gt; 
getServerCrashProcessingEnabledEvent() {<a name="line.2840"></a>
-<span class="sourceLineNo">2841</span>    return 
serverCrashProcessingEnabled;<a name="line.2841"></a>
-<span class="sourceLineNo">2842</span>  }<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>   * Compute the average load across all 
region servers.<a name="line.2845"></a>
-<span class="sourceLineNo">2846</span>   * Currently, this uses a very naive 
computation - just uses the number of<a name="line.2846"></a>
-<span class="sourceLineNo">2847</span>   * regions being served, ignoring 
stats about number of requests.<a name="line.2847"></a>
-<span class="sourceLineNo">2848</span>   * @return the average load<a 
name="line.2848"></a>
-<span class="sourceLineNo">2849</span>   */<a name="line.2849"></a>
-<span class="sourceLineNo">2850</span>  public double getAverageLoad() {<a 
name="line.2850"></a>
-<span class="sourceLineNo">2851</span>    if (this.assignmentManager == null) 
{<a name="line.2851"></a>
-<span class="sourceLineNo">2852</span>      return 0;<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>    RegionStates regionStates = 
this.assignmentManager.getRegionStates();<a name="line.2855"></a>
-<span class="sourceLineNo">2856</span>    if (regionStates == null) {<a 
name="line.2856"></a>
-<span class="sourceLineNo">2857</span>      return 0;<a name="line.2857"></a>
-<span class="sourceLineNo">2858</span>    }<a name="line.2858"></a>
-<span class="sourceLineNo">2859</span>    return 
regionStates.getAverageLoad();<a name="line.2859"></a>
-<span class="sourceLineNo">2860</span>  }<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>   * @return the count of region split 
plans executed<a name="line.2863"></a>
-<span class="sourceLineNo">2864</span>   */<a name="line.2864"></a>
-<span class="sourceLineNo">2865</span>  public long getSplitPlanCount() {<a 
name="line.2865"></a>
-<span class="sourceLineNo">2866</span>    return splitPlanCount;<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>  /*<a name="line.2869"></a>
-<span class="sourceLineNo">2870</span>   * @return the count of region merge 
plans executed<a name="line.2870"></a>
-<span class="sourceLineNo">2871</span>   */<a name="line.2871"></a>
-<span class="sourceLineNo">2872</span>  public long getMergePlanCount() {<a 
name="line.2872"></a>
-<span class="sourceLineNo">2873</span>    return mergePlanCount;<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>  @Override<a name="line.2876"></a>
-<span class="sourceLineNo">2877</span>  public boolean registerService(Service 
instance) {<a name="line.2877"></a>
-<span class="sourceLineNo">2878</span>    /*<a name="line.2878"></a>
-<span class="sourceLineNo">2879</span>     * No stacking of instances is 
allowed for a single service name<a name="line.2879"></a>
-<span class="sourceLineNo">2880</span>     */<a name="line.2880"></a>
-<span class="sourceLineNo">2881</span>    Descriptors.ServiceDescriptor 
serviceDesc = instance.getDescriptorForType();<a name="line.2881"></a>
-<span class="sourceLineNo">2882</span>    String serviceName = 
CoprocessorRpcUtils.getServiceName(serviceDesc);<a name="line.2882"></a>
-<span class="sourceLineNo">2883</span>    if 
(coprocessorServiceHandlers.containsKey(serviceName)) {<a name="line.2883"></a>
-<span class="sourceLineNo">2884</span>      LOG.error("Coprocessor service 
"+serviceName+<a name="line.2884"></a>
-<span class="sourceLineNo">2885</span>          " already registered, 
rejecting request from "+instance<a name="line.2885"></a>
-<span class="sourceLineNo">2886</span>      );<a name="line.2886"></a>
-<span class="sourceLineNo">2887</span>      return fa

<TRUNCATED>

Reply via email to