public Observable getDriverHost()

in src/main/java/com/microsoft/azure/spark/tools/job/YarnContainerLogFetcher.java [250:275]


    public Observable<String> getDriverHost() {
        return this.getYarnApp().map(fetcher -> {
            final App yarnApp = this.lastAppRawResponse;

            if (yarnApp == null || yarnApp.isFinished()) {
                throw propagate(new UnknownServiceException(
                        "The Livy job " + this.getApplicationId() + " on yarn is not running."));
            }

            String driverHttpAddress = yarnApp.getAmHostHttpAddress();

            /*
             * The sample here is:
             *     host.domain.com:8900
             *       or
             *     10.0.0.15:30060
             */
            String driverHost = this.parseAmHostHttpAddressHost(driverHttpAddress);
            if (driverHost == null) {
                throw propagate(new UnknownServiceException(
                        "Bad amHostHttpAddress got from /yarnui/ws/v1/cluster/apps/" + this.getApplicationId()));
            }

            return driverHost;
        });
    }