[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!
This commit is contained in:
David Roberts 2020-05-08 16:22:45 +01:00 committed by GitHub
parent 83739b5806
commit 9a3924a641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -72,8 +72,8 @@ public class MachineLearningFeatureSet implements XPackFeatureSet {
/** /**
* List of platforms for which the native processes are available * List of platforms for which the native processes are available
*/ */
private static final List<String> mlPlatforms = private static final List<String> mlPlatforms = Collections.unmodifiableList(
Arrays.asList("darwin-x86_64", "linux-x86_64", "windows-x86_64"); Arrays.asList("darwin-x86_64", "linux-aarch64", "linux-x86_64", "windows-x86_64"));
private final boolean enabled; private final boolean enabled;
private final XPackLicenseState licenseState; private final XPackLicenseState licenseState;

View File

@ -122,8 +122,10 @@ public class MachineLearningFeatureSetTests extends ESTestCase {
public void testIsRunningOnMlPlatform() { public void testIsRunningOnMlPlatform() {
assertTrue(MachineLearningFeatureSet.isRunningOnMlPlatform("Linux", "amd64", true)); assertTrue(MachineLearningFeatureSet.isRunningOnMlPlatform("Linux", "amd64", true));
assertTrue(MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "amd64", true)); assertTrue(MachineLearningFeatureSet.isRunningOnMlPlatform("Linux", "aarch64", true));
assertTrue(MachineLearningFeatureSet.isRunningOnMlPlatform("Mac OS X", "x86_64", true)); assertTrue(MachineLearningFeatureSet.isRunningOnMlPlatform("Mac OS X", "x86_64", true));
assertTrue(MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "amd64", true));
assertFalse(MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "arm64", false));
assertFalse(MachineLearningFeatureSet.isRunningOnMlPlatform("Linux", "i386", false)); assertFalse(MachineLearningFeatureSet.isRunningOnMlPlatform("Linux", "i386", false));
assertFalse(MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "i386", false)); assertFalse(MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "i386", false));
assertFalse(MachineLearningFeatureSet.isRunningOnMlPlatform("SunOS", "amd64", false)); assertFalse(MachineLearningFeatureSet.isRunningOnMlPlatform("SunOS", "amd64", false));
@ -131,6 +133,8 @@ public class MachineLearningFeatureSetTests extends ESTestCase {
() -> MachineLearningFeatureSet.isRunningOnMlPlatform("Linux", "i386", true)); () -> MachineLearningFeatureSet.isRunningOnMlPlatform("Linux", "i386", true));
expectThrows(ElasticsearchException.class, expectThrows(ElasticsearchException.class,
() -> MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "i386", true)); () -> MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "i386", true));
expectThrows(ElasticsearchException.class,
() -> MachineLearningFeatureSet.isRunningOnMlPlatform("Windows 10", "arm64", true));
expectThrows(ElasticsearchException.class, expectThrows(ElasticsearchException.class,
() -> MachineLearningFeatureSet.isRunningOnMlPlatform("SunOS", "amd64", true)); () -> MachineLearningFeatureSet.isRunningOnMlPlatform("SunOS", "amd64", true));
} }