[SPARK-22660][BUILD] Use position() and limit() to fix ambiguity issue in scala-2.12#19854
[SPARK-22660][BUILD] Use position() and limit() to fix ambiguity issue in scala-2.12#19854kellyzly wants to merge 4 commits intoapache:masterfrom
Conversation
srowen
left a comment
There was a problem hiding this comment.
This kind of change is fine as it's backwards-compatible, if it resolves a real compiler issues later. But collect as many of this type of problem in this PR rather than across several.
|
Test build #4001 has finished for PR 19854 at commit
|
|
ok to test |
|
Test build #84344 has finished for PR 19854 at commit
|
|
Let's fix the title to |
There was a problem hiding this comment.
This exceeds 100 character length limit. See the logs in Jenkins tests.
There was a problem hiding this comment.
This change isn't valid and isn't related
There was a problem hiding this comment.
Sure I can remove the comment like " sun.misc.Cleaner is not used in JDK9(see SPARK-22659), we can use CleanUtil in HADOOP-12760 to solve it"
sun.misc.Cleaner has moved to a new location in OpenJDK 9. If uncommenting code about Cleaner, compile will fail. Cleaner is used to release memory. If commenting code about cleaner, there maybe some function lost. Can you give me some suggestions?
There was a problem hiding this comment.
@srowen : have deleted changes about Platform.java. So current pr is only for solving problems met in scala-2.12 and can not fix the problem about JDK9.
There was a problem hiding this comment.
I think the direct reference should be scala/bug#10418.
There was a problem hiding this comment.
And we should not leave commented code.
There was a problem hiding this comment.
yes, the change to the putAll is similar as the solution provided in scala/bug#10418
There was a problem hiding this comment.
ditto. I think it is better to remove commented code and refer to scala/bug#10418.
|
Ping @kellyzly |
|
Test build #84525 has finished for PR 19854 at commit
|
| props.put("offsets.topic.num.partitions", "1") | ||
| props.putAll(withBrokerProps.asJava) | ||
| // props.putAll(withBrokerProps.asJava) | ||
| withBrokerProps.foreach{ case (k, v) => props.put(k, v) } |
|
Test build #84540 has finished for PR 19854 at commit
|
|
Please fix the title and also fulfill the PR description. |
|
thanks @HyukjinKwon ,@srowen, @viirya 's review |
|
Merged to master |
…a-2.12 and JDK9
What changes were proposed in this pull request?
Some compile error after upgrading to scala-2.12
The limit method was moved from ByteBuffer to the superclass Buffer and it can no longer be called without (). The same reason for position method.
This is because the key type is Object instead of String which is unsafe.
How was this patch tested?
running tests
Please review http://spark.apache.org/contributing.html before opening a pull request.