Skip to content

Commit b6afa7c

Browse files
committed
[ML] Adjust list of platforms that have ML native code (#56426)
Native code is now available for linux-aarch64. Note that it is _not_ currently supported!
1 parent 45b44de commit b6afa7c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MachineLearningFeatureSet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ public class MachineLearningFeatureSet implements XPackFeatureSet {
7272
/**
7373
* List of platforms for which the native processes are available
7474
*/
75-
private static final List<String> mlPlatforms =
76-
Arrays.asList("darwin-x86_64", "linux-x86_64", "windows-x86_64");
75+
private static final List<String> mlPlatforms = Collections.unmodifiableList(
76+
Arrays.asList("darwin-x86_64", "linux-aarch64", "linux-x86_64", "windows-x86_64"));
7777

7878
private final boolean enabled;
7979
private final XPackLicenseState licenseState;

x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MachineLearningFeatureSetTests.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,19 @@ public void init() {
122122

123123
public void testIsRunningOnMlPlatform() {
124124
assertTrue(MachineLearningFeatureSet.isRunningOnMlPlatform("Linux", "amd64", true));
125-
assertTrue(MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "amd64", true));
125+
assertTrue(MachineLearningFeatureSet.isRunningOnMlPlatform("Linux", "aarch64", true));
126126
assertTrue(MachineLearningFeatureSet.isRunningOnMlPlatform("Mac OS X", "x86_64", true));
127+
assertTrue(MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "amd64", true));
128+
assertFalse(MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "arm64", false));
127129
assertFalse(MachineLearningFeatureSet.isRunningOnMlPlatform("Linux", "i386", false));
128130
assertFalse(MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "i386", false));
129131
assertFalse(MachineLearningFeatureSet.isRunningOnMlPlatform("SunOS", "amd64", false));
130132
expectThrows(ElasticsearchException.class,
131133
() -> MachineLearningFeatureSet.isRunningOnMlPlatform("Linux", "i386", true));
132134
expectThrows(ElasticsearchException.class,
133135
() -> MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "i386", true));
136+
expectThrows(ElasticsearchException.class,
137+
() -> MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "arm64", true));
134138
expectThrows(ElasticsearchException.class,
135139
() -> MachineLearningFeatureSet.isRunningOnMlPlatform("SunOS", "amd64", true));
136140
}

0 commit comments

Comments
 (0)