Skip to content

Commit e6323c7

Browse files
committed
Analysis limits now contain "mb", so values cannot be parsed as long? data types.
1 parent 2f2a0e3 commit e6323c7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Nest/XPack/MachineLearning/Job/Config/AnalysisLimits.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public interface IAnalysisLimits
2626
/// Upon exceeding this limit, new entities are not modeled. The default value is 4096.
2727
/// </summary>
2828
[JsonProperty("model_memory_limit")]
29-
long? ModelMemoryLimit { get; set; }
29+
string ModelMemoryLimit { get; set; }
3030
}
3131

3232
/// <inheritdoc />
@@ -35,21 +35,21 @@ public class AnalysisLimits : IAnalysisLimits
3535
/// <inheritdoc />
3636
public long? CategorizationExamplesLimit { get; set; }
3737
/// <inheritdoc />
38-
public long? ModelMemoryLimit { get; set; }
38+
public string ModelMemoryLimit { get; set; }
3939
}
4040

4141
/// <inheritdoc />
4242
public class AnalysisLimitsDescriptor : DescriptorBase<AnalysisLimitsDescriptor, IAnalysisLimits>, IAnalysisLimits
4343
{
4444
long? IAnalysisLimits.CategorizationExamplesLimit { get; set; }
45-
long? IAnalysisLimits.ModelMemoryLimit { get; set; }
45+
string IAnalysisLimits.ModelMemoryLimit { get; set; }
4646

4747
/// <inheritdoc />
4848
public AnalysisLimitsDescriptor CategorizationExamplesLimit(long categorizationExamplesLimit) =>
4949
Assign(a => a.CategorizationExamplesLimit = categorizationExamplesLimit);
5050

5151
/// <inheritdoc />
52-
public AnalysisLimitsDescriptor ModelMemoryLimit(long modelMemoryLimit) =>
52+
public AnalysisLimitsDescriptor ModelMemoryLimit(string modelMemoryLimit) =>
5353
Assign(a => a.ModelMemoryLimit = modelMemoryLimit);
5454
}
5555

@@ -65,23 +65,23 @@ public interface IAnalysisMemoryLimit
6565
/// Upon exceeding this limit, new entities are not modeled. The default value is 4096.
6666
/// </summary>
6767
[JsonProperty("model_memory_limit")]
68-
long? ModelMemoryLimit { get; set; }
68+
string ModelMemoryLimit { get; set; }
6969
}
7070

7171
/// <inheritdoc />
7272
public class AnalysisMemoryLimit : IAnalysisMemoryLimit
7373
{
7474
/// <inheritdoc />
75-
public long? ModelMemoryLimit { get; set; }
75+
public string ModelMemoryLimit { get; set; }
7676
}
7777

7878
/// <inheritdoc />
7979
public class AnalysisMemoryLimitDescriptor : DescriptorBase<AnalysisMemoryLimitDescriptor, IAnalysisMemoryLimit>, IAnalysisMemoryLimit
8080
{
81-
long? IAnalysisMemoryLimit.ModelMemoryLimit { get; set; }
81+
string IAnalysisMemoryLimit.ModelMemoryLimit { get; set; }
8282

8383
/// <inheritdoc />
84-
public AnalysisMemoryLimitDescriptor ModelMemoryLimit(long modelMemoryLimit) =>
84+
public AnalysisMemoryLimitDescriptor ModelMemoryLimit(string modelMemoryLimit) =>
8585
Assign(a => a.ModelMemoryLimit = modelMemoryLimit);
8686
}
8787
}

0 commit comments

Comments
 (0)