license: | Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

  https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

REST API

Celeborn supports REST API and available for both master and worker. The endpoints are mounted at host:port. For example, for the master, they would typically be accessible at http://<master-http-host>:<master-http-port><path>, and for the worker, at http://<worker-http-host>:<worker-http-port><path>.

And the swagger UI is available at http://<http-host>:<http-port>/swagger (since 0.5.0) both for master and worker.

The configuration of <master-http-host>, <master-http-port>, <worker-http-host>, <worker-http--port> as below:

KeyDefaultDescriptionSince
celeborn.master.http.host0.0.0.0Master's http host.0.4.0
celeborn.master.http.port9098Master's http port.0.4.0
celeborn.worker.http.host0.0.0.0Worker's http host.0.4.0
celeborn.worker.http.port9096Worker's http port.0.4.0

Deprecated REST APIs

Since 0.6.0, the legacy REST APIs are deprecated and will be removed in the future. The new REST APIs are available at /api/v1. See the migration guide for API mappings.

Master

PathMethodParametersMeaning
/applicationsGETList all running application's ids of the cluster.
/confGETList the conf setting of the master.
/excludedWorkersGETList all excluded workers of the master.
/helpGETList the available API providers of the master.
/hostnamesGETList all running application‘s LifecycleManager’s hostnames of the cluster.
/listDynamicConfigsGETlevel=${LEVEL} tenant=${TENANT} name=${NAME}List the dynamic configs of the master. The parameter level specifies the config level of dynamic configs. The parameter tenant specifies the tenant id of TENANT or TENANT_USER level. The parameter name specifies the user name of TENANT_USER level. Meanwhile, either none or all of the parameter tenant and name are specified for TENANT_USER level.
/lostWorkersGETList all lost workers of the master.
/masterGroupInfoGETList master group information of the service. It will list all master's LEADER, FOLLOWER information.
/metrics/prometheusGETList the metrics data in prometheus format of the master. The url path is defined by configure celeborn.metrics.prometheus.path.
/shuffleGETList all running shuffle keys of the service. It will return all running shuffle's key of the cluster.
/shutdownWorkersGETList all shutdown workers of the master.
/decommissionWorkersGETList all decommission workers of the master.
/threadDumpGETList the current thread dump of the master.
/workerEventInfoGETList all worker event information of the master.
/workerInfoGETList worker information of the service. It will list all registered workers' information.
/excludePOSTadd=${ADD_WORKERS} remove=${REMOVE_WORKERS}Excluded workers of the master add or remove the worker manually given worker id. The parameter add or remove specifies the excluded workers to add or remove, which value is separated by commas.
/sendWorkerEventPOSTtype=${EVENT_TYPE} workers=${WORKERS}For Master(Leader) can send worker event to manager workers. Legal types are ‘None’, ‘Immediately’, ‘Decommission’, ‘DecommissionThenIdle’, ‘Graceful’, ‘Recommission’, and the parameter workers is separated by commas.

Worker

PathMethodParametersMeaning
/applicationsGETList all running application's ids of the worker. It only return application ids running in that worker.
/confGETList the conf setting of the worker.
/helpGETList the available API providers of the worker.
/isRegisteredGETShow if the worker is registered to the master success.
/isShutdownGETShow if the worker is during the process of shutdown.
/isDecommissioningGETShow if the worker is during the process of decommission.
/listDynamicConfigsGETlevel=${LEVEL} tenant=${TENANT} name=${NAME}List the dynamic configs of the worker. The parameter level specifies the config level of dynamic configs. The parameter tenant specifies the tenant id of TENANT or TENANT_USER level. The parameter name specifies the user name of TENANT_USER level. Meanwhile, either none or all of the parameter tenant and name are specified for TENANT_USER level.
/listPartitionLocationInfoGETList all the living PartitionLocation information in that worker.
/metrics/prometheusGETList the metrics data in prometheus format of the worker. The url path is defined by configure celeborn.metrics.prometheus.path.
/shuffleGETList all the running shuffle keys of the worker. It only return keys of shuffles running in that worker.
/threadDumpGETList the current thread dump of the worker.
/unavailablePeersGETList the unavailable peers of the worker, this always means the worker connect to the peer failed.
/workerInfoGETList the worker information of the worker.
/exitPOSTtype=${EXIT_TYPE}Trigger this worker to exit. Legal types are ‘Decommission’, ‘Graceful’ and ‘Immediately’.

/api/v1 APIs (Since 0.6.0)

Master

See the master openapi spec yaml in the repo openapi/openapi-client/src/main/openapi3/master_rest_v1.yaml, or use the Swagger Editor online for visualization.

Worker

See the worker openapi spec yaml in the repo openapi/openapi-client/src/main/openapi3/worker_rest_v1.yaml, or use the Swagger Editor online for visualization.