felixcheung commented on a change in pull request #3307: ZEPPELIN-4005. 
SparkRInterpreter is broken for spark 2.1.3 and 2.2.2
URL: https://github.com/apache/zeppelin/pull/3307#discussion_r257450587
 
 

 ##########
 File path: 
spark/interpreter/src/main/java/org/apache/zeppelin/spark/SparkVersion.java
 ##########
 @@ -86,7 +86,11 @@ public boolean isSpark2() {
   }
 
   public boolean isSecretSocketSupported() {
-    return this.newerThanEquals(SPARK_2_3_1);
+    return this.newerThanEquals(SPARK_2_3_1) ||
+            (this.newerThanEquals(SparkVersion.fromVersionString("2.2.2")) &&
+                    this.olderThan(SparkVersion.fromVersionString("2.3.0"))) ||
+            (this.newerThanEquals(SparkVersion.fromVersionString("2.1.3")) &&
+                    this.olderThan(SparkVersion.fromVersionString("2.2.0")));
 
 Review comment:
   I think this works, but if and only if they are evaluated in the given 
order, which is a bit error prone. might be worthwhile to add a 
`newerThanEqualsPatchVersion` for `2.2.[2+]` type of check

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to