Пример #1
0
        /// <summary>
        /// Initializes a new instance of the HDInsightApplicationHistoryClient class.
        /// </summary>
        /// <param name="cluster">
        /// Details about the cluster against which the client should be created.
        /// </param>
        /// <param name="timeout">
        /// The timeout value to use for operations performed by this client.
        /// </param>
        /// <param name="customUserAgent">
        /// A tag to help identify the client/user.
        /// </param>
        internal HDInsightApplicationHistoryClient(ClusterDetails cluster, TimeSpan timeout, string customUserAgent)
        {
            cluster.ArgumentNotNull("cluster");

            VerifyApplicationHistorySupport(cluster);

            this.Cluster                   = cluster;
            this.HttpCredentials           = GetClusterHttpCredentials(this.Cluster);
            this.DefaultStorageCredentials = GetClusterStorageCredentials(this.Cluster);

            this.timeout         = timeout;
            this.customUserAgent = customUserAgent;

            // Versioning of application history client to be handled here.
            this.applicationHistoryClient = HadoopApplicationHistoryClientFactory.Connect(this.HttpCredentials);
        }
        /// <summary>
        /// Initializes a new instance of the HDInsightApplicationHistoryClient class.
        /// </summary>
        /// <param name="cluster">
        /// Details about the cluster against which the client should be created.
        /// </param>
        /// <param name="timeout">
        /// The timeout value to use for operations performed by this client.
        /// </param>
        /// <param name="customUserAgent">
        /// A tag to help identify the client/user.
        /// </param>
        internal HDInsightApplicationHistoryClient(ClusterDetails cluster, TimeSpan timeout, string customUserAgent)
        {
            cluster.ArgumentNotNull("cluster");

            VerifyApplicationHistorySupport(cluster);

            this.Cluster = cluster;
            this.HttpCredentials = GetClusterHttpCredentials(this.Cluster);
            this.DefaultStorageCredentials = GetClusterStorageCredentials(this.Cluster);

            this.timeout = timeout;
            this.customUserAgent = customUserAgent;

            // Versioning of application history client to be handled here.
            this.applicationHistoryClient = HadoopApplicationHistoryClientFactory.Connect(this.HttpCredentials);
        }