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 groups 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 group 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 Group.
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 group to true and restart the instance for the change to take effect.
If a parameter group is a default parameter group, you are not allowed to change its parameter values. You can create a parameter group and change the corresponding parameter values. After the change, associate the new parameter group with the DB instance. For details, see Changing Associated Parameter Group.
Last Article: Which Commands are Supported or Restricted by DDS?
Next Article: Migrating Data
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.