dongjoon-hyun commented on code in PR #36900:
URL: https://github.com/apache/spark/pull/36900#discussion_r900529739


##########
launcher/src/main/java/org/apache/spark/launcher/SparkSubmitCommandBuilder.java:
##########
@@ -401,8 +401,7 @@ boolean isClientMode(Map<String, String> userProps) {
    * Return whether the given main class represents a thrift server.
    */
   private boolean isThriftServer(String mainClass) {
-    return (mainClass != null &&
-      
mainClass.equals("org.apache.spark.sql.hive.thriftserver.HiveThriftServer2"));
+    return 
("org.apache.spark.sql.hive.thriftserver.HiveThriftServer2".equals(mainClass));

Review Comment:
   Is this needed? It looks like we already have some defensive code for this 
`private boolean isThriftServer`.
   
   
https://github.com/apache/spark/blob/cb0ef06b641845be5774b18c9c24d67c6ab4561a/launcher/src/main/java/org/apache/spark/launcher/SparkSubmitCommandBuilder.java#L235



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to