Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
c482744
Deprecate the logstash enabled setting (#53367)
jaymode Mar 12, 2020
ae55e06
Add ComponentTemplate to MetaData (#53290)
dakrone Mar 12, 2020
a8d89fd
Fix concurrent requests race over scroll context limit (#53449)
dnhatn Mar 12, 2020
970f726
[ML] renaming inference processor field field_mappings to new name fi…
benwtrent Mar 12, 2020
77ec60b
[DOCS] Adds a warning about reindexing docs with the same ID to the P…
szabosteve Mar 12, 2020
5ccb3b6
Ignore isJoda flag from 7x nodes (#53481)
pgomulka Mar 12, 2020
c27eab7
Remove Java 13 from runtime testing matrix
mark-vieira Mar 12, 2020
facd525
Mask wildcard query special characters on keyword queries (#53127)
Mar 12, 2020
58340c2
[ML] Adds the class_assignment_objective parameter to classification …
tveasey Mar 12, 2020
9ad0597
Removes old Lucene's experimental flag from analyzer documentations (…
jimczi Mar 12, 2020
88d05d1
Fix race condition when deleting an async search (#53513)
jimczi Mar 12, 2020
428ed2a
Disable BWC Tests for ComponentTemplateMetadata backport (#53516)
dakrone Mar 12, 2020
b825f64
Update minimal supported version for ComponentTemplateMetadata (#53515)
dakrone Mar 12, 2020
99a4fa3
Update jackson-databind to 2.8.11.6 (#53522)
jasontedor Mar 13, 2020
37c739c
Fix pre-sorting of shards in the can_match phase (#53397)
jimczi Mar 13, 2020
f0ec898
Re-enable BWC tests after ComponentTemplateMetadata backport (#53520)
dakrone Mar 13, 2020
febe7af
[DOCS] Clarify `max_shingle_size` parm def (#53480)
jrodewig Mar 13, 2020
7a18294
Use snake case for nodes stats/info metric names (#53446)
williamrandolph Mar 13, 2020
b1682fc
[ML] Parse single named object in config classes (#53472)
davidkyle Mar 13, 2020
f873398
Reënable BWC tests (#53538)
williamrandolph Mar 13, 2020
eade4a2
Fix broken link in client documentation (#51834)
jimczi Mar 13, 2020
3141452
Fix YAML test for search.allow_expensive_queries (#53541)
matriv Mar 13, 2020
a808010
Reenable watcher rest tests (#53532)
martijnvg Mar 13, 2020
fb158df
Fix inaccurate total hit count in _search template api (#53155)
gaobinlong Mar 13, 2020
548fd94
Move async search yaml tests to x-pack yaml test folder (#53537)
javanna Mar 13, 2020
6f1fdcf
Remove additional ] (#53420)
jakommo Mar 13, 2020
1fc3fe3
Fix Term Vectors with artificial docs and keyword fields (#53504)
matriv Mar 13, 2020
375a211
Handle no such remote cluster exception in ccr (#53415)
dnhatn Mar 13, 2020
0f8de60
[ML] Mute data frame analytics BWC tests (#53546)
tveasey Mar 13, 2020
7aa661c
[DOCS] Adds operations_behind to transform stats (#53518)
lcawl Mar 13, 2020
b1ac51d
Ensure jdk download uses a unique maven group (#53531)
rjernst Mar 13, 2020
59c2eb4
[ML] [Inference] fix number inference models returned in x-pack info …
benwtrent Mar 13, 2020
d7bbc9d
Allow _cat indices & aliases to use indices options (#53248)
gwbrown Mar 13, 2020
f6d3784
migrate tests from MissingIT to agg tests (#53448)
andyb-elastic Mar 13, 2020
9e48ca7
Lower docker-compose version to allow for older Docker engine support…
mark-vieira Mar 13, 2020
8ccdaa3
Align remote info api with new settings (#53441)
Tim-Brooks Mar 13, 2020
1cdb5b3
Move AStatement mutable members into isolated Input/Output objects (#…
jdconrad Mar 13, 2020
89d6873
[DOCS] Added missing definitions and edited for consistency. (#53519)
debadair Mar 13, 2020
7bc75f4
Upgrade to Jackson 2.10.3 and GeoIP2 to 2.13.1 (#53523)
jasontedor Mar 14, 2020
fa6d515
Remove extra code in allocation commands parsing (#53579)
jasontedor Mar 14, 2020
060b4ee
Revert "Upgrade to Jackson 2.10.3 and GeoIP2 to 2.13.1 (#53523)"
mark-vieira Mar 16, 2020
bd58052
Do not log no-op reconnections at DEBUG (#53469)
DaveCTurner Mar 16, 2020
a2a4756
New wildcard field optimised for wildcard queries (#49993)
markharwood Mar 16, 2020
340fcd1
Mute SnapshotLifecycleRestIT.testFullPolicySnapshot (#53588)
davidkyle Mar 16, 2020
01eee1a
Highlighters skip ignored keyword values (#53408)
mayya-sharipova Mar 16, 2020
eaa8ead
SQL: Fix issue with LIKE/RLIKE as painless script (#53495)
matriv Mar 16, 2020
7e0a3c4
[ML] Extend classification to support multiple classes (#53539)
dimitris-athanasiou Mar 16, 2020
ec3481e
SQL: Fix NPE for parameterized LIKE/RLIKE (#53573)
matriv Mar 16, 2020
4bfe288
Make classification evaluation metrics work when there is field mappi…
przemekwitek Mar 16, 2020
d6cd4ce
QL: constant_keyword support (#53241)
astefan Mar 16, 2020
f5f925c
Reenable tests and update version (#53556)
tveasey Mar 16, 2020
e8ed337
[DOCS] Reformat `remove_duplicates` token filter (#53608)
jrodewig Mar 16, 2020
887541e
Add Watcher to available rest resources (#53319)
jakelandis Mar 16, 2020
4f48e05
Revert "Add Watcher to available rest resources (#53319)"
jakelandis Mar 16, 2020
0f0091e
Disable Watcher script optimization for stored scripts (#53497)
spinscale Mar 16, 2020
f63295b
Remove CONSTANT_KEYWORD from LiteralTests.java (#53606)
astefan Mar 16, 2020
230a9a8
Improve top_metrics docs (#53521)
nik9000 Mar 16, 2020
3495239
Hide I/SLM history aliases (#53564)
gwbrown Mar 16, 2020
3b7843d
Fix sorting agg buckets by doc_count (#53617)
nik9000 Mar 16, 2020
4d81edb
Stop using round-tripped PipelineAggregators (#53423)
nik9000 Mar 16, 2020
c87da3e
[ML] Unmute a couple accidentally muted bwc tests for DF analytics (#…
dimitris-athanasiou Mar 16, 2020
4a5feab
[DOCS] Add anchors for scripted metric aggregations (#53618)
lcawl Mar 16, 2020
84a59f8
Add scripting, supported-type tests to ValueCount (#53500)
polyfractal Mar 16, 2020
f2f0fc0
Update skip before backport
nik9000 Mar 16, 2020
12e2485
[DOCS] Remove `force` as valid value for `version_type` (#53428)
Gunnerva Mar 16, 2020
2abf40a
Add server name to remote info API (#53634)
jasontedor Mar 17, 2020
87dc720
Update server name serialization version
jasontedor Mar 17, 2020
41e3b4a
Invoke response handler on failure to send (#53631)
jasontedor Mar 17, 2020
3608be6
Add internalClusterTest to check task (#53444)
rjernst Mar 17, 2020
b67863e
Explicitly require that derived API keys have no privileges (#53647)
ywangd Mar 17, 2020
f65e4d6
SQL: add support for index aliases for SYS COLUMNS command (#53525)
astefan Mar 17, 2020
ff94792
Shortcut query phase using the results of other shards (#51852)
jimczi Mar 17, 2020
68a698f
[Transform] add transform discovery node role (#53616)
Mar 17, 2020
3e607d9
Rename AtomicFieldData to LeafFieldData (#53554)
romseygeek Mar 17, 2020
73e930f
Merge branch 'master' into vs-refactor-2020-03-17-conflicts
not-napoleon Mar 17, 2020
e8ba8c4
Add ValuesSouceType to wildcard field
not-napoleon Mar 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .ci/matrix-runtime-javas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

ES_RUNTIME_JAVA:
- java11
- openjdk13
- openjdk14
- openjdk15
- zulu11
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ task verifyVersions {
* after the backport of the backcompat code is complete.
*/

boolean bwc_tests_enabled = false
final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/issues/53477" /* place a PR link here when committing bwc changes */
boolean bwc_tests_enabled = true
final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */
if (bwc_tests_enabled == false) {
if (bwc_tests_disabled_issue.isEmpty()) {
throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private static void setupRootJdkDownload(Project rootProject, Jdk jdk) {
repo.patternLayout(layout -> layout.artifact(artifactPattern));
});
repositories.exclusiveContent(exclusiveContentRepository -> {
exclusiveContentRepository.filter(config -> config.includeGroup(jdk.getVendor()));
exclusiveContentRepository.filter(config -> config.includeGroup(groupName(jdk)));
exclusiveContentRepository.forRepositories(ivyRepo);
});
}
Expand Down Expand Up @@ -254,7 +254,11 @@ private static String dependencyNotation(Jdk jdk) {
: jdk.getPlatform();
String extension = jdk.getPlatform().equals("windows") ? "zip" : "tar.gz";

return jdk.getVendor() + ":" + platformDep + ":" + jdk.getBaseVersion() + "@" + extension;
return groupName(jdk) + ":" + platformDep + ":" + jdk.getBaseVersion() + "@" + extension;
}

private static String groupName(Jdk jdk) {
return jdk.getVendor() + "_" + jdk.getMajor();
}

private static String configName(String... parts) {
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jts = 1.15.0
# you should also inspect that version to see if it can be advanced along with
# the com.maxmind.geoip2:geoip2 dependency
jackson = 2.8.11
jacksondatabind = 2.8.11.4
jacksondatabind = 2.8.11.6
snakeyaml = 1.17
icu4j = 62.1
supercsv = 2.4.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@

public class ProxyModeInfo implements RemoteConnectionInfo.ModeInfo {
static final String NAME = "proxy";
static final String ADDRESS = "address";
static final String NUM_SOCKETS_CONNECTED = "num_sockets_connected";
static final String MAX_SOCKET_CONNECTIONS = "max_socket_connections";
static final String PROXY_ADDRESS = "proxy_address";
static final String SERVER_NAME = "server_name";
static final String NUM_PROXY_SOCKETS_CONNECTED = "num_proxy_sockets_connected";
static final String MAX_PROXY_SOCKET_CONNECTIONS = "max_proxy_socket_connections";
private final String address;
private final String serverName;
private final int maxSocketConnections;
private final int numSocketsConnected;

ProxyModeInfo(String address, int maxSocketConnections, int numSocketsConnected) {
ProxyModeInfo(String address, String serverName, int maxSocketConnections, int numSocketsConnected) {
this.address = address;
this.serverName = serverName;
this.maxSocketConnections = maxSocketConnections;
this.numSocketsConnected = numSocketsConnected;
}
Expand All @@ -50,6 +53,10 @@ public String getAddress() {
return address;
}

public String getServerName() {
return serverName;
}

public int getMaxSocketConnections() {
return maxSocketConnections;
}
Expand All @@ -65,11 +72,12 @@ public boolean equals(Object o) {
ProxyModeInfo otherProxy = (ProxyModeInfo) o;
return maxSocketConnections == otherProxy.maxSocketConnections &&
numSocketsConnected == otherProxy.numSocketsConnected &&
Objects.equals(address, otherProxy.address);
Objects.equals(address, otherProxy.address) &&
Objects.equals(serverName, otherProxy.serverName);
}

@Override
public int hashCode() {
return Objects.hash(address, maxSocketConnections, numSocketsConnected);
return Objects.hash(address, serverName, maxSocketConnections, numSocketsConnected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public final class RemoteConnectionInfo {
String mode = (String) args[1];
ModeInfo modeInfo;
if (mode.equals(ProxyModeInfo.NAME)) {
modeInfo = new ProxyModeInfo((String) args[4], (int) args[5], (int) args[6]);
modeInfo = new ProxyModeInfo((String) args[4], (String) args[5], (int) args[6], (int) args[7]);
} else if (mode.equals(SniffModeInfo.NAME)) {
modeInfo = new SniffModeInfo((List<String>) args[7], (int) args[8], (int) args[9]);
modeInfo = new SniffModeInfo((List<String>) args[8], (int) args[9], (int) args[10]);
} else {
throw new IllegalArgumentException("mode cannot be " + mode);
}
Expand All @@ -66,9 +66,10 @@ public final class RemoteConnectionInfo {
PARSER.declareString(constructorArg(), new ParseField(INITIAL_CONNECT_TIMEOUT));
PARSER.declareBoolean(constructorArg(), new ParseField(SKIP_UNAVAILABLE));

PARSER.declareString(optionalConstructorArg(), new ParseField(ProxyModeInfo.ADDRESS));
PARSER.declareInt(optionalConstructorArg(), new ParseField(ProxyModeInfo.MAX_SOCKET_CONNECTIONS));
PARSER.declareInt(optionalConstructorArg(), new ParseField(ProxyModeInfo.NUM_SOCKETS_CONNECTED));
PARSER.declareString(optionalConstructorArg(), new ParseField(ProxyModeInfo.PROXY_ADDRESS));
PARSER.declareString(optionalConstructorArg(), new ParseField(ProxyModeInfo.SERVER_NAME));
PARSER.declareInt(optionalConstructorArg(), new ParseField(ProxyModeInfo.MAX_PROXY_SOCKET_CONNECTIONS));
PARSER.declareInt(optionalConstructorArg(), new ParseField(ProxyModeInfo.NUM_PROXY_SOCKETS_CONNECTED));

PARSER.declareStringArray(optionalConstructorArg(), new ParseField(SniffModeInfo.SEEDS));
PARSER.declareInt(optionalConstructorArg(), new ParseField(SniffModeInfo.MAX_CONNECTIONS_PER_CLUSTER));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
import org.elasticsearch.common.ParseField;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.xcontent.ConstructingObjectParser;
import org.elasticsearch.common.xcontent.ObjectParser;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser;

import java.io.IOException;
import java.util.Locale;
import java.util.Objects;

public class Classification implements DataFrameAnalysis {
Expand All @@ -49,6 +51,7 @@ public static Builder builder(String dependentVariable) {
static final ParseField NUM_TOP_FEATURE_IMPORTANCE_VALUES = new ParseField("num_top_feature_importance_values");
static final ParseField PREDICTION_FIELD_NAME = new ParseField("prediction_field_name");
static final ParseField TRAINING_PERCENT = new ParseField("training_percent");
static final ParseField CLASS_ASSIGNMENT_OBJECTIVE = new ParseField("class_assignment_objective");
static final ParseField NUM_TOP_CLASSES = new ParseField("num_top_classes");
static final ParseField RANDOMIZE_SEED = new ParseField("randomize_seed");

Expand All @@ -67,7 +70,8 @@ public static Builder builder(String dependentVariable) {
(String) a[7],
(Double) a[8],
(Integer) a[9],
(Long) a[10]));
(Long) a[10],
(ClassAssignmentObjective) a[11]));

static {
PARSER.declareString(ConstructingObjectParser.constructorArg(), DEPENDENT_VARIABLE);
Expand All @@ -81,6 +85,12 @@ public static Builder builder(String dependentVariable) {
PARSER.declareDouble(ConstructingObjectParser.optionalConstructorArg(), TRAINING_PERCENT);
PARSER.declareInt(ConstructingObjectParser.optionalConstructorArg(), NUM_TOP_CLASSES);
PARSER.declareLong(ConstructingObjectParser.optionalConstructorArg(), RANDOMIZE_SEED);
PARSER.declareField(ConstructingObjectParser.optionalConstructorArg(), p -> {
if (p.currentToken() == XContentParser.Token.VALUE_STRING) {
return ClassAssignmentObjective.fromString(p.text());
}
throw new IllegalArgumentException("Unsupported token [" + p.currentToken() + "]");
}, CLASS_ASSIGNMENT_OBJECTIVE, ObjectParser.ValueType.STRING);
}

private final String dependentVariable;
Expand All @@ -92,13 +102,15 @@ public static Builder builder(String dependentVariable) {
private final Integer numTopFeatureImportanceValues;
private final String predictionFieldName;
private final Double trainingPercent;
private final ClassAssignmentObjective classAssignmentObjective;
private final Integer numTopClasses;
private final Long randomizeSeed;

private Classification(String dependentVariable, @Nullable Double lambda, @Nullable Double gamma, @Nullable Double eta,
@Nullable Integer maxTrees, @Nullable Double featureBagFraction,
@Nullable Integer numTopFeatureImportanceValues, @Nullable String predictionFieldName,
@Nullable Double trainingPercent, @Nullable Integer numTopClasses, @Nullable Long randomizeSeed) {
@Nullable Double trainingPercent, @Nullable Integer numTopClasses, @Nullable Long randomizeSeed,
@Nullable ClassAssignmentObjective classAssignmentObjective) {
this.dependentVariable = Objects.requireNonNull(dependentVariable);
this.lambda = lambda;
this.gamma = gamma;
Expand All @@ -108,6 +120,7 @@ private Classification(String dependentVariable, @Nullable Double lambda, @Nulla
this.numTopFeatureImportanceValues = numTopFeatureImportanceValues;
this.predictionFieldName = predictionFieldName;
this.trainingPercent = trainingPercent;
this.classAssignmentObjective = classAssignmentObjective;
this.numTopClasses = numTopClasses;
this.randomizeSeed = randomizeSeed;
}
Expand Down Expand Up @@ -157,6 +170,10 @@ public Long getRandomizeSeed() {
return randomizeSeed;
}

public ClassAssignmentObjective getClassAssignmentObjective() {
return classAssignmentObjective;
}

public Integer getNumTopClasses() {
return numTopClasses;
}
Expand Down Expand Up @@ -192,6 +209,9 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
if (randomizeSeed != null) {
builder.field(RANDOMIZE_SEED.getPreferredName(), randomizeSeed);
}
if (classAssignmentObjective != null) {
builder.field(CLASS_ASSIGNMENT_OBJECTIVE.getPreferredName(), classAssignmentObjective);
}
if (numTopClasses != null) {
builder.field(NUM_TOP_CLASSES.getPreferredName(), numTopClasses);
}
Expand All @@ -202,7 +222,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
@Override
public int hashCode() {
return Objects.hash(dependentVariable, lambda, gamma, eta, maxTrees, featureBagFraction, numTopFeatureImportanceValues,
predictionFieldName, trainingPercent, randomizeSeed, numTopClasses);
predictionFieldName, trainingPercent, randomizeSeed, numTopClasses, classAssignmentObjective);
}

@Override
Expand All @@ -220,14 +240,28 @@ public boolean equals(Object o) {
&& Objects.equals(predictionFieldName, that.predictionFieldName)
&& Objects.equals(trainingPercent, that.trainingPercent)
&& Objects.equals(randomizeSeed, that.randomizeSeed)
&& Objects.equals(numTopClasses, that.numTopClasses);
&& Objects.equals(numTopClasses, that.numTopClasses)
&& Objects.equals(classAssignmentObjective, that.classAssignmentObjective);
}

@Override
public String toString() {
return Strings.toString(this);
}

public enum ClassAssignmentObjective {
MAXIMIZE_ACCURACY, MAXIMIZE_MINIMUM_RECALL;

public static ClassAssignmentObjective fromString(String value) {
return ClassAssignmentObjective.valueOf(value.toUpperCase(Locale.ROOT));
}

@Override
public String toString() {
return name().toLowerCase(Locale.ROOT);
}
}

public static class Builder {
private String dependentVariable;
private Double lambda;
Expand All @@ -240,6 +274,7 @@ public static class Builder {
private Double trainingPercent;
private Integer numTopClasses;
private Long randomizeSeed;
private ClassAssignmentObjective classAssignmentObjective;

private Builder(String dependentVariable) {
this.dependentVariable = Objects.requireNonNull(dependentVariable);
Expand Down Expand Up @@ -295,9 +330,15 @@ public Builder setNumTopClasses(Integer numTopClasses) {
return this;
}

public Builder setClassAssignmentObjective(ClassAssignmentObjective classAssignmentObjective) {
this.classAssignmentObjective = classAssignmentObjective;
return this;
}

public Classification build() {
return new Classification(dependentVariable, lambda, gamma, eta, maxTrees, featureBagFraction,
numTopFeatureImportanceValues, predictionFieldName, trainingPercent, numTopClasses, randomizeSeed);
numTopFeatureImportanceValues, predictionFieldName, trainingPercent, numTopClasses, randomizeSeed,
classAssignmentObjective);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ public class TrainedModelDefinition implements ToXContentObject {
true,
TrainedModelDefinition.Builder::new);
static {
PARSER.declareNamedObjects(TrainedModelDefinition.Builder::setTrainedModel,
PARSER.declareNamedObject(TrainedModelDefinition.Builder::setTrainedModel,
(p, c, n) -> p.namedObject(TrainedModel.class, n, null),
(modelDocBuilder) -> { /* Noop does not matter client side*/ },
TRAINED_MODEL);
PARSER.declareNamedObjects(TrainedModelDefinition.Builder::setPreProcessors,
(p, c, n) -> p.namedObject(PreProcessor.class, n, null),
Expand Down Expand Up @@ -124,11 +123,6 @@ public Builder setTrainedModel(TrainedModel trainedModel) {
return this;
}

private Builder setTrainedModel(List<TrainedModel> trainedModel) {
assert trainedModel.size() == 1;
return setTrainedModel(trainedModel.get(0));
}

public TrainedModelDefinition build() {
return new TrainedModelDefinition(this.trainedModel, this.preProcessors);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ public class Ensemble implements TrainedModel {
p.namedObject(TrainedModel.class, n, null),
(ensembleBuilder) -> { /* Noop does not matter client side */ },
TRAINED_MODELS);
PARSER.declareNamedObjects(Ensemble.Builder::setOutputAggregatorFromParser,
PARSER.declareNamedObject(Ensemble.Builder::setOutputAggregator,
(p, c, n) -> p.namedObject(OutputAggregator.class, n, null),
(ensembleBuilder) -> { /* Noop does not matter client side */ },
AGGREGATE_OUTPUT);
PARSER.declareString(Ensemble.Builder::setTargetType, TARGET_TYPE);
PARSER.declareStringArray(Ensemble.Builder::setClassificationLabels, CLASSIFICATION_LABELS);
Expand Down Expand Up @@ -194,9 +193,6 @@ public Builder setClassificationWeights(List<Double> classificationWeights) {
return this;
}

private void setOutputAggregatorFromParser(List<OutputAggregator> outputAggregators) {
this.setOutputAggregator(outputAggregators.get(0));
}

private void setTargetType(String targetType) {
this.targetType = TargetType.fromString(targetType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,8 @@ public void testPutDataFrameAnalyticsConfig_GivenClassification() throws Excepti
.setPredictionFieldName("my_dependent_variable_prediction")
.setTrainingPercent(80.0)
.setRandomizeSeed(42L)
.setClassAssignmentObjective(
org.elasticsearch.client.ml.dataframe.Classification.ClassAssignmentObjective.MAXIMIZE_ACCURACY)
.setNumTopClasses(1)
.setLambda(1.0)
.setGamma(1.0)
Expand Down Expand Up @@ -2265,7 +2267,7 @@ public void testGetTrainedModelsStats() throws Exception {
" \"target_field\": \"regression_value\",\n" +
" \"model_id\": \"" + modelIdPrefix + 0 + "\",\n" +
" \"inference_config\": {\"regression\": {}},\n" +
" \"field_mappings\": {\n" +
" \"field_map\": {\n" +
" \"col1\": \"col1\",\n" +
" \"col2\": \"col2\",\n" +
" \"col3\": \"col3\",\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ protected void assertInstances(org.elasticsearch.action.admin.cluster.remote.Rem
ProxyConnectionStrategy.ProxyModeInfo serverModeInfo =
(ProxyConnectionStrategy.ProxyModeInfo) serverRemoteInfo.getModeInfo();
assertThat(clientModeInfo.getAddress(), equalTo(serverModeInfo.getAddress()));
assertThat(clientModeInfo.getServerName(), equalTo(serverModeInfo.getServerName()));
assertThat(clientModeInfo.getMaxSocketConnections(), equalTo(serverModeInfo.getMaxSocketConnections()));
assertThat(clientModeInfo.getNumSocketsConnected(), equalTo(serverModeInfo.getNumSocketsConnected()));
} else {
Expand All @@ -95,9 +96,10 @@ private static RemoteConnectionInfo createRandomRemoteConnectionInfo() {
RemoteConnectionInfo.ModeInfo modeInfo;
if (randomBoolean()) {
String address = randomAlphaOfLength(8);
String serverName = randomAlphaOfLength(8);
int maxSocketConnections = randomInt(5);
int numSocketsConnected = randomInt(5);
modeInfo = new ProxyConnectionStrategy.ProxyModeInfo(address, maxSocketConnections, numSocketsConnected);
modeInfo = new ProxyConnectionStrategy.ProxyModeInfo(address, serverName, maxSocketConnections, numSocketsConnected);
} else {
List<String> seedNodes = randomList(randomInt(8), () -> randomAlphaOfLength(8));
int maxConnectionsPerCluster = randomInt(5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
import org.elasticsearch.client.ml.datafeed.DatafeedStats;
import org.elasticsearch.client.ml.datafeed.DatafeedUpdate;
import org.elasticsearch.client.ml.datafeed.DelayedDataCheckConfig;
import org.elasticsearch.client.ml.dataframe.Classification;
import org.elasticsearch.client.ml.dataframe.DataFrameAnalysis;
import org.elasticsearch.client.ml.dataframe.DataFrameAnalyticsConfig;
import org.elasticsearch.client.ml.dataframe.DataFrameAnalyticsDest;
Expand Down Expand Up @@ -2969,7 +2970,7 @@ public void testPutDataFrameAnalytics() throws Exception {
// end::put-data-frame-analytics-outlier-detection-customized

// tag::put-data-frame-analytics-classification
DataFrameAnalysis classification = org.elasticsearch.client.ml.dataframe.Classification.builder("my_dependent_variable") // <1>
DataFrameAnalysis classification = Classification.builder("my_dependent_variable") // <1>
.setLambda(1.0) // <2>
.setGamma(5.5) // <3>
.setEta(5.5) // <4>
Expand All @@ -2979,7 +2980,8 @@ public void testPutDataFrameAnalytics() throws Exception {
.setPredictionFieldName("my_prediction_field_name") // <8>
.setTrainingPercent(50.0) // <9>
.setRandomizeSeed(1234L) // <10>
.setNumTopClasses(1) // <11>
.setClassAssignmentObjective(Classification.ClassAssignmentObjective.MAXIMIZE_ACCURACY) // <11>
.setNumTopClasses(1) // <12>
.build();
// end::put-data-frame-analytics-classification

Expand Down
Loading