You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zekai-li (via GitHub)" <gi...@apache.org> on 2023/09/05 01:41:07 UTC

[GitHub] [spark] zekai-li commented on a diff in pull request #42529: [SPARK-44845][YARN][DEPLOY] Fix file system uri comparison function

zekai-li commented on code in PR #42529:
URL: https://github.com/apache/spark/pull/42529#discussion_r1315273750


##########
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala:
##########
@@ -1618,9 +1618,9 @@ private[spark] object Client extends Logging {
       return false
     }
 
-    val srcAuthority = srcUri.getAuthority()
-    val dstAuthority = dstUri.getAuthority()
-    if (srcAuthority != null && !srcAuthority.equalsIgnoreCase(dstAuthority)) {
+    val srcUserInfo = srcUri.getUserInfo()
+    val dstUserInfo = dstUri.getUserInfo()
+    if (srcUserInfo != null && !srcUserInfo.equalsIgnoreCase(dstUserInfo)) {

Review Comment:
   srcUserInfo == null && dstUserInfo ! = null is fine in this case。equalsIgnoreCase I'm not sure if this is correct, but I'm going to follow the same logic as before。But the use of equal is more rigorous。



##########
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala:
##########
@@ -1618,9 +1618,9 @@ private[spark] object Client extends Logging {
       return false
     }
 
-    val srcAuthority = srcUri.getAuthority()
-    val dstAuthority = dstUri.getAuthority()
-    if (srcAuthority != null && !srcAuthority.equalsIgnoreCase(dstAuthority)) {
+    val srcUserInfo = srcUri.getUserInfo()
+    val dstUserInfo = dstUri.getUserInfo()
+    if (srcUserInfo != null && !srcUserInfo.equalsIgnoreCase(dstUserInfo)) {

Review Comment:
   srcUserInfo == null && dstUserInfo ! = null is fine in this case。equalsIgnoreCase I'm not sure if this is correct, but I'm going to follow the same logic as before。But the use of equal is more rigorous。



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org