MapReduceScriptTaskStatus Object Members for SuiteScript

Overview of MapReduceScriptTaskStatus members in NetSuite's N/task module for task management.

·2 min read·View Oracle Docs

MapReduceScriptTaskStatus is a key object in NetSuite's N/task module, crucial for developers managing MapReduce script deployments. Understanding its members allows for effective status monitoring and debugging of tasks within NetSuite.

What Members Does MapReduceScriptTaskStatus Include?

MapReduceScriptTaskStatus offers several methods and properties to assess the current status of a MapReduce task. Here's what you need to know:

Methods

  • getCurrentTotalSize(): Returns the total size in bytes of all work in progress.
  • getPendingMapCount(): Provides the number of records or rows not yet processed by the map stage.
  • getPendingMapSize(): Gives the total bytes outstanding in the map stage.
  • getPendingOutputCount(): Lists the records or rows awaiting processing.
  • getPendingOutputSize(): Shows the total size of all output key-value pairs.
  • getPendingReduceCount(): Displays the records or rows unprocessed in the reduce stage.
  • getPendingReduceSize(): Reflects outstanding bytes in the reduce stage.
  • getPercentageCompleted(): Returns the completion percentage for the current stage.
  • getTotalMapCount(): Shows the total records or rows input to the map stage.
  • getTotalOutputCount(): Reveals the total input records or rows in the output phase.
  • getTotalReduceCount(): Indicates the record or row inputs for the reduce stage.

Properties

  • deploymentId: (string, read-only) The ID of the deployment record.
  • scriptId: (number, read-only) Internal ID for the script record.
  • stage: (string, read-only) Represents the task's current stage.
  • status: (string, read-only) The task's current status, returned as a task.TaskStatus value.
  • taskId: (string, read-only) Links to the specific task by ID.

Who This Affects

This information is invaluable for NetSuite developers and administrators involved in scripting and task management using MapReduce scripts.

Key Takeaways

  • Comprehensive Monitoring: Provides insight into all stages and statuses of MapReduce tasks.
  • Efficient Troubleshooting: Key for identifying and resolving issues in script executions.
  • Asynchronous Processing Insight: Crucial for understanding task flow in an asynchronous environment.

Frequently Asked Questions (4)

How can I track the progress of a Map/Reduce script in NetSuite?
You can track the progress by using the MapReduceScriptTaskStatus object, which provides metrics like current total size, pending map count, pending output count, and percentage completed.
Does the MapReduceScriptTaskStatus object work with both client and server scripts?
The MapReduceScriptTaskStatus object is only supported for server scripts.
Can I use the MapReduceScriptTaskStatus object to manage tasks synchronously?
No, the MapReduceScriptTaskStatus object is intended for tasks triggered asynchronously using the N/task module.
What is the function of the method getPendingMapCount() within the MapReduceScriptTaskStatus object?
The getPendingMapCount() method returns the number of records that are still pending processing in the map stage of the Map/Reduce script.
Source: MapReduceScriptTaskStatus Object Members Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in SuiteScript

View all SuiteScript articles →