我有一个map reduce函数来创建一个我通过spring模板调用的新集合。
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);
}
然而,方法mongoTemplate.mapReduce
会返回集合,我不希望这样,因为它很糟糕,
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
我的新集合返回大约8k的结果,我想在mongo中创建但不返回Java。