예제 #1
0
        public DriverInformation GetDriverInformation()
        {
            if (string.IsNullOrWhiteSpace(_applicationId))
            {
                throw new ApplicationException("Could not fetch the application ID from YARN's container environment variables.");
            }

            var yarnRMWebAppEndpoints = _yarnConfiguration.GetYarnRMWebappEndpoints();

            foreach (var yarnRMWebAppEndpoint in yarnRMWebAppEndpoints)
            {
                try
                {
                    var queryUri = new Uri(
                        yarnRMWebAppEndpoint,
                        "proxy/" + _applicationId + "/" + Constants.HttpReefUriSpecification + Constants.HttpDriverUriTarget);
                    return(DriverInformation.GetDriverInformationFromHttp(queryUri));
                }
                catch (Exception ex)
                {
                    Utilities.Diagnostics.Exceptions.Caught(
                        ex,
                        Level.Info,
                        "Unable to reach RM at " + yarnRMWebAppEndpoint,
                        Logger);
                }
            }

            throw new ApplicationException("Unable to get Driver Information.");
        }
예제 #2
0
        public DriverInformation GetDriverInformation()
        {
            // e.g., http://headnodehost:9014/proxy/application_1407519727821_0012/reef/v1/driver
            Uri queryUri = new Uri(
                string.Concat(
                    Constants.HDInsightClusterHttpEndpointBaseUri,
                    _applicationId + "/",
                    Constants.HttpReefUriSpecification,
                    Constants.HttpDriverUriTarget));

            return(DriverInformation.GetDriverInformationFromHttp(queryUri));
        }
        public DriverInformation GetDriverInformation()
        {
            // e.g., http://yingdac1:8088/proxy/application_1407519727821_0012/reef/v1/driver
            string oneBoxHost = string.Format(CultureInfo.InvariantCulture, "http://{0}:8088/proxy/", Environment.MachineName);
            Uri    queryUri   = new Uri(
                string.Concat(
                    oneBoxHost,
                    _applicationId + '/',
                    Constants.HttpReefUriSpecification,
                    Constants.HttpDriverUriTarget));

            return(DriverInformation.GetDriverInformationFromHttp(queryUri));
        }
예제 #4
0
        public DriverInformation GetDriverInformation()
        {
            if (string.IsNullOrWhiteSpace(_applicationId))
            {
                throw new ApplicationException("Could not fetch the application ID from YARN's container environment variables.");
            }

            // e.g., http://headnodehost:9014/proxy/application_1407519727821_0012/reef/v1/driver
            Uri queryUri = new Uri(
                string.Concat(
                    Constants.HDInsightClusterHttpEndpointBaseUri,
                    _applicationId + "/",
                    Constants.HttpReefUriSpecification,
                    Constants.HttpDriverUriTarget));

            return(DriverInformation.GetDriverInformationFromHttp(queryUri));
        }
        public DriverInformation GetDriverInformation()
        {
            if (string.IsNullOrWhiteSpace(_applicationId))
            {
                throw new ApplicationException("Could not fetch the application ID from YARN's container environment variables.");
            }

            // e.g., http://yingdac1:8088/proxy/application_1407519727821_0012/reef/v1/driver
            string oneBoxHost = string.Format(CultureInfo.InvariantCulture, "http://{0}:8088/proxy/", Environment.MachineName);
            Uri    queryUri   = new Uri(
                string.Concat(
                    oneBoxHost,
                    _applicationId + '/',
                    Constants.HttpReefUriSpecification,
                    Constants.HttpDriverUriTarget));

            return(DriverInformation.GetDriverInformationFromHttp(queryUri));
        }
예제 #6
0
 public DriverInformation GetDriverInformation()
 {
     // application id not needed for local runtime
     return(DriverInformation.GetDriverInformationFromHttp(_queryUri));
 }