Package org.apache.hadoop.mapred.CoronaSessionInfo

Examples of org.apache.hadoop.mapred.CoronaSessionInfo.InetSocketAddressWritable


    InterCoronaJobTrackerProtocol secondaryClient = RPC.waitForProxy(
        InterCoronaJobTrackerProtocol.class,
        InterCoronaJobTrackerProtocol.versionID, secondaryTracker, conf,
        SECONDARY_TRACKER_CONNECT_TIMEOUT);
    // Obtain new address
    InetSocketAddressWritable oldAddrWritable = new InetSocketAddressWritable(
        oldAddress);
    InetSocketAddressWritable newAddress = null;
    int retryNum = 0;
    do {
      newAddress = secondaryClient.getNewJobTrackerAddress(oldAddrWritable);
      try {
        waitRetry();
      } catch (InterruptedException e) {
        LOG.error("Fallback interrupted, taking next retry.");
      }
      ++retryNum;
    } while (newAddress == null && predRetry(retryNum));

    if (newAddress == null || newAddress.getAddress() == null)
      throw new IOException("Failed to obtain new job tracker address.");

    RPC.stopProxy(secondaryClient);
    try {
      connect(newAddress.getAddress());
      LOG.info("Fallback process successful: " + newAddress.getAddress());
    } catch (IOException e) {
      LOG.error("Fallback connect to " + newAddress.getAddress() + " failed for ", e);
      reconnectToNewJobTracker(++connectNum);
    }
  }
View Full Code Here


        // Not restarted yet
        return null;
      } else {
        LOG.info("Serving new job tracker address request with " + seenAddr
            + " old " + failedTracker.getAddress());
        return new InetSocketAddressWritable(seenAddr);
      }
    } else {
      // Currently restarting
      return null;
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mapred.CoronaSessionInfo.InetSocketAddressWritable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.