Beispiel #1
0
        public void MonitorPipelineRuns()
        {
            #region Snippet:CreateMonitoringClient
            string           endpoint = TestEnvironment.EndpointUrl;
            MonitoringClient client   = new MonitoringClient(new Uri(endpoint), new DefaultAzureCredential());
            #endregion

            #region Snippet:GetSparkJobList
            SparkJobListViewResponse sparkJobList = client.GetSparkJobList();
            foreach (var sparkJob in sparkJobList.SparkJobs)
            {
                if (sparkJob.State == "Running")
                {
                    Console.WriteLine($"{sparkJob.Name} has been running for {sparkJob.RunningDuration}");
                }
                else
                {
                    Console.WriteLine($"{sparkJob.Name} has been in {sparkJob.State} for {sparkJob.QueuedDuration}");
                }
            }
            #endregion

            #region Snippet:GetSqlJobQueryString
            SqlQueryStringDataModel sqlQuery = client.GetSqlJobQueryString();
            #endregion
        }
Beispiel #2
0
        public void MonitoringSample()
        {
            #region Snippet:CreateMonitoringClient
            // Replace the string below with your actual endpoint url.
            string endpoint = "<my-endpoint-url>";
            /*@@*/ endpoint = TestEnvironment.EndpointUrl;
            MonitoringClient client = new MonitoringClient(endpoint: new Uri(endpoint), credential: new DefaultAzureCredential());
            #endregion

            #region Snippet:GetSparkJobList
            SparkJobListViewResponse sparkJobList = client.GetSparkJobList();
            #endregion

            #region Snippet:GetSqlJobQueryString
            SqlQueryStringDataModel sqlQuery = client.GetSqlJobQueryString();
            #endregion
        }
Beispiel #3
0
 public void GetSqlJobQueryString()
 {
     #region Snippet:GetSqlJobQueryString
     SqlQueryStringDataModel sqlQuery = client.GetSqlJobQueryString();
     #endregion
 }