Skip to content

Commit

Permalink
Add running state to datafeed stats (#5792) (#5794)
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk>
  • Loading branch information
github-actions[bot] and stevejgordon authored Jul 5, 2021
1 parent 9583d53 commit 71251b0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Nest/XPack/MachineLearning/Datafeed/DatafeedStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public class DatafeedStats

[DataMember(Name = "timing_stats")]
public DatafeedTimingStats TimingStats { get; internal set; }

/// <summary>
/// The running state for the datafeed. It is only provided if the {dfeed} is started.
/// </summary>
[DataMember(Name = "running_state")]
public RunningState RunningState { get; internal set; }
}

[DataContract]
Expand Down
21 changes: 21 additions & 0 deletions src/Nest/XPack/MachineLearning/Datafeed/RunningState.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information

using System.Runtime.Serialization;

namespace Nest
{
/// <summary>
/// The running state for a datafeed once started.
/// </summary>
[DataContract]
public class RunningState
{
[DataMember(Name = "is_real_time")]
public bool IsRealTime { get; internal set; }

[DataMember(Name = "look_back_finished")]
public bool LoopBackFinished { get; internal set; }
}
}

0 comments on commit 71251b0

Please sign in to comment.