How Do I Use MapReduce Commands?
Overview
MapReduce commands are used for executing map-reduce operations on big data.
How Do I Enable MapReduce Commands?
The MapReduce command is controlled by the DDS parameter security.javascriptEnabled. The default value is false, indicating that the mapReduce and group commands are unavailable. If you need to use the MapReduce command, change the parameter value to true. Then, restart the DB instance for the change to take effect.
- For a cluster instance, change the parameter values in the parameter template associated with all shard nodes and restart the instance for the change to take effect.
- For a replica set or single-node instance, change the parameter values in the parameter template associated with the instance and restart the instance for the change to take effect.
For details about how to change parameter values, see Editing a Parameter Template.
Common Errors and Handling Methods for MapReduce Command Execution Failures
Error information: cannot run map reduce without the js engine or map is not defined
Possible cause: MapReduce commands are restricted and cannot be used.
Solution: Change the value of security.javascriptEnabled in the instance parameter template to true and restart the instance for the change to take effect.
If a parameter template is a default parameter template, you are not allowed to change its parameter values. You can create a parameter template and change the corresponding parameter values. After the change, associate the new parameter template with the instance. For details, see Changing the Associated Parameter Template.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot