- 
    Type:
New Feature
 - 
    Resolution: Done
 - 
    Priority:
Major - P3
 - 
    Affects Version/s: None
 - 
    Component/s: API, Configuration
 - 
    None
 
- 
        (copied to CRM)
 
- 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 
I am facing the issue "exception: Exceeded memory limit, Pass allowDiskUse:true to opt in." for the example code
JavaMongoRDD aggregatedRdd = rdd .withPipeline(Arrays.asList(Document.parse(aggregateQuery), Document.parse("{$sort:
{gatewaytime : -1}")));
There are many examples to pass the allowDiskUse:true in mongo db aggregate() method or via mongo client in java.
I did't found any example or help how to pass these type of options using Spark RDD.withPipeline() method or there is any alternate approach better than using allowDiskUse:true.
Thanks in advance.