Skip to content

Commit ea9abbe

Browse files
committed
fixed build, added missing fdp column and wrote an integration test
1 parent 4f07c76 commit ea9abbe

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed

src/Nest/Domain/Cat/CatNodesRecord.cs

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public class CatNodesRecord : ICatRecord
8686
[JsonProperty("heapMax")]
8787
internal string _heapMax { get; set; }
8888
public string HeapMax { get { return this._heapMax ?? this._hm ?? this._heap_max; }}
89-
]
89+
9090
[JsonProperty("ram.current")]
9191
internal string _ram_current { get; set; }
9292
[JsonProperty("rc")]
@@ -203,21 +203,29 @@ public class CatNodesRecord : ICatRecord
203203
internal string _flushTotalTime { get; set; }
204204
public string FlushTotalTime { get { return this._flushTotalTime ?? this._ftt ?? this._flush_total_time; }}
205205

206+
[JsonProperty("file_desc.current")]
207+
internal int? _file_desc_current { get; set; }
208+
[JsonProperty("fdc")]
209+
internal int? _fdc { get; set; }
210+
[JsonProperty("fileDescriptorCurrent")]
211+
internal int? _fileDescriptorCurrent { get; set; }
212+
public int? FileDescriptorCurrent { get { return this._fileDescriptorCurrent ?? this._fdc ?? this._file_desc_current; }}
213+
206214
[JsonProperty("file_desc.percent")]
207-
internal int _file_desc_percent { get; set; }
215+
internal int? _file_desc_percent { get; set; }
208216
[JsonProperty("fdp")]
209-
internal int _fdp { get; set; }
217+
internal int? _fdp { get; set; }
210218
[JsonProperty("fileDescriptorPercent")]
211-
internal int _fileDescriptorPercent { get; set; }
212-
public int FileDescriptorPercent { get { return this._fileDescriptorPercent ?? this._fdp ?? this._file_desc_percent; }}
219+
internal int? _fileDescriptorPercent { get; set; }
220+
public int? FileDescriptorPercent { get { return this._fileDescriptorPercent ?? this._fdp ?? this._file_desc_percent; }}
213221

214222
[JsonProperty("file_desc.max")]
215-
internal int _file_desc_max { get; set; }
223+
internal int? _file_desc_max { get; set; }
216224
[JsonProperty("fdm")]
217-
internal int _fdm { get; set; }
225+
internal int? _fdm { get; set; }
218226
[JsonProperty("fileDescriptorMax")]
219-
internal int _fileDescriptorMax { get; set; }
220-
public int FileDescriptorMax { get { return this._fileDescriptorMax ?? this._fdm ?? this._file_desc_max; }}
227+
internal int? _fileDescriptorMax { get; set; }
228+
public int? FileDescriptorMax { get { return this._fileDescriptorMax ?? this._fdm ?? this._file_desc_max; }}
221229

222230
[JsonProperty("get.current")]
223231
internal string _get_current { get; set; }

src/Tests/Nest.Tests.Integration/Core/Cat/CatTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,18 @@ public void CatNodes()
138138
TestCat(() => this._client.CatNodes(v => v.H("b")), r => !r.Build.IsNullOrEmpty());
139139
}
140140

141+
[Test]
142+
public void CatNodesFileDescriptors()
143+
{
144+
TestCat(() => this._client.CatNodes(v => v.H("b", "fdc", "fdp", "fdm")), r =>
145+
!r.Build.IsNullOrEmpty()
146+
&& r.FileDescriptorCurrent.HasValue && r.FileDescriptorCurrent.Value > 0
147+
&& r.FileDescriptorPercent.HasValue
148+
&& r.FileDescriptorMax.HasValue
149+
150+
);
151+
}
152+
141153
[Test]
142154
public async void CatNodesAsync()
143155
{

0 commit comments

Comments
 (0)