mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Add limit of display
This commit is contained in:
parent
9a21aa0a64
commit
89a2811853
2 changed files with 8 additions and 2 deletions
|
|
@ -10,6 +10,12 @@
|
|||
"propertyName": null,
|
||||
"defaultValue": "--runner=InProcessPipelineRunner",
|
||||
"description": "Scio interpreter wide arguments"
|
||||
},
|
||||
"zeppelin.scio.maxResult": {
|
||||
"envName": "ZEPPELIN_SCIO_MAXRESULT",
|
||||
"propertyName": "zeppelin.scio.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of SCollection result to display."
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import scala.reflect.ClassTag
|
|||
|
||||
package object scio {
|
||||
private val SCollectionEmptyMsg = "\n%html <font color=red>Result SCollection is empty!</font>\n"
|
||||
private val maxResults = 1000
|
||||
private val maxResults = Integer.getInteger("zeppelin.scio.maxResult", 1000)
|
||||
|
||||
private def materialize[T: ClassTag](self: SCollection[T]) = {
|
||||
val f = self.materialize
|
||||
|
|
@ -34,7 +34,7 @@ package object scio {
|
|||
|
||||
private def notifIfTruncated(it: Iterator[_]): Unit = {
|
||||
if(it.hasNext)
|
||||
println("\n<font color=red>Results are limited to " + maxResults + ".</font>\n")
|
||||
println("\n<font color=red>Results are limited to " + maxResults + " rows.</font>\n")
|
||||
}
|
||||
|
||||
// TODO: scala 2.11
|
||||
|
|
|
|||
Loading…
Reference in a new issue