Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/19885#discussion_r154819072
--- Diff:
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
---
@@ -1428,6 +1428,12 @@ private object Client extends Logging {
return false
}
+ val srcAuthority = srcUri.getAuthority()
+ val detAuthority = dstUri.getAuthority()
+ if (srcAuthority != detAuthority || (srcAuthority != null &&
!srcAuthority.equalsIgnoreCase(detAuthority))) {
--- End diff --
This compares two strings in a case-sensitive and case-insensitive way; I
presume it's supposed to be case-insensitive but this will cause authority
"foo" and "Foo" to return false though they're the same string ignoring case.
Did this mean a null-safe comparison like ...
```
if ((srcAuthority == null && dstAuthority != null) ||
(srcAuthority != null && !srcAuthority.equalsIgnoreCase(dstAuthority)) {
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]