{"record":{"id":"2052a788003db33d","repo":"apache/beam","slug":"support-for-elasticsearch-cluster-version-will-be-dropped-in","errorCode":null,"errorMessage":"Support for Elasticsearch cluster version {} will be dropped in a future release of the Apache Beam SDK","messagePattern":"Support for Elasticsearch cluster version (.+?) will be dropped in a future release of the Apache Beam SDK","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"sdks/java/io/elasticsearch/src/main/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIO.java","lineNumber":2998,"sourceCode":"          } else {\n            LOG.warn(\"ES Cluster is responding with HTP 429 - TOO_MANY_REQUESTS.\");\n          }\n        }\n        throw new IOException(String.format(RETRY_FAILED_LOG, attempt));\n      }\n\n      @Teardown\n      public void closeClient() throws IOException {\n        if (restClient != null) {\n          restClient.close();\n        }\n      }\n    }\n  }\n\n  private static void maybeLogVersionDeprecationWarning(int clusterVersion) {\n    if (DEPRECATED_CLUSTER_VERSIONS.contains(clusterVersion)) {\n      LOG.warn(\n          \"Support for Elasticsearch cluster version {} will be dropped in a future release of \"\n              + \"the Apache Beam SDK\",\n          clusterVersion);\n    }\n  }\n\n  static int getBackendVersion(RestClient restClient) {\n    try {\n      Request request = new Request(\"GET\", \"\");\n      Response response = restClient.performRequest(request);\n      JsonNode jsonNode = parseResponse(response.getEntity());\n      int backendVersion =\n          Integer.parseInt(jsonNode.path(\"version\").path(\"number\").asText().substring(0, 1));\n      checkArgument(\n          VALID_CLUSTER_VERSIONS.contains(backendVersion),\n          \"The Elasticsearch version to connect to is %s.x. \"\n              + \"This version of the ElasticsearchIO is only compatible with \"\n              + \"Elasticsearch \"","sourceCodeStart":2980,"sourceCodeEnd":3016,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/elasticsearch/src/main/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIO.java#L2980-L3016","documentation":"ElasticsearchIO maintains a list of Elasticsearch major cluster versions scheduled for removal from support. When the sink connects and reads the cluster version, it checks that list and logs this deprecation warning so operators can plan an upgrade before the SDK drops compatibility.","triggerScenarios":"Running an ElasticsearchIO read/write whose connection targets an Elasticsearch cluster whose major version is in DEPRECATED_CLUSTER_VERSIONS (e.g. version 2 or other legacy majors).","commonSituations":"Teams running older self-managed Elasticsearch clusters (or legacy managed offerings) upgrade the Beam SDK but not the database, and see the warning at pipeline startup after version sniffing.","solutions":["Upgrade the Elasticsearch cluster to a supported major version","Pin an older Beam SDK release if an immediate cluster upgrade is impossible","Track the Beam release notes for the date support for that cluster version is removed"],"exampleFix":"// before\n// pipeline writes to Elasticsearch 2.4 cluster\nElasticsearchIO.write().withConnectionConfiguration(DiscoveryAndFiltering.of(\"es-legacy-host\", 9200))\n// after\n// upgrade cluster to a supported version first, then same code emits no warning\nElasticsearchIO.write().withConnectionConfiguration(DiscoveryAndFiltering.of(\"es-host\", 9200))","handlingStrategy":"validation","validationCode":"// check cluster version before deploying\nGET / returned version.major; if (deprecatedVersions.contains(major)) { planUpgrade(); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin Elasticsearch clusters to supported major versions in infrastructure-as-code","Check Beam release notes for DEPRECATED_CLUSTER_VERSIONS changes before SDK upgrades","Add a pre-deployment smoke test that connects and logs the cluster version"],"tags":["java","apache-beam","elasticsearch","deprecation"],"backgroundTag":"deprecated-api-usage","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}