static void warnIfPreRelease(final Version version, final boolean isSnapshot, final Logger logger) { if (!version.isRelease() || isSnapshot) { logger.warn( "version [{}] is a pre-release version of Elasticsearch and is not suitable for production", Version.displayVersion(version, isSnapshot)); } }
/** * Returns the minimum compatible version based on the current * version. Ie a node needs to have at least the return version in order * to communicate with a node running the current version. The returned version * is in most of the cases the smallest major version release unless the current version * is a beta or RC release then the version itself is returned. */ public Version minimumCompatibilityVersion() { if (major >= 6) { // all major versions from 6 onwards are compatible with last minor series of the previous major Version bwcVersion = null; for (int i = DeclaredVersionsHolder.DECLARED_VERSIONS.size() - 1; i >= 0; i--) { final Version candidateVersion = DeclaredVersionsHolder.DECLARED_VERSIONS.get(i); if (candidateVersion.major == major - 1 && candidateVersion.isRelease() && after(candidateVersion)) { if (bwcVersion != null && candidateVersion.minor < bwcVersion.minor) { break; } bwcVersion = candidateVersion; } } return bwcVersion == null ? this : bwcVersion; } return Version.min(this, fromId((int) major * 1000000 + 0 * 10000 + 99)); }
static void warnIfPreRelease(final Version version, final boolean isSnapshot, final Logger logger) { if (!version.isRelease() || isSnapshot) { logger.warn( "version [{}] is a pre-release version of Elasticsearch and is not suitable for production", Version.displayVersion(version, isSnapshot)); } }
static void warnIfPreRelease(final Version version, final boolean isSnapshot, final Logger logger) { if (!version.isRelease() || isSnapshot) { logger.warn( "version [{}] is a pre-release version of Elasticsearch and is not suitable for production", Version.displayVersion(version, isSnapshot)); } }
static void warnIfPreRelease(final Version version, final boolean isSnapshot, final Logger logger) { if (!version.isRelease() || isSnapshot) { logger.warn( "version [{}] is a pre-release version of Elasticsearch and is not suitable for production", displayVersion(version, isSnapshot)); } }
/** * Returns the minimum compatible version based on the current * version. Ie a node needs to have at least the return version in order * to communicate with a node running the current version. The returned version * is in most of the cases the smallest major version release unless the current version * is a beta or RC release then the version itself is returned. */ public Version minimumCompatibilityVersion() { if (major >= 6) { // all major versions from 6 onwards are compatible with last minor series of the previous major Version bwcVersion = null; for (int i = DeclaredVersionsHolder.DECLARED_VERSIONS.size() - 1; i >= 0; i--) { final Version candidateVersion = DeclaredVersionsHolder.DECLARED_VERSIONS.get(i); if (candidateVersion.major == major - 1 && candidateVersion.isRelease() && after(candidateVersion)) { if (bwcVersion != null && candidateVersion.minor < bwcVersion.minor) { break; } bwcVersion = candidateVersion; } } return bwcVersion == null ? this : bwcVersion; } return Version.min(this, fromId((int) major * 1000000 + 0 * 10000 + 99)); }
/** * Returns the minimum compatible version based on the current * version. Ie a node needs to have at least the return version in order * to communicate with a node running the current version. The returned version * is in most of the cases the smallest major version release unless the current version * is a beta or RC release then the version itself is returned. */ public Version minimumCompatibilityVersion() { if (major >= 6) { // all major versions from 6 onwards are compatible with last minor series of the previous major Version bwcVersion = null; for (int i = DeclaredVersionsHolder.DECLARED_VERSIONS.size() - 1; i >= 0; i--) { final Version candidateVersion = DeclaredVersionsHolder.DECLARED_VERSIONS.get(i); if (candidateVersion.major == major - 1 && candidateVersion.isRelease() && after(candidateVersion)) { if (bwcVersion != null && candidateVersion.minor < bwcVersion.minor) { break; } bwcVersion = candidateVersion; } } return bwcVersion == null ? this : bwcVersion; } return Version.min(this, fromId((int) major * 1000000 + 0 * 10000 + 99)); }