Uh oh!
There was an error while loading. Please reload this page.
[SPARK-29957][TEST] Reset MiniKDC's default enctypes to fit jdk8/jdk11 - #26594
[SPARK-29957][TEST] Reset MiniKDC's default enctypes to fit jdk8/jdk11#26594AngersZhuuuu wants to merge 14 commits into
Conversation
AngersZhuuuu
commented
Nov 19, 2019
cc @wangyum@dongjoon-hyun |
wangyum
commented
Nov 19, 2019
Thank you @AngersZhuuuu |
wangyum
commented
Nov 19, 2019
ok to test |
SparkQA
commented
Nov 19, 2019
Test build #114072 has finished for PR 26594 at commit
|
wangyum
commented
Nov 19, 2019
retest this please |
SparkQA
commented
Nov 19, 2019
Test build #114083 has finished for PR 26594 at commit
|
AngersZhuuuu
commented
Nov 19, 2019
strange..I can run these failed UT in local with jdk8/jdk11 success. But failed in Jenkines... |
dongjoon-hyun
commented
Nov 24, 2019
Retest this please. |
AngersZhuuuu
commented
Nov 24, 2019
For this. I can pass failed UT by run it alone, but will failed when run all UT together. |
@AngersZhuuuu . I also tested your PR locally. BTW, the first failure was |
dongjoon-hyun
commented
Nov 24, 2019
BTW, if you can find a corresponding Apache Hadoop JIRA issue, that will be more persuasive |
| <slf4j.version>1.7.16</slf4j.version> | ||
| <log4j.version>1.2.17</log4j.version> | ||
| <hadoop.version>2.7.4</hadoop.version> | ||
| <miniKdc.version>3.2.0</miniKdc.version> |
There was a problem hiding this comment.
BTW, miniKdc -> minikdc. As you see, Spark-introduced properties are not camelcase like codahale and htmlunit. If needed, we may use -, but I prefer minikdc here in this case.
There was a problem hiding this comment.
BTW,
miniKdc->minikdc. As you see, Spark-introduced properties are are camelcase likecodahaleandhtmlunit. If needed, we may use-, but I preferminikdchere in this case.
Thank you for your careful explanation. Updated.
AngersZhuuuu
commented
Nov 24, 2019
Hadoop jira: https://issues.apache.org/jira/browse/HADOOP-12911 And in Flink: apache/flink#9622 And when I test hadoop-2.7.2's minikdc in local, the kerberos 's debug error message is read message stream failed, message can't match. |
dongjoon-hyun
commented
Nov 24, 2019
Please summarize them into the PR description~ |
AngersZhuuuu
commented
Nov 24, 2019
Done |
Hmm. It seems that I tested this only at Mac with AdoptOpenJDK8 and 11. How about your environment? I'm wondering if we need to validate this in the linux or not because of the following error message. |
SparkQA
commented
Nov 24, 2019
Test build #114327 has finished for PR 26594 at commit
|
AngersZhuuuu
commented
Nov 24, 2019
I test this in Mac with Oracle Jdk8 and jdk11. I can pass this UT when run it alone. My guess is that there were other tests that affected the environment variables |
Ya. Let me know if you find the root cause. Thanks. |
SparkQA
commented
Nov 24, 2019
Test build #114329 has finished for PR 26594 at commit
|
SparkQA
commented
Nov 24, 2019
Test build #114339 has finished for PR 26594 at commit
|
SparkQA
commented
Nov 24, 2019
Test build #114340 has finished for PR 26594 at commit
|
wangyum
commented
Dec 1, 2019
retest this please |
SparkQA
commented
Dec 1, 2019
Test build #114677 has finished for PR 26594 at commit
|
gaborgsomogyi
commented
Dec 3, 2019
I think the test comment is not yet resolved: https://github.com/apache/spark/pull/26594/files#r350680194 |
AngersZhuuuu
commented
Dec 4, 2019
@gaborgsomogyi@wangyum How about current way ? |
SparkQA
commented
Dec 4, 2019
Test build #114848 has finished for PR 26594 at commit
|
SparkQA
commented
Dec 4, 2019
Test build #114850 has finished for PR 26594 at commit
|
SparkQA
commented
Dec 4, 2019
Test build #114851 has finished for PR 26594 at commit
|
gaborgsomogyi
commented
Dec 4, 2019
The approach looks good, there are still no tests... |
AngersZhuuuu
commented
Dec 4, 2019
Here is in UT ..., I really don't know how to add UT for this, so handle it in if condition when there are no |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
Dec 5, 2019
Test build #114884 has finished for PR 26594 at commit
|
Uh oh!
There was an error while loading. Please reload this page.
| // scalastyle:off println | ||
| writer.println(krb5confStr) | ||
| // scalastyle:on println | ||
| writer.close() |
There was a problem hiding this comment.
Shall we use Files.write(content, file, StandardCharsets.UTF_8) instead of println?
There was a problem hiding this comment.
-valwriter=newPrintWriter(kdc.getKrb5conf)
-// scalastyle:off println- writer.println(krb5confStr)
-// scalastyle:on println- writer.close()
+Files.write(krb5confStr, kdc.getKrb5conf, StandardCharsets.UTF_8)There was a problem hiding this comment.
Shall we use
Files.write(content, file, StandardCharsets.UTF_8)instead ofprintln?
Done thanks.
SparkQA
commented
Dec 6, 2019
Test build #114926 has finished for PR 26594 at commit
|
dongjoon-hyun
left a comment
There was a problem hiding this comment.
+1, LGTM. Merged to master. Thank you, @AngersZhuuuu and all.
gatorsmile
commented
Dec 6, 2019
Thanks, everyone! This is a great fix! |
### What changes were proposed in this pull request? Hadoop jira: https://issues.apache.org/jira/browse/HADOOP-12911 In this jira, the author said to replace origin Apache Directory project which is not maintained (but not said it won't work well in jdk11) to Apache Kerby which is java binding(fit java version). And in Flink: apache/flink#9622 Author show the reason why hadoop-2.7.2's `MminiKdc` failed with jdk11. Because new encryption types of `es128-cts-hmac-sha256-128` and `aes256-cts-hmac-sha384-192` (for Kerberos 5) enabled by default were added in Java 11. Spark with `hadoop-2.7's MiniKdc`does not support these encryption types and does not work well when these encryption types are enabled, which results in the authentication failure. And when I test hadoop-2.7.2's minikdc in local, the kerberos 's debug error message is read message stream failed, message can't match. ### Why are the changes needed? Support jdk11 with hadoop-2.7 ### Does this PR introduce any user-facing change? NO ### How was this patch tested? Existed UT Closesapache#26594 from AngersZhuuuu/minikdc-3.2.0. Lead-authored-by: angerszhu <angers.zhu@gmail.com> Co-authored-by: AngersZhuuuu <angers.zhu@gmail.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
What changes were proposed in this pull request?
Hadoop jira: https://issues.apache.org/jira/browse/HADOOP-12911
In this jira, the author said to replace origin Apache Directory project which is not maintained (but not said it won't work well in jdk11) to Apache Kerby which is java binding(fit java version).
And in Flink: apache/flink#9622
Author show the reason why hadoop-2.7.2's
MminiKdcfailed with jdk11.Because new encryption types of
es128-cts-hmac-sha256-128andaes256-cts-hmac-sha384-192(for Kerberos 5) enabled by default were added in Java 11.Spark with
hadoop-2.7's MiniKdcdoes not support these encryption types and does not work well when these encryption types are enabled, which results in the authentication failure.And when I test hadoop-2.7.2's minikdc in local, the kerberos 's debug error message is read message stream failed, message can't match.
Why are the changes needed?
Support jdk11 with hadoop-2.7
Does this PR introduce any user-facing change?
NO
How was this patch tested?
Existed UT