code: private InetAddress getTaskManagerAddress(InetSocketAddress jobManagerAddress) throws IOException {
  		AddressDetectionState strategy = AddressDetectionState.ADDRESS;
  
  		while (true) {
  			Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces();
  			while (e.hasMoreElements()) {
  				NetworkInterface n = e.nextElement();
  				Enumeration<InetAddress> ee = n.getInetAddresses();
  				while (ee.hasMoreElements()) {
  					InetAddress i = ee.nextElement();
  					switch (strategy) {
  					case ADDRESS:
  						if (hasCommonPrefix(jobManagerAddress.getAddress().getAddress(), i.getAddress())) {
  							if (tryToConnect(i, jobManagerAddress, strategy.getTimeout())) {
  								LOG.info("Determined " + i + " as the TaskTracker's own IP address");
  								return i;
  							}
  						}
  						break;
  					case FAST_CONNECT:
  					case SLOW_CONNECT:
  						boolean correct = tryToConnect(i, jobManagerAddress, strategy.getTimeout());
  						if (correct) {
  							LOG.info("Determined " + i + " as the TaskTracker's own IP address");
  							return i;
  						}
  						break;
  					default:
  						throw new RuntimeException("Unkown address detection strategy: " + strategy);
  					}
  				}
  			}
  			// state control
  			switch (strategy) {
  			case ADDRESS:
  				strategy = AddressDetectionState.FAST_CONNECT;
  				break;
  			case FAST_CONNECT:
  				strategy = AddressDetectionState.SLOW_CONNECT;
  				break;
  			case SLOW_CONNECT:
  				throw new RuntimeException("The TaskManager failed to detect its own IP address");
  			}
  			if (LOG.isDebugEnabled()) {
  				LOG.debug("Defaulting to detection strategy " + strategy);
  			}
  		}
  	}
docs: Find out the TaskManager's own IP address.