You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-23 11:41:02 +03:00
MCOL-5594: Interactive "mcs cluster stop" command for CMAPI. (#3024)
* MCOL-5594: Interactive "mcs cluster stop" command for CMAPI. [add] NodeProcessController class to handle Node operations [add] two endpoints: stop_dmlproc (PUT) and is_process_running (GET) [add] NodeProcessController.put_stop_dmlproc method to separately stop DMLProc on primary Node [add] NodeProcessController.get_process_running method to check if specified process running or not [add] build_url function to helpers.py. It needed to build urls with query_params [add] MCSProcessManager.gracefully_stop_dmlproc method [add] MCSProcessManager.is_service_running method as a top level wrapper to the same method in dispatcher [fix] MCSProcessManager.stop by using new gracefully_stop_dmlproc [add] interactive option and mode to mcs cluster stop command [fix] requirements.txt with typer version to 0.9.0 where supports various of features including "Annotated" [fix] requirements.txt click version (8.1.3 -> 8.1.7) and typing-extensions (4.3.0 -> 4.8.0). This is dependencies for typer package. [fix] multiple minor formatting, docstrings and comments * MCOL-5594: Add new CMAPI transaction manager. - [add] TransactionManager ContextDecorator to manage transactions in less code and in one place - [add] TransactionManager to cli cluster stop command and to API cluster shutdown command - [fix] id -> txn_id in ClusterHandler class - [fix] ClusterHandler.shutdown class to use inside existing transaction - [add] docstrings in multiple places * MCOL-5594: Review fixes.
This commit is contained in:
@ -6,7 +6,7 @@ from cmapi_server.controllers.endpoints import (
|
||||
StatusController, ConfigController, BeginController, CommitController,
|
||||
RollbackController, StartController, ShutdownController,
|
||||
ExtentMapController, ClusterController, ApiKeyController,
|
||||
LoggingConfigController, AppController
|
||||
LoggingConfigController, AppController, NodeProcessController
|
||||
)
|
||||
|
||||
from cmapi_server.controllers.s3dataload import S3DataLoadController
|
||||
@ -241,6 +241,26 @@ dispatcher.connect(
|
||||
)
|
||||
|
||||
|
||||
# /_version/node/stop_dmlproc/ (PUT)
|
||||
dispatcher.connect(
|
||||
name = 'stop_dmlproc',
|
||||
route = f'/cmapi/{_version}/node/stop_dmlproc',
|
||||
action = 'put_stop_dmlproc',
|
||||
controller = NodeProcessController(),
|
||||
conditions = {'method': ['PUT']}
|
||||
)
|
||||
|
||||
|
||||
# /_version/node/is_process_running/ (PUT)
|
||||
dispatcher.connect(
|
||||
name = 'is_process_running',
|
||||
route = f'/cmapi/{_version}/node/is_process_running',
|
||||
action = 'get_process_running',
|
||||
controller = NodeProcessController(),
|
||||
conditions = {'method': ['GET']}
|
||||
)
|
||||
|
||||
|
||||
def jsonify_error(status, message, traceback, version): \
|
||||
# pylint: disable=unused-argument
|
||||
"""JSONify all CherryPy error responses (created by raising the
|
||||
|
Reference in New Issue
Block a user