zjffdu commented on a change in pull request #3341: ZEPPELIN-4038. Deprecate spark 2.2 and earlier URL: https://github.com/apache/zeppelin/pull/3341#discussion_r268960050
########## File path: spark/interpreter/src/main/java/org/apache/zeppelin/spark/Utils.java ########## @@ -178,4 +184,20 @@ public static String getUserName(AuthenticationInfo info) { } return uName; } + + public static void printDeprecateMessage(SparkVersion sparkVersion, + InterpreterContext context, + Properties properties) throws InterpreterException { + context.out.clear(); + if (sparkVersion.olderThan(SparkVersion.SPARK_2_2_0) + && Boolean.parseBoolean( + properties.getProperty("zeppelin.spark.deprecatedMsg.show", "true"))) { + try { + context.out.write(DEPRRECATED_MESSAGE); + context.out.write("%text "); + } catch (IOException e) { Review comment: Indeed, but I have to catch and throw this Exception here. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services