{"id":20811543,"url":"https://github.com/nextbreakpoint/flink-client","last_synced_at":"2025-04-07T10:27:30.574Z","repository":{"id":44960024,"uuid":"178469991","full_name":"nextbreakpoint/flink-client","owner":"nextbreakpoint","description":"Java client for managing Apache Flink via REST API","archived":false,"fork":false,"pushed_at":"2025-01-04T06:33:58.000Z","size":150,"stargazers_count":57,"open_issues_count":1,"forks_count":23,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T09:04:34.768Z","etag":null,"topics":["flink","java","openapi"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nextbreakpoint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-29T20:14:29.000Z","updated_at":"2025-02-25T08:55:25.000Z","dependencies_parsed_at":"2025-01-08T23:06:59.788Z","dependency_job_id":null,"html_url":"https://github.com/nextbreakpoint/flink-client","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextbreakpoint%2Fflink-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextbreakpoint%2Fflink-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextbreakpoint%2Fflink-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextbreakpoint%2Fflink-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextbreakpoint","download_url":"https://codeload.github.com/nextbreakpoint/flink-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247634606,"owners_count":20970566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flink","java","openapi"],"created_at":"2024-11-17T20:44:27.477Z","updated_at":"2025-04-07T10:27:30.532Z","avatar_url":"https://github.com/nextbreakpoint.png","language":"Java","readme":"# flink-client\n\nThis library provides a Java client for managing Apache Flink via the [REST API](https://nightlies.apache.org/flink/flink-docs-release-1.20/docs/ops/rest_api/).\n\nThe client is generated with [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) from the \n[OpenAPI specification](https://nightlies.apache.org/flink/flink-docs-release-1.20/generated/rest_v1_dispatcher.yml).\n\n## License\n\nThe library is distributed under the terms of BSD 3-Clause License.\n\n    Copyright (c) 2019-2024, Andrea Medeghini\n    All rights reserved.\n    \n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions are met:\n    \n    * Redistributions of source code must retain the above copyright notice, this\n      list of conditions and the following disclaimer.\n    \n    * Redistributions in binary form must reproduce the above copyright notice,\n      this list of conditions and the following disclaimer in the documentation\n      and/or other materials provided with the distribution.\n    \n    * Neither the name of the copyright holder nor the names of its\n      contributors may be used to endorse or promote products derived from\n      this software without specific prior written permission.\n    \n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n## How to get the binaries\n\nThe library is available in Maven Central Repository, and GitHub.\n\nIf you are using Maven, add this dependency to your POM:\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.nextbreakpoint\u003c/groupId\u003e\n        \u003cartifactId\u003ecom.nextbreakpoint.flink.client\u003c/artifactId\u003e\n        \u003cversion\u003e1.1.4\u003c/version\u003e\n    \u003c/dependency\u003e        \n\n## How to build the library\n\nInstall Java 11 and Maven 3.9.\n\nBuild the library using Maven:\n\n    mvn clean package\n\n## How to generate the code\n\nGenerate the code using Maven:\n\n    mvn clean compile\n\n## How to run the tests\n\nMake sure you have Docker installed and create the required bridge network:\n\n    docker network create flink-test \n \nRun the tests using Maven:\n\n    mvn clean verify\n\n## How to use the library\n\nCreate the Flink client:\n\n    FlinkApi api = new FlinkApi();\n\nConfigure host and port of the server:\n\n    api.getApiClient().setBasePath(\"http://localhost:8081\");\n\nConfigure socket timeouts:\n\n    api.getApiClient().setHttpClient(api.getApiClient().getHttpClient().newBuilder()\n            .connectTimeout(Duration.ofSeconds(20))\n            .writeTimeout(Duration.ofSeconds(30))\n            .readTimeout(Duration.ofSeconds(30))\n            .build());\n\nOptionally enable debugging:\n\n    api.getApiClient().setDebugging(true);\n\nGet Flink cluster configuration:\n\n    DashboardConfiguration config = api.getDashboardConfiguration();\n\nShow list of uploaded jars:\n\n    JarListInfo jars = api.getJarList();\n\nUpload a jar which contain a Flink job:\n\n    JarUploadResponseBody result = api.uploadJar(new File(\"flink-job.jar\"));\n\nRun an uploaded jar which some arguments:\n\n    JarRunResponseBody response = api.submitJobFromJar(\"bf4afb3b-d662-435e-b465-5ddb40d68379_flink-job.jar\", true, null, null, \"--INPUT A --OUTPUT B\", \"your-main-class\", null);\n\nGet status of all jobs:\n\n    JobIdsWithStatusOverview jobs = api.getJobIdsWithStatusesOverview();\n\nGet details of a job:\n\n    JobDetailsInfo details = api.getJobDetails(\"f370f5421e5254eed8d6fc6673829c83\");\n\nTerminate a job:\n\n    api.cancelJob(\"f370f5421e5254eed8d6fc6673829c83\", TerminationMode.CANCEL);\n\nFor all the remaining operations see the documentation of Flink's [REST API](https://nightlies.apache.org/flink/flink-docs-release-1.20/docs/ops/rest_api/).\n\n## Compatibility with Flink REST API\n\nThe library is compatible with Flink REST API v1.\n\nThe current version of the library has been tested against Flink 1.20.0, but the library is known to work with older versions too.   \nThe library should be compatible with newer versions too, unless a breaking change is introduced in the Apache Flink REST API. \n\n## Known limitations\n\nPlease note that some operations haven't been tested and not all fields in the responses are currently verified in the tests.\n \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextbreakpoint%2Fflink-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextbreakpoint%2Fflink-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextbreakpoint%2Fflink-client/lists"}