[jira] [Updated] (FLINK-3881) Error in Java 8 Documentation Sample

2016-05-07 Thread Mans Singh (JIRA)

 [ 
https://issues.apache.org/jira/browse/FLINK-3881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mans Singh updated FLINK-3881:
--
Labels: documentation java8 sample  (was: docuentation java8 sample)

> Error in Java 8 Documentation Sample
> 
>
> Key: FLINK-3881
> URL: https://issues.apache.org/jira/browse/FLINK-3881
> Project: Flink
>  Issue Type: Bug
>  Components: Documentation
>Affects Versions: 1.0.3
> Environment: All
>Reporter: Mans Singh
>Assignee: Mans Singh
>Priority: Minor
>  Labels: documentation, java8, sample
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The java8 documentation 
> (https://ci.apache.org/projects/flink/flink-docs-master/apis/java8.html) has 
> samples, one of them included below:
> {code:java}
> DataSet input = env.fromElements(1, 2, 3);
> // collector type must be declared
> input.flatMap((Integer number, Collector out) -> {
> for(int i = 0; i < number; i++) {
> out.collect("a");
> }
> })
> // returns "a", "a", "aa", "a", "aa" , "aaa"
> .print();
> {code}
> I tried the sample and I think there are two issues with it (unless I have 
> missed anything):
> 1. The DataSet should be DataSet and not DataSet
> 2. There should probably be a StringBuffer that in the flatMap function that 
> is used to  append "a" in the for loop and output 
> (out.collect(buffer.toString()) it rather than just out.collect("a");.  
> Currently, this produces only "a" each time rather than   "a", "a", "aa", 
> "a", "aa" , "aaa" as shown the comments.



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


[jira] [Updated] (FLINK-3881) Error in Java 8 Documentation Sample

2016-05-07 Thread Fabian Hueske (JIRA)

 [ 
https://issues.apache.org/jira/browse/FLINK-3881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Fabian Hueske updated FLINK-3881:
-
Assignee: Mans Singh

> Error in Java 8 Documentation Sample
> 
>
> Key: FLINK-3881
> URL: https://issues.apache.org/jira/browse/FLINK-3881
> Project: Flink
>  Issue Type: Bug
>  Components: Documentation
>Affects Versions: 1.0.3
> Environment: All
>Reporter: Mans Singh
>Assignee: Mans Singh
>Priority: Minor
>  Labels: docuentation, java8, sample
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The java8 documentation 
> (https://ci.apache.org/projects/flink/flink-docs-master/apis/java8.html) has 
> samples, one of them included below:
> {code:java}
> DataSet input = env.fromElements(1, 2, 3);
> // collector type must be declared
> input.flatMap((Integer number, Collector out) -> {
> for(int i = 0; i < number; i++) {
> out.collect("a");
> }
> })
> // returns "a", "a", "aa", "a", "aa" , "aaa"
> .print();
> {code}
> I tried the sample and I think there are two issues with it (unless I have 
> missed anything):
> 1. The DataSet should be DataSet and not DataSet
> 2. There should probably be a StringBuffer that in the flatMap function that 
> is used to  append "a" in the for loop and output 
> (out.collect(buffer.toString()) it rather than just out.collect("a");.  
> Currently, this produces only "a" each time rather than   "a", "a", "aa", 
> "a", "aa" , "aaa" as shown the comments.



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


[jira] [Updated] (FLINK-3881) Error in Java 8 Documentation Sample

2016-05-07 Thread Mans Singh (JIRA)

 [ 
https://issues.apache.org/jira/browse/FLINK-3881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mans Singh updated FLINK-3881:
--
Description: 
The java8 documentation 
(https://ci.apache.org/projects/flink/flink-docs-master/apis/java8.html) has 
samples, one of them included below:

{code:java}
DataSet input = env.fromElements(1, 2, 3);

// collector type must be declared
input.flatMap((Integer number, Collector out) -> {
for(int i = 0; i < number; i++) {
out.collect("a");
}
})
// returns "a", "a", "aa", "a", "aa" , "aaa"
.print();
{code}

I tried the sample and I think there are two issues with it (unless I have 
missed anything):
1. The DataSet should be DataSet and not DataSet
2. There should probably be a StringBuffer that in the flatMap function that is 
used to  append "a" in the for loop and output (out.collect(buffer.toString()) 
it rather than just out.collect("a");.  Currently, this produces only "a" each 
time rather than   "a", "a", "aa", "a", "aa" , "aaa" as shown the comments.

  was:
The java8 documentation 
(https://ci.apache.org/projects/flink/flink-docs-master/apis/java8.html) has 
samples (one of them) included below:

{code:java}
DataSet input = env.fromElements(1, 2, 3);

// collector type must be declared
input.flatMap((Integer number, Collector out) -> {
for(int i = 0; i < number; i++) {
out.collect("a");
}
})
// returns "a", "a", "aa", "a", "aa" , "aaa"
.print();
{code}

I tried the sample and I think there are two issues with it (unless I have 
missed anything):
1. The DataSet should be DataSet and not DataSet
2. There should probably be a StringBuffer that in the flatMap function that is 
used to  append "a" in the for loop and output (out.collect(buffer.toString()) 
it rather than just out.collect("a");.  Currently, this produces only "a" each 
time rather than   "a", "a", "aa", "a", "aa" , "aaa" as shown the comments.


> Error in Java 8 Documentation Sample
> 
>
> Key: FLINK-3881
> URL: https://issues.apache.org/jira/browse/FLINK-3881
> Project: Flink
>  Issue Type: Bug
>  Components: Documentation
>Affects Versions: 1.0.3
> Environment: All
>Reporter: Mans Singh
>Priority: Minor
>  Labels: docuentation, java8, sample
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The java8 documentation 
> (https://ci.apache.org/projects/flink/flink-docs-master/apis/java8.html) has 
> samples, one of them included below:
> {code:java}
> DataSet input = env.fromElements(1, 2, 3);
> // collector type must be declared
> input.flatMap((Integer number, Collector out) -> {
> for(int i = 0; i < number; i++) {
> out.collect("a");
> }
> })
> // returns "a", "a", "aa", "a", "aa" , "aaa"
> .print();
> {code}
> I tried the sample and I think there are two issues with it (unless I have 
> missed anything):
> 1. The DataSet should be DataSet and not DataSet
> 2. There should probably be a StringBuffer that in the flatMap function that 
> is used to  append "a" in the for loop and output 
> (out.collect(buffer.toString()) it rather than just out.collect("a");.  
> Currently, this produces only "a" each time rather than   "a", "a", "aa", 
> "a", "aa" , "aaa" as shown the comments.



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


[jira] [Updated] (FLINK-3881) Error in Java 8 Documentation Sample

2016-05-07 Thread Mans Singh (JIRA)

 [ 
https://issues.apache.org/jira/browse/FLINK-3881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mans Singh updated FLINK-3881:
--
Description: 
The java8 documentation 
(https://ci.apache.org/projects/flink/flink-docs-master/apis/java8.html) has 
samples (one of them) included below:

{code:java}
DataSet input = env.fromElements(1, 2, 3);

// collector type must be declared
input.flatMap((Integer number, Collector out) -> {
for(int i = 0; i < number; i++) {
out.collect("a");
}
})
// returns "a", "a", "aa", "a", "aa" , "aaa"
.print();
{code}

I tried the sample and I think there are two issues with it (unless I have 
missed anything):
1. The DataSet should be DataSet and not DataSet
2. There should probably be a StringBuffer that in the flatMap function that is 
used to  append "a" in the for loop and output (out.collect(buffer.toString()) 
it rather than just out.collect("a");.  Currently, this produces only "a" each 
time rather than   "a", "a", "aa", "a", "aa" , "aaa" as shown the comments.

  was:
The java8 documentation 
(https://ci.apache.org/projects/flink/flink-docs-master/apis/java8.html) has 
samples (one of them) included below:

DataSet input = env.fromElements(1, 2, 3);

// collector type must be declared
input.flatMap((Integer number, Collector out) -> {
for(int i = 0; i < number; i++) {
out.collect("a");
}
})
// returns "a", "a", "aa", "a", "aa" , "aaa"
.print();

I tried the sample and I think there are two issues with it (unless I have 
missed anything):
1. The DataSet should be DataSet and not DataSet
2. It should have a StringBuffer that appends "a" in the for loop and output 
(out.collect(buffer.toString()) it rather than just out.collect("a");.  
Currently, this produces only "a" each time rather than   "a", "a", "aa", "a", 
"aa" , "aaa" as shown the comments.


> Error in Java 8 Documentation Sample
> 
>
> Key: FLINK-3881
> URL: https://issues.apache.org/jira/browse/FLINK-3881
> Project: Flink
>  Issue Type: Bug
>  Components: Documentation
>Affects Versions: 1.0.3
> Environment: All
>Reporter: Mans Singh
>Priority: Minor
>  Labels: docuentation, java8, sample
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The java8 documentation 
> (https://ci.apache.org/projects/flink/flink-docs-master/apis/java8.html) has 
> samples (one of them) included below:
> {code:java}
> DataSet input = env.fromElements(1, 2, 3);
> // collector type must be declared
> input.flatMap((Integer number, Collector out) -> {
> for(int i = 0; i < number; i++) {
> out.collect("a");
> }
> })
> // returns "a", "a", "aa", "a", "aa" , "aaa"
> .print();
> {code}
> I tried the sample and I think there are two issues with it (unless I have 
> missed anything):
> 1. The DataSet should be DataSet and not DataSet
> 2. There should probably be a StringBuffer that in the flatMap function that 
> is used to  append "a" in the for loop and output 
> (out.collect(buffer.toString()) it rather than just out.collect("a");.  
> Currently, this produces only "a" each time rather than   "a", "a", "aa", 
> "a", "aa" , "aaa" as shown the comments.



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