[ 
https://issues.apache.org/jira/browse/FLINK-1907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14543835#comment-14543835
 ] 

ASF GitHub Bot commented on FLINK-1907:
---------------------------------------

Github user rmetzger commented on a diff in the pull request:

    https://github.com/apache/flink/pull/672#discussion_r30330465
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/DataSet.java 
---
    @@ -1337,11 +1336,16 @@ public long count() throws Exception {
        /**
         * Writes a DataSet to the standard output stream (stdout).<br/>
         * For each element of the DataSet the result of {@link 
Object#toString()} is written.
    -    * 
    -    *  @return The DataSink that writes the DataSet.
         */
    -   public DataSink<T> print() {
    -           return output(new PrintingOutputFormat<T>(false));
    +   public void print() {
    +           try {
    +                   List<T> elements = this.collect();
    +                   for (T e: elements) {
    +                           System.out.println(e);
    +                   }
    +           } catch (Exception e) {
    +                   System.out.println("Could not retrieve values for 
printing: " + e);
    --- End diff --
    
    This prints only the message. I would suggest to stringify the exception 
because the error messages coming from `collect()` might come from the remote 
cluster


> Scala Interactive Shell
> -----------------------
>
>                 Key: FLINK-1907
>                 URL: https://issues.apache.org/jira/browse/FLINK-1907
>             Project: Flink
>          Issue Type: New Feature
>          Components: Scala API
>            Reporter: Nikolaas Steenbergen
>            Assignee: Nikolaas Steenbergen
>            Priority: Minor
>
> Build an interactive Shell for the Scala api.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to