Created
July 25, 2014 13:34
-
-
Save vblagoje/1651cb77fba86c738fdb to your computer and use it in GitHub Desktop.
New MapReduceTask execute methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Executes this task and stores results in the provided results cache. The results can be | |
* obtained once the execute method completes i.e., execute method is synchronous. | |
* | |
* This variant of execute method minimizes the possibility of the master JVM node exceeding | |
* its allowed maximum heap, especially if objects that are results of the reduce phase have a | |
* large memory footprint and/or multiple MapReduceTasks are executed concurrently on the master | |
* task node. | |
* | |
* @param resultsCache | |
* application provided results cache | |
* @throws CacheException | |
* | |
* @since 7.0 | |
*/ | |
public void execute(Cache<KOut, VOut> resultsCache) throws CacheException { | |
executeHelper(resultsCache.getName()); | |
} | |
/** | |
* Executes this task and stores results in the provided results cache. The results can be | |
* obtained once the execute method completes i.e., execute method is synchronous. | |
* | |
* This variant of execute method minimizes the possibility of the master JVM node exceeding its | |
* allowed maximum heap, especially if objects that are results of the reduce phase have a large | |
* memory footprint and/or multiple MapReduceTasks are executed concurrently on the master task | |
* node. | |
* | |
* @param resultsCache | |
* application provided results cache represented by its name | |
* @throws CacheException | |
* | |
* @since 7.0 | |
*/ | |
public void execute(String resultsCache) throws CacheException { | |
if (resultsCache == null || resultsCache.isEmpty()) { | |
throw new IllegalArgumentException("Results cache can not be " + resultsCache); | |
} | |
executeHelper(resultsCache); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment