HyukjinKwon commented on a change in pull request #28085:
[SPARK-29641][PYTHON][CORE] Stage Level Sched: Add python api's and tests
URL: https://github.com/apache/spark/pull/28085#discussion_r407330348
##########
File path: core/src/test/java/test/org/apache/spark/JavaAPISuite.java
##########
@@ -897,6 +901,16 @@ public void persist() {
assertEquals(1, rdd.first().intValue());
}
+ @Test
+ public void withResources() {
+ ExecutorResourceRequests ereqs = new ExecutorResourceRequests().cores(4);
+ TaskResourceRequests treqs = new TaskResourceRequests().cpus(1);
+ ResourceProfile rp1 = new
ResourceProfileBuilder().require(ereqs).require(treqs).build();
+ JavaRDD<Integer> in1 = sc.parallelize(Arrays.asList(1, 2, 3, 4));
+ in1.withResources(rp1);
+ assertEquals(rp1, in1.getResourceProfile());
+ }
Review comment:
Out of curiosity, what was the issue in the test?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]