Review Board 1.7.22


HBASE-4820 Distributed log splitting coding enhancement to make it easier to understand, no semantics change

Review Request #2895 - Created Nov. 21, 2011 and submitted

Jimmy Xiang
git://git.apache.org/hbase.git
HBASE-4820
Reviewers
hbase
jonathan, tlipcon
hbase-git
Distributed log splitting coding enhancement to make it easier to understand, no semantics change.
It is some issue raised during the code review in back porting this feature to CDH.
Ran unit tests. Non-flaky tests are green. Two client tests didn't pass, which are not related to this change.
src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
Diff Revision 1 Diff Revision 2
[20] 160 lines
[+20] [+] public class AssignmentManager extends ZooKeeperListener {
161

    
   
161

   
162
  private final ExecutorService executorService;
162
  private final ExecutorService executorService;
163

    
   
163

   
164
  //Thread pool executor service for timeout monitor
164
  //Thread pool executor service for timeout monitor
165
  private java.util.concurrent.ExecutorService threadPoolExecutorService;
165
  private java.util.concurrent.ExecutorService threadPoolExecutorService;
166
  
166

   
167
  private List<EventType> ignoreStatesRSOffline = Arrays.asList(new EventType[]{
167
  private List<EventType> ignoreStatesRSOffline = Arrays.asList(new EventType[]{
168
      EventType.RS_ZK_REGION_FAILED_OPEN, EventType.RS_ZK_REGION_CLOSED });
168
      EventType.RS_ZK_REGION_FAILED_OPEN, EventType.RS_ZK_REGION_CLOSED });
169
  

   
170

    
   
169

   

    
   
170

   
171
  /**
171
  /**
172
   * Constructs a new assignment manager.
172
   * Constructs a new assignment manager.
173
   *
173
   *
174
   * @param master
174
   * @param master
175
   * @param serverManager
175
   * @param serverManager
176
   * @param catalogTracker
176
   * @param catalogTracker
177
   * @param service
177
   * @param service
178
   * @throws KeeperException
178
   * @throws KeeperException
179
   * @throws IOException 
179
   * @throws IOException
180
   */
180
   */
181
  public AssignmentManager(Server master, ServerManager serverManager,
181
  public AssignmentManager(Server master, ServerManager serverManager,
182
      CatalogTracker catalogTracker, final ExecutorService service)
182
      CatalogTracker catalogTracker, final ExecutorService service)
183
  throws KeeperException, IOException {
183
  throws KeeperException, IOException {
184
    super(master.getZooKeeper());
184
    super(master.getZooKeeper());
[+20] [20] 84 lines
[+20] [+] public void setRegionsToReopen(List <HRegionInfo> regions) {
269
   * Used by the client to identify if all regions have the schema updates
269
   * Used by the client to identify if all regions have the schema updates
270
   *
270
   *
271
   * @param tableName
271
   * @param tableName
272
   * @return Pair indicating the status of the alter command
272
   * @return Pair indicating the status of the alter command
273
   * @throws IOException
273
   * @throws IOException
274
   * @throws InterruptedException 
274
   * @throws InterruptedException
275
   */
275
   */
276
  public Pair<Integer, Integer> getReopenStatus(byte[] tableName)
276
  public Pair<Integer, Integer> getReopenStatus(byte[] tableName)
277
  throws IOException, InterruptedException {
277
  throws IOException, InterruptedException {
278
    List <HRegionInfo> hris =
278
    List <HRegionInfo> hris =
279
      MetaReader.getTableRegions(this.master.getCatalogTracker(), tableName);
279
      MetaReader.getTableRegions(this.master.getCatalogTracker(), tableName);
[+20] [20] 60 lines
[+20] public void setRegionsToReopen(List <HRegionInfo> regions) {
340
    processDeadServersAndRegionsInTransition(null);
340
    processDeadServersAndRegionsInTransition(null);
341
  }
341
  }
342

    
   
342

   
343
  /**
343
  /**
344
   * Process all regions that are in transition in zookeeper and also
344
   * Process all regions that are in transition in zookeeper and also
345
   * processes the list of dead servers by scanning the META. 
345
   * processes the list of dead servers by scanning the META.
346
   * Used by master joining an cluster.
346
   * Used by master joining an cluster.
347
   * @param deadServers
347
   * @param deadServers
348
   *          Map of dead servers and their regions. Can be null.
348
   *          Map of dead servers and their regions. Can be null.
349
   * @throws KeeperException
349
   * @throws KeeperException
350
   * @throws IOException
350
   * @throws IOException
[+20] [20] 67 lines
[+20] public void setRegionsToReopen(List <HRegionInfo> regions) {
418
  /**
418
  /**
419
   * Process failover of new master for region <code>encodedRegionName</code>
419
   * Process failover of new master for region <code>encodedRegionName</code>
420
   * up in zookeeper.
420
   * up in zookeeper.
421
   * @param encodedRegionName Region to process failover for.
421
   * @param encodedRegionName Region to process failover for.
422
   * @param regionInfo If null we'll go get it from meta table.
422
   * @param regionInfo If null we'll go get it from meta table.
423
   * @param deadServers Can be null 
423
   * @param deadServers Can be null
424
   * @return True if we processed <code>regionInfo</code> as a RIT.
424
   * @return True if we processed <code>regionInfo</code> as a RIT.
425
   * @throws KeeperException
425
   * @throws KeeperException
426
   * @throws IOException
426
   * @throws IOException
427
   */
427
   */
428
  boolean processRegionInTransition(final String encodedRegionName,
428
  boolean processRegionInTransition(final String encodedRegionName,
[+20] [20] 284 lines
[+20] [+] private void handleRegion(final RegionTransitionData data, int expectedVersion) {
713
              data.getStamp(), data.getOrigin());
713
              data.getStamp(), data.getOrigin());
714
        removeClosedRegion(regionState.getRegion());
714
        removeClosedRegion(regionState.getRegion());
715
          this.executorService.submit(new ClosedRegionHandler(master,
715
          this.executorService.submit(new ClosedRegionHandler(master,
716
            this, regionState.getRegion()));
716
            this, regionState.getRegion()));
717
          break;
717
          break;
718
          
718

   
719
        case RS_ZK_REGION_FAILED_OPEN:
719
        case RS_ZK_REGION_FAILED_OPEN:
720
          if (regionState == null ||
720
          if (regionState == null ||
721
              (!regionState.isPendingOpen() && !regionState.isOpening())) {
721
              (!regionState.isPendingOpen() && !regionState.isOpening())) {
722
            LOG.warn("Received FAILED_OPEN for region " + prettyPrintedRegionName +
722
            LOG.warn("Received FAILED_OPEN for region " + prettyPrintedRegionName +
723
                " from server " + data.getOrigin() + " but region was in " +
723
                " from server " + data.getOrigin() + " but region was in " +
[+20] [20] 296 lines
[+20] [+] public void regionOnline(HRegionInfo regionInfo, ServerName sn) {
1020
    synchronized (this.regions) {
1020
    synchronized (this.regions) {
1021
      // Add check
1021
      // Add check
1022
      ServerName oldSn = this.regions.get(regionInfo);
1022
      ServerName oldSn = this.regions.get(regionInfo);
1023
      if (oldSn != null) LOG.warn("Overwriting " + regionInfo.getEncodedName() +
1023
      if (oldSn != null) LOG.warn("Overwriting " + regionInfo.getEncodedName() +
1024
        " on " + oldSn + " with " + sn);
1024
        " on " + oldSn + " with " + sn);
1025
      
1025

   
1026
      if (isServerOnline(sn)) {
1026
      if (isServerOnline(sn)) {
1027
        this.regions.put(regionInfo, sn);
1027
        this.regions.put(regionInfo, sn);
1028
        addToServers(sn, regionInfo);
1028
        addToServers(sn, regionInfo);
1029
        this.regions.notifyAll();
1029
        this.regions.notifyAll();
1030
      } else {
1030
      } else {
1031
        LOG.info("The server is not in online servers, ServerName=" + 
1031
        LOG.info("The server is not in online servers, ServerName=" +
1032
          sn.getServerName() + ", region=" + regionInfo.getEncodedName());
1032
          sn.getServerName() + ", region=" + regionInfo.getEncodedName());
1033
      }
1033
      }
1034
    }
1034
    }
1035
    // Remove plan if one.
1035
    // Remove plan if one.
1036
    clearRegionPlan(regionInfo);
1036
    clearRegionPlan(regionInfo);
[+20] [20] 126 lines
[+20] [+] public void assign(HRegionInfo region, boolean setOfflineInZK,
1163
   * @param hijack
1163
   * @param hijack
1164
   *          - true new assignment is needed, false otherwise
1164
   *          - true new assignment is needed, false otherwise
1165
   */
1165
   */
1166
  public void assign(HRegionInfo region, boolean setOfflineInZK,
1166
  public void assign(HRegionInfo region, boolean setOfflineInZK,
1167
      boolean forceNewPlan, boolean hijack) {
1167
      boolean forceNewPlan, boolean hijack) {
1168
    //If hijack is true do not call disableRegionIfInRIT as 
1168
    //If hijack is true do not call disableRegionIfInRIT as
1169
    // we have not yet moved the znode to OFFLINE state.
1169
    // we have not yet moved the znode to OFFLINE state.
1170
    if (!hijack && isDisabledorDisablingRegionInRIT(region)) {
1170
    if (!hijack && isDisabledorDisablingRegionInRIT(region)) {
1171
      return;
1171
      return;
1172
    }
1172
    }
1173
    if (this.serverManager.isClusterShutdown()) {
1173
    if (this.serverManager.isClusterShutdown()) {
[+20] [20] 233 lines
[+20] [+] private void assign(final HRegionInfo region, final RegionState state,
1407
          if (isDisabledorDisablingRegionInRIT(region)) {
1407
          if (isDisabledorDisablingRegionInRIT(region)) {
1408
            return;
1408
            return;
1409
          }
1409
          }
1410
        }
1410
        }
1411
      }
1411
      }
1412
      
1412

   
1413
      if (setOfflineInZK && versionOfOfflineNode == -1) {
1413
      if (setOfflineInZK && versionOfOfflineNode == -1) {
1414
        return;
1414
        return;
1415
      }
1415
      }
1416
      
1416

   
1417
      if (this.master.isStopped()) {
1417
      if (this.master.isStopped()) {
1418
        LOG.debug("Server stopped; skipping assign of " + state);
1418
        LOG.debug("Server stopped; skipping assign of " + state);
1419
        return;
1419
        return;
1420
      }
1420
      }
1421
      RegionPlan plan = getRegionPlan(state, forceNewPlan);
1421
      RegionPlan plan = getRegionPlan(state, forceNewPlan);
[+20] [20] 90 lines
[+20] [+] private boolean isDisabledorDisablingRegionInRIT(final HRegionInfo region) {
1512
    return false;
1512
    return false;
1513
  }
1513
  }
1514

    
   
1514

   
1515
  /**
1515
  /**
1516
   * Set region as OFFLINED up in zookeeper
1516
   * Set region as OFFLINED up in zookeeper
1517
   * 
1517
   *
1518
   * @param state
1518
   * @param state
1519
   * @param hijack
1519
   * @param hijack
1520
   *          - true if needs to be hijacked and reassigned, false otherwise.
1520
   *          - true if needs to be hijacked and reassigned, false otherwise.
1521
   * @return the version of the offline node if setting of the OFFLINE node was
1521
   * @return the version of the offline node if setting of the OFFLINE node was
1522
   *         successful, -1 otherwise.
1522
   *         successful, -1 otherwise.
1523
   */
1523
   */
1524
  int setOfflineInZooKeeper(final RegionState state,
1524
  int setOfflineInZooKeeper(final RegionState state,
1525
      boolean hijack) {
1525
      boolean hijack) {
1526
    // In case of reassignment the current state in memory need not be
1526
    // In case of reassignment the current state in memory need not be
1527
    // OFFLINE. 
1527
    // OFFLINE.
1528
    if (!hijack && !state.isClosed() && !state.isOffline()) {
1528
    if (!hijack && !state.isClosed() && !state.isOffline()) {
1529
      String msg = "Unexpected state trying to OFFLINE; " + state;
1529
      String msg = "Unexpected region state: " + state + ", cannot transit it to OFFLINE.";
1530
      this.master.abort(msg, new IllegalStateException(msg));
1530
      this.master.abort(msg, new IllegalStateException(msg));
1531
      return -1;
1531
      return -1;
1532
    }
1532
    }
1533
    boolean allowZNodeCreation = false;
1533
    boolean allowZNodeCreation = false;
1534
    // Under reassignment if the current state is PENDING_OPEN
1534
    // Under reassignment if the current state is PENDING_OPEN
1535
    // or OPENING then refresh the in-memory state to PENDING_OPEN. This is
1535
    // or OPENING then refresh the in-memory state to PENDING_OPEN. This is
1536
    // important because if the region was in 
1536
    // important because if the region was in
1537
    // RS_OPENING state for a long time the master will try to force the znode
1537
    // RS_OPENING state for a long time the master will try to force the znode
1538
    // to OFFLINE state meanwhile the RS could have opened the corresponding
1538
    // to OFFLINE state meanwhile the RS could have opened the corresponding
1539
    // region and the state in znode will be RS_ZK_REGION_OPENED.
1539
    // region and the state in znode will be RS_ZK_REGION_OPENED.
1540
    // For all other cases we can change the in-memory state to OFFLINE.
1540
    // For all other cases we can change the in-memory state to OFFLINE.
1541
    if (hijack &&
1541
    if (hijack &&
1542
        (state.getState().equals(RegionState.State.PENDING_OPEN) || 
1542
        (state.getState().equals(RegionState.State.PENDING_OPEN) ||
1543
            state.getState().equals(RegionState.State.OPENING))) {
1543
            state.getState().equals(RegionState.State.OPENING))) {
1544
      state.update(RegionState.State.PENDING_OPEN);
1544
      state.update(RegionState.State.PENDING_OPEN);
1545
      allowZNodeCreation = false;
1545
      allowZNodeCreation = false;
1546
    } else {
1546
    } else {
1547
      state.update(RegionState.State.OFFLINE);
1547
      state.update(RegionState.State.OFFLINE);
1548
      allowZNodeCreation = true;
1548
      allowZNodeCreation = true;
1549
    }
1549
    }
1550
    int versionOfOfflineNode = -1;
1550
    int versionOfOfflineNode = -1;
1551
    try {
1551
    try {
1552
      // get the version after setting the znode to OFFLINE
1552
      // get the version after setting the znode to OFFLINE
1553
      versionOfOfflineNode = ZKAssign.createOrForceNodeOffline(master.getZooKeeper(), 
1553
      versionOfOfflineNode = ZKAssign.createOrForceNodeOffline(master.getZooKeeper(),
1554
          state.getRegion(), this.master.getServerName(),
1554
          state.getRegion(), this.master.getServerName(),
1555
          hijack, allowZNodeCreation);
1555
          hijack, allowZNodeCreation);
1556
      if (versionOfOfflineNode == -1) {
1556
      if (versionOfOfflineNode == -1) {
1557
        LOG.warn("Attempted to create/force node into OFFLINE state before "
1557
        LOG.warn("Attempted to create/force node into OFFLINE state before "
1558
            + "completing assignment but failed to do so for " + state);
1558
            + "completing assignment but failed to do so for " + state);
[+20] [20] 298 lines
[+20] [+] public void assignMeta() {
1857
    assign(HRegionInfo.FIRST_META_REGIONINFO, true);
1857
    assign(HRegionInfo.FIRST_META_REGIONINFO, true);
1858
  }
1858
  }
1859

    
   
1859

   
1860
  /**
1860
  /**
1861
   * Assigns all user regions to online servers. Use round-robin assignment.
1861
   * Assigns all user regions to online servers. Use round-robin assignment.
1862
   * 
1862
   *
1863
   * @param regions
1863
   * @param regions
1864
   * @throws IOException
1864
   * @throws IOException
1865
   * @throws InterruptedException
1865
   * @throws InterruptedException
1866
   */
1866
   */
1867
  public void assignUserRegionsToOnlineServers(List<HRegionInfo> regions)
1867
  public void assignUserRegionsToOnlineServers(List<HRegionInfo> regions)
[+20] [20] 314 lines
[+20] [+] private void addTheTablesInPartialState(Set<String> disablingTables,
2182
  }
2182
  }
2183

    
   
2183

   
2184
  /**
2184
  /**
2185
   * Recover the tables that were not fully moved to DISABLED state. These
2185
   * Recover the tables that were not fully moved to DISABLED state. These
2186
   * tables are in DISABLING state when the master restarted/switched.
2186
   * tables are in DISABLING state when the master restarted/switched.
2187
   * 
2187
   *
2188
   * @param disablingTables
2188
   * @param disablingTables
2189
   * @return
2189
   * @return
2190
   * @throws KeeperException
2190
   * @throws KeeperException
2191
   * @throws TableNotFoundException
2191
   * @throws TableNotFoundException
2192
   * @throws IOException
2192
   * @throws IOException
[+20] [20] 19 lines
[+20] [+] private boolean recoverTableInDisablingState(Set<String> disablingTables)
2212
  }
2212
  }
2213

    
   
2213

   
2214
  /**
2214
  /**
2215
   * Recover the tables that are not fully moved to ENABLED state. These tables
2215
   * Recover the tables that are not fully moved to ENABLED state. These tables
2216
   * are in ENABLING state when the master restarted/switched
2216
   * are in ENABLING state when the master restarted/switched
2217
   * 
2217
   *
2218
   * @param enablingTables
2218
   * @param enablingTables
2219
   * @param isWatcherCreated
2219
   * @param isWatcherCreated
2220
   * @throws KeeperException
2220
   * @throws KeeperException
2221
   * @throws TableNotFoundException
2221
   * @throws TableNotFoundException
2222
   * @throws IOException
2222
   * @throws IOException
[+20] [20] 36 lines
[+20] [+] private boolean checkIfRegionBelongsToDisabling(HRegionInfo regionInfo) {
2259

    
   
2259

   
2260
  /**
2260
  /**
2261
   * Processes list of dead servers from result of META scan and regions in RIT
2261
   * Processes list of dead servers from result of META scan and regions in RIT
2262
   * <p>
2262
   * <p>
2263
   * This is used for failover to recover the lost regions that belonged to
2263
   * This is used for failover to recover the lost regions that belonged to
2264
   * RegionServers which failed while there was no active master or regions 
2264
   * RegionServers which failed while there was no active master or regions
2265
   * that were in RIT.
2265
   * that were in RIT.
2266
   * <p>
2266
   * <p>
2267
   * 
2267
   *
2268
   * @param deadServers
2268
   * @param deadServers
2269
   *          The list of dead servers which failed while there was no active
2269
   *          The list of dead servers which failed while there was no active
2270
   *          master. Can be null.
2270
   *          master. Can be null.
2271
   * @param nodes
2271
   * @param nodes
2272
   *          The regions in RIT
2272
   *          The regions in RIT
2273
   * @throws IOException
2273
   * @throws IOException
2274
   * @throws KeeperException
2274
   * @throws KeeperException
2275
   */
2275
   */
2276
  private void processDeadServersAndRecoverLostRegions(
2276
  private void processDeadServersAndRecoverLostRegions(
2277
      Map<ServerName, List<Pair<HRegionInfo, Result>>> deadServers,
2277
      Map<ServerName, List<Pair<HRegionInfo, Result>>> deadServers,
2278
      List<String> nodes) throws IOException, KeeperException {
2278
      List<String> nodes) throws IOException, KeeperException {
2279
    if (null != deadServers) {
2279
    if (null != deadServers) {
2280
      for (Map.Entry<ServerName, List<Pair<HRegionInfo, Result>>> deadServer : 
2280
      for (Map.Entry<ServerName, List<Pair<HRegionInfo, Result>>> deadServer :
2281
        deadServers.entrySet()) {
2281
        deadServers.entrySet()) {
2282
        List<Pair<HRegionInfo, Result>> regions = deadServer.getValue();
2282
        List<Pair<HRegionInfo, Result>> regions = deadServer.getValue();
2283
        for (Pair<HRegionInfo, Result> region : regions) {
2283
        for (Pair<HRegionInfo, Result> region : regions) {
2284
          HRegionInfo regionInfo = region.getFirst();
2284
          HRegionInfo regionInfo = region.getFirst();
2285
          Result result = region.getSecond();
2285
          Result result = region.getSecond();
[+20] [20] 5 lines
[+20] private void processDeadServersAndRecoverLostRegions(
2291

    
   
2291

   
2292
            // If zk node of this region has been updated by a live server,
2292
            // If zk node of this region has been updated by a live server,
2293
            // we consider that this region is being handled.
2293
            // we consider that this region is being handled.
2294
            // So we should skip it and process it in
2294
            // So we should skip it and process it in
2295
            // processRegionsInTransition.
2295
            // processRegionsInTransition.
2296
            if (data != null && data.getOrigin() != null && 
2296
            if (data != null && data.getOrigin() != null &&
2297
                serverManager.isServerOnline(data.getOrigin())) {
2297
                serverManager.isServerOnline(data.getOrigin())) {
2298
              LOG.info("The region " + regionInfo.getEncodedName()
2298
              LOG.info("The region " + regionInfo.getEncodedName()
2299
                  + "is being handled on " + data.getOrigin());
2299
                  + "is being handled on " + data.getOrigin());
2300
              continue;
2300
              continue;
2301
            }
2301
            }
[+20] [20] 225 lines
[+20] [+] private void actOnTimeOut(RegionState regionState) {
2527
            + "long, running forced unassign again on region="
2527
            + "long, running forced unassign again on region="
2528
            + regionInfo.getRegionNameAsString());
2528
            + regionInfo.getRegionNameAsString());
2529
        try {
2529
        try {
2530
          // If the server got the RPC, it will transition the node
2530
          // If the server got the RPC, it will transition the node
2531
          // to CLOSING, so only do something here if no node exists
2531
          // to CLOSING, so only do something here if no node exists
2532
          if (!ZKUtil.watchAndCheckExists(watcher, 
2532
          if (!ZKUtil.watchAndCheckExists(watcher,
2533
              ZKAssign.getNodeName(watcher, regionInfo.getEncodedName()))) {
2533
              ZKAssign.getNodeName(watcher, regionInfo.getEncodedName()))) {
2534
            // Queue running of an unassign -- do actual unassign
2534
            // Queue running of an unassign -- do actual unassign
2535
            // outside of the regionsInTransition lock.
2535
            // outside of the regionsInTransition lock.
2536
            invokeUnassign(regionInfo);
2536
            invokeUnassign(regionInfo);
2537
          }
2537
          }
[+20] [20] 10 lines
[+20] private void actOnTimeOut(RegionState regionState) {
2548
          "expire, doing nothing");
2548
          "expire, doing nothing");
2549
        break;
2549
        break;
2550
      }
2550
      }
2551
    }
2551
    }
2552
  }
2552
  }
2553
  
2553

   
2554
  private void processOpeningState(HRegionInfo regionInfo) {
2554
  private void processOpeningState(HRegionInfo regionInfo) {
2555
    LOG.info("Region has been OPENING for too " + "long, reassigning region="
2555
    LOG.info("Region has been OPENING for too " + "long, reassigning region="
2556
        + regionInfo.getRegionNameAsString());
2556
        + regionInfo.getRegionNameAsString());
2557
    // Should have a ZK node in OPENING state
2557
    // Should have a ZK node in OPENING state
2558
    try {
2558
    try {
[+20] [20] 315 lines
[+20] [+] public boolean isOffline() {
2874
    }
2874
    }
2875

    
   
2875

   
2876
    public boolean isSplitting() {
2876
    public boolean isSplitting() {
2877
      return state == State.SPLITTING;
2877
      return state == State.SPLITTING;
2878
    }
2878
    }
2879
 
2879

   
2880
    public boolean isSplit() {
2880
    public boolean isSplit() {
2881
      return state == State.SPLIT;
2881
      return state == State.SPLIT;
2882
    }
2882
    }
2883

    
   
2883

   
2884
    @Override
2884
    @Override
2885
    public String toString() {
2885
    public String toString() {
2886
      return region.getRegionNameAsString()
2886
      return region.getRegionNameAsString()
2887
        + " state=" + state
2887
        + " state=" + state
2888
        + ", ts=" + stamp
2888
        + ", ts=" + stamp
2889
        + ", server=" + serverName;
2889
        + ", server=" + serverName;
2890
    }
2890
    }
2891

    
   
2891

   
2892
    /**
2892
    /**
2893
     * A slower (but more easy-to-read) stringification 
2893
     * A slower (but more easy-to-read) stringification
2894
     */
2894
     */
2895
    public String toDescriptiveString() {
2895
    public String toDescriptiveString() {
2896
      long lstamp = stamp.get();
2896
      long lstamp = stamp.get();
2897
      long relTime = System.currentTimeMillis() - lstamp;
2897
      long relTime = System.currentTimeMillis() - lstamp;
2898
      
2898

   
2899
      return region.getRegionNameAsString()
2899
      return region.getRegionNameAsString()
2900
        + " state=" + state
2900
        + " state=" + state
2901
        + ", ts=" + new Date(lstamp) + " (" + (relTime/1000) + "s ago)"
2901
        + ", ts=" + new Date(lstamp) + " (" + (relTime/1000) + "s ago)"
2902
        + ", server=" + serverName;
2902
        + ", server=" + serverName;
2903
    }
2903
    }
[+20] [20] 15 lines
[+20] [+] public void write(DataOutput out) throws IOException {
2919
  }
2919
  }
2920

    
   
2920

   
2921
  public void stop() {
2921
  public void stop() {
2922
    this.timeoutMonitor.interrupt();
2922
    this.timeoutMonitor.interrupt();
2923
  }
2923
  }
2924
  
2924

   
2925
  /**
2925
  /**
2926
   * Check whether the RegionServer is online.
2926
   * Check whether the RegionServer is online.
2927
   */
2927
   */
2928
  public boolean isServerOnline(ServerName serverName) {
2928
  public boolean isServerOnline(ServerName serverName) {
2929
    return this.serverManager.isServerOnline(serverName);
2929
    return this.serverManager.isServerOnline(serverName);
[+20] [20] 10 lines
src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
Diff Revision 1 Diff Revision 2
 
src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java
Diff Revision 1 Diff Revision 2
 
src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
Diff Revision 1 Diff Revision 2
 
  1. src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java: Loading...
  2. src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java: Loading...
  3. src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java: Loading...
  4. src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java: Loading...