public LeaderConnectionInfo(String address, UUID leaderSessionID) throws FlinkException { this.address = address; this.leaderSessionID = leaderSessionID; final Address akkaAddress; // this only works as long as the address is Akka based try { akkaAddress = AkkaUtils.getAddressFromAkkaURL(address); } catch (MalformedURLException e) { throw new FlinkException("Could not extract the hostname from the given address \'" + address + "\'.", e); } if (akkaAddress.host().isDefined()) { hostname = akkaAddress.host().get(); } else { hostname = "localhost"; } if (akkaAddress.port().isDefined()) { port = (int) akkaAddress.port().get(); } else { port = -1; } }
public LeaderConnectionInfo(String address, UUID leaderSessionID) throws FlinkException { this.address = address; this.leaderSessionID = leaderSessionID; final Address akkaAddress; // this only works as long as the address is Akka based try { akkaAddress = AkkaUtils.getAddressFromAkkaURL(address); } catch (MalformedURLException e) { throw new FlinkException("Could not extract the hostname from the given address \'" + address + "\'.", e); } if (akkaAddress.host().isDefined()) { hostname = akkaAddress.host().get(); } else { hostname = "localhost"; } if (akkaAddress.port().isDefined()) { port = (int) akkaAddress.port().get(); } else { port = -1; } }
public LeaderConnectionInfo(String address, UUID leaderSessionID) throws FlinkException { this.address = address; this.leaderSessionID = leaderSessionID; final Address akkaAddress; // this only works as long as the address is Akka based try { akkaAddress = AkkaUtils.getAddressFromAkkaURL(address); } catch (MalformedURLException e) { throw new FlinkException("Could not extract the hostname from the given address \'" + address + "\'.", e); } if (akkaAddress.host().isDefined()) { hostname = akkaAddress.host().get(); } else { hostname = "localhost"; } if (akkaAddress.port().isDefined()) { port = (int) akkaAddress.port().get(); } else { port = -1; } }