From 277c6b6e052bb0415c793478e5cdfa5511dfbc56 Mon Sep 17 00:00:00 2001 From: Louis Chu Date: Mon, 5 Feb 2024 18:00:16 -0800 Subject: [PATCH] Refactor the whole config section Signed-off-by: Louis Chu --- docs/user/interfaces/asyncqueryinterface.rst | 38 ++++++++++++-------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/docs/user/interfaces/asyncqueryinterface.rst b/docs/user/interfaces/asyncqueryinterface.rst index 7adc935b47..8cc7c6fec9 100644 --- a/docs/user/interfaces/asyncqueryinterface.rst +++ b/docs/user/interfaces/asyncqueryinterface.rst @@ -20,20 +20,30 @@ All the queries to be executed on spark execution engine can only be submitted v Required Spark Execution Engine Config for Async Query APIs =========================================================== -Currently, we only support AWS EMRServerless as SPARK execution engine. The details of execution engine should be configured under -``plugins.query.executionengine.spark.config`` in cluster settings. The value should be a stringified json comprising of ``applicationId``, ``executionRoleARN``,``region``, ``sparkSubmitParameter``. -Sample Setting Value :: - - plugins.query.executionengine.spark.config: - '{ "applicationId":"xxxxx", - "executionRoleARN":"arn:aws:iam::***********:role/emr-job-execution-role", - "region":"eu-west-1", - "sparkSubmitParameter": "--conf spark.dynamicAllocation.enabled=false" - }' -The user must be careful before transitioning to a new application or region, as changing these parameters might lead to failures in the retrieval of results from previous async query jobs. -The system relies on the default AWS credentials chain for making calls to the EMR serverless application. It is essential to confirm that the default credentials possess the necessary permissions to pass the role required for EMR job execution, as specified in the engine configuration. -* ``applicationId``, ``executionRoleARN`` and ``region`` are required parameters. -* ``sparkSubmitParameter`` is an optional parameter. It can take the form ``--conf A=1 --conf B=2 ...``. +Currently, the system supports only AWS EMRServerless as the SPARK execution engine. Configuration details for the execution engine should be specified under ``plugins.query.executionengine.spark.config`` in the opensearch.yml or cluster settings. The configuration value is expected to be a JSON string that includes ``applicationId``, ``executionRoleARN``, ``region``, and ``sparkSubmitParameter``. + +Sample Setting Value in opensearch.yml +-------------------- + +.. code-block:: yaml + + "plugins.query.executionengine.spark.config: '{\"applicationId\":\"xxxxx\",\"executionRoleARN\":\"arn:aws:iam::xxxxx:role/emr-job-execution-role\",\"region\":\"us-west-2\", \"sparkSubmitParameters\": \"--conf spark.dynamicAllocation.enabled=false\"}'" + +Caution +------- + +Users must exercise caution when transitioning to a new application or region, as changes to these parameters may lead to failures in retrieving results from previous asynchronous query jobs. + +The system utilizes the default AWS credentials chain for calls to the EMR serverless application. It is critical to ensure that the default credentials have the necessary permissions to assume the role required for EMR job execution, as delineated in the engine configuration. + +Requirements +------------- + +- **Required Parameters**: ``applicationId``, ``executionRoleARN``, and ``region`` must be provided. +- **Optional Parameter**: ``sparkSubmitParameter`` is optional and can be formatted as ``--conf A=1 --conf B=2 ...``. + +AWS CloudWatch metrics configuration +------------- Starting with Flint 0.1.1, users can utilize AWS CloudWatch as an external metrics sink while configuring their own metric sources. Below is an example of a console request for setting this up: