-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ZEPPELIN-1486] Allow configuring whether shown values will be trimmed #1458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
589acda to
e007395
Compare
|
Hi @spektom. Thanks for your contribution :) You said
But it seems there is no docs file change. The below code needs to be added here as well. |
e007395 to
3321e18
Compare
|
@AhyoungRyu Added, thanks for pointing it out to me. |
|
@spektom thanks for the improvement. Can you also update |
3321e18 to
062835f
Compare
|
@r-kamath I've added documentation to the |
conf/zeppelin-env.cmd.template
Outdated
| REM set ZEPPELIN_SPARK_CONCURRENTSQL REM Execute multiple SQL concurrently if set true. false by default. | ||
| REM set ZEPPELIN_SPARK_IMPORTIMPLICIT REM Import implicits, UDF collection, and sql if set true. true by default. | ||
| REM set ZEPPELIN_SPARK_MAXRESULT REM Max number of Spark SQL result to display. 1000 by default. | ||
| REM set ZEPPELIN_SPARK_TRUNCATERESULT REM Truncate long strings in SQL display. false by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like Livy only feature for now. How about removing env here and .sh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree to remove it from env.sh and site.xml, env.sh and site.xml is for zeppelin server rather than interpreter.
|
@spektom I agree with you not to add zeppelin-env.* because it depends on Live only. |
062835f to
e4c9abd
Compare
| "zeppelin.livy.spark.sql.truncateResult": { | ||
| "envName": "ZEPPELIN_LIVY_TRUNCATERESULT", | ||
| "propertyName": "zeppelin.livy.spark.sql.truncateResult", | ||
| "defaultValue": "false", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it make more sense to set true by default ? As it is truncated in spark by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
| property.get("zeppelin.livy.spark.sql.maxResult") + ")", | ||
| property.get("zeppelin.livy.spark.sql.maxResult") + "," + | ||
| property.get("zeppelin.livy.spark.sql.truncateResult") + ")", | ||
| interpreterContext, userSessionMap); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What error will be displayed in frontend if I set invalid value for zeppelin.livy.spark.sql.truncateResult ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There will be an exception thrown. I don't think every property must be checked for validity in an explicit way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of exception do you see in frontend ? If user set an invalid value like 'F' and if the exception in frontend doesn't imply that, then it might be better to verify the property in method open(), otherwise it is hard to figure out what is wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see whether zeppelin.livy.spark.sql.maxResult or any other property is validated in any place. What's special about zeppelin.livy.spark.sql.truncateResult? Moreover, in my opinion, if user doesn't read documentation, and sets something completely wrong - it is his own problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spektom I hate to be the bearer of bad news but Zeppelin is being adopted by many Enterprises and unforuantely in most cases I agree that it's the users problem. But if you are going to be committing to software that is going to be used by large enterprises then I would expect validation to occur. I am actually going to raise these issues with my Hadoop vendor.
docs/interpreter/livy.md
Outdated
| </tr> | ||
| <tr> | ||
| <td>zeppelin.livy.spark.sql.truncateResult</td> | ||
| <td>false</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true by default ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
e4c9abd to
8634387
Compare
8634387 to
303a8bc
Compare
|
Are you trying to say that people working for enterprise companies require
|
|
Well we will just agree to disagree |
|
Also input validation is secure java coding best practice regardless.. http://www.oracle.com/technetwork/java/seccodeguide-139067.html#5 |
close #83 close #86 close #125 close #133 close #139 close #146 close #193 close #203 close #246 close #262 close #264 close #273 close #291 close #299 close #320 close #347 close #389 close #413 close #423 close #543 close #560 close #658 close #670 close #728 close #765 close #777 close #782 close #783 close #812 close #822 close #841 close #843 close #878 close #884 close #918 close #989 close #1076 close #1135 close #1187 close #1231 close #1304 close #1316 close #1361 close #1385 close #1390 close #1414 close #1422 close #1425 close #1447 close #1458 close #1466 close #1485 close #1492 close #1495 close #1497 close #1536 close #1545 close #1561 close #1577 close #1600 close #1603 close #1678 close #1695 close #1739 close #1748 close #1765 close #1767 close #1776 close #1783 close #1799
What is this PR for?
This patch improves Livy interpreter behavior: it allows configuring whether shown values will be trimmed or not.
What type of PR is it?
Improvement
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1486
How should this be tested?
zeppelin.livy.spark.sql.truncateResulttotrueScreenshots (if appropriate)
Questions:
zeppelin.livy.spark.sql.truncateResultoption.