Mongo MapReduce - Checking the Standard Output
-
29-10-2019 - |
Question
I am trying to execute mongo mapreduce commands via the java api - com.mongodb.MapReduceCommand . Prior to this, when I was executing the command via the mongo shell, I was able to view the output from the standard output stream. When I invoke the command via the java api, how could I check for any output for progress/error info ?
I have enabled the verbosity to true (by default) .
Thanks!
Solution
The MapReduceCommand is blocking, so there is no way to check the progress. However, you can use MapReduceOutput class to capture the result of a map/reduce operation.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow