title: Spring Mongo Template calling mapreduce remotely
body: <p>I have a map reduce function to create a new collection that I am calling through my spring template. </p>
  
  <pre><code>    public void mapReduce(String mapFile, String reduceFile, String finalizeFile, String collection_out )
  {
      mongoTemplate.mapReduce(COLLECTION_NAME, mapFile, reduceFile,
              options().finalizeFunction(finalizeFile).outputCollection(collection_out), DBObject.class);
  
  }
  </code></pre>
  
  <p>However the method <code>mongoTemplate.mapReduce</code> returns the collection, I do not want this as it is crappy out my,</p>
  
  <pre><code>Exception in thread "ajp-bio-8009-AsyncTimeout" java.lang.OutOfMemoryError: GC overhead limit exceeded
  Exception in thread "http-bio-8080-AsyncTimeout" Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" Exception in thread "application-1" java.lang.OutOfMemoryError: GC overhead limit exceeded
  java.lang.OutOfMemoryError: GC overhead limit exceeded
  java.lang.OutOfMemoryError: GC overhead limit exceeded
  </code></pre>
  
  <p>My new collection is returning about 8k of results, I want this created in mongo but not returned to Java. </p>