Esempio n. 1
0
 public ExtendedLivyBatchResponse PollSparkBatchJobExecution(
     string workspaceName,
     string sparkPoolName,
     ExtendedLivyBatchResponse batch,
     int pollingIntervalInSeconds = 0,
     int timeoutInSeconds         = 0,
     Action <string> writeLog     = null)
 {
     return(Poll(
                batch,
                b => b.Result,
                b => b.State,
                b => this.GetSparkBatchJob(workspaceName, sparkPoolName, b.Id.Value),
                SparkJobLivyState.BatchExecutionFinalStates,
                pollingInMilliseconds: pollingIntervalInSeconds * 1000,
                timeoutInMilliseconds: timeoutInSeconds * 1000,
                writeLog: (b) => writeLog?.Invoke(string.Format(Resources.WaitJobState, b.State))));
 }
 public PSSynapseSparkJob(ExtendedLivyBatchResponse batchJob) :
     base(batchJob?.Name,
          batchJob?.WorkspaceName,
          batchJob?.SparkPoolName,
          batchJob?.SubmitterName,
          batchJob?.SubmitterId,
          batchJob?.ArtifactId,
          batchJob?.JobType,
          batchJob?.Result,
          batchJob?.SchedulerInfo,
          batchJob?.PluginInfo,
          batchJob?.ErrorInfo,
          batchJob?.Tags,
          batchJob?.Id,
          batchJob?.AppId,
          batchJob?.AppInfo,
          batchJob?.State,
          batchJob?.Log)
 {
     this.LivyInfo = batchJob?.LivyInfo != null ? new PSLivyBatchStateInformation(batchJob?.LivyInfo) : null;
 }
Esempio n. 3
0
 public ExtendedLivyBatchResponse PollSparkBatchJobSubmission(string workspaceName, string sparkPoolName, ExtendedLivyBatchResponse batch)
 {
     return(Poll(
                batch,
                b => b.Result,
                b => b.State,
                b => this.GetSparkBatchJob(workspaceName, sparkPoolName, b.Id.Value),
                SparkJobLivyState.BatchSubmissionFinalStates));
 }