Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add running state to data feed stats #5792

Merged
merged 1 commit into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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; }
}
}