Map/Reduce Terminology
Term |
Definition |
More Information |
---|---|---|
buffer size |
A script deployment option that sets the number of key-value pairs a map or reduce job can process before saving progress to the database. As a general best practice, leave this value set to 1. |
|
context object |
An object that provides information about the current execution context of a map/reduce script. Includes properties and methods for accessing and manipulating data. |
|
deployment instance |
A task that processes a script deployment. Created when a deployment is submitted for processing. Only one unfinished instance of a particular script deployment can exist at any time. |
|
exitOnError |
Controls script behavior when an error interrupts a map or reduce function. If exitOnError is true and retries are used up, the script exits the current stage and moves to the summarize stage. |
|
function invocation |
An execution of a function. Some functions, like getInputData and summarize, are only invoked one time. Others, like map and reduce, are invoked multiple times. For example, if the getInputData stage provides 20 key-value pairs to the map stage, then the map function is invoked 20 times, one time for each pair. |
|
getInputData |
The first stage in the processing of a map/reduce script. In this stage, your script returns an object that becomes a list of key-value pairs. Use the getInputData entry point to specify the function for this stage. |
|
governance |
A system of rules governing your usage of NetSuite. Each script type, including map/reduce, has its own limits. |
|
hard limit |
A map/reduce limit that interrupts the function if exceeded. Make sure you follow the Map/Reduce Script Best Practices section in the SuiteScript Developer Guide to avoid problems with hard limits. |
|
job |
A unit of execution handled by SuiteCloud Processors. Map/reduce scripts are processed in multiple jobs. Each stage has at least one job. |
|
map |
The second stage of a map/reduce script. A map function is optional, but your script must use either a map or reduce function (or both). The map function processes data from the getInputData stage. The map function runs one time for each key-value pair. |
|
map/reduce |
A computing paradigm designed for the processing of large data sets. |
|
map/reduce script type |
A SuiteScript 2.x script type that uses the map/reduce paradigm. |
|
parallel stage |
A stage that can be handled by multiple jobs at the same time. The map and reduce stages are parallel stages. See also serial stage. |
|
priority |
A job property. Job priority determines the order in which the scheduler sends jobs to the processor pool. You can set priorities on the deployment record or on the SuiteCloud Processors Priority Settings Page. |
|
processor |
In the context of SuiteCloud Processors, a virtual unit of processing power that executes a job. It's a single processing thread, not a physical entity. |
|
processor pool |
The total processing power available to your NetSuite account. The number of processors available varies depending on your licensing. The Concurrency Limit field on the script deployment record determines how many processors are used. |
|
reduce |
The fourth stage of a map/reduce script. A reduce function is optional, but your script must use either a map or reduce function (or both). When used, a reduce function processes data provided by the getInputData stage or, if a map function is used, by the map stage. The reduce function runs once for each unique key. Each unique key passed to the reduce function has an array of values. |
|
retryCount |
A setting that applies when a map or reduce function is interrupted by an error or server restart. It determines whether the system retries the function for uncertain key-value pairs. |
|
script deployment |
Script execution settings. These settings are stored in a deployment record. To run a map/reduce script, create a deployment record and submit it. |
|
serial stage |
A stage that's handled by a single job. Examples of serial stages include getInputData, shuffle, and summarize. |
|
shuffle |
The third stage of a map/reduce script. This stage matters if you're using a reduce function. The shuffle stage sorts data from getInputData or the map stage. The shuffle stage creates unique key-value pairs with array values. These pairs are sent to the reduce stage for more processing. |
|
soft limit |
A governance rule that makes a job yield when surpassed. When the job yields, its work is rescheduled. Soft limit progress is checked after a function finishes. Therefore this limit won't interrupt a function. |
|
SuiteCloud Processors |
Handles map/reduce and scheduled scripts. |
|
summarize |
The final stage of a map/reduce script. You can use this stage to log data about the work of the script. |
|
task |
The set of work that represents a map/reduce deployment that has been submitted for processing. Each task has at least five jobs, one per stage. |
|
yielding |
A behavior that helps map/reduce scripts manage resources. When a job surpasses a soft limit, it yields and its work is rescheduled. Yielding won't interrupt a function. Note also that this process is automatic. SuiteScript 2.x does not contain an API that lets you force a script to yield. |