You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by hagersaleh <lo...@yahoo.com> on 2015/05/10 18:11:47 UTC
Error when use tow datasink
Exception in thread "main" org.apache.flink.compiler.CompilerException: The
given program contains multiple disconnected data flows
example
DataSet<Customer3>
customers=env.readCsvFile("/home/hadoop/Desktop/Dataset/customer.csv")
.fieldDelimiter('|')
.includeFields(11000010).ignoreFirstLine()
.tupleType(Customer3.class);
customers = customers.filter(new
FilterFunction<Customer3>()
{
@Override
public boolean filter(Customer3 c) {
c.getField(2).toString().equals("AUTOMOBILE");
}
return true;
}
});
customers.print();
customers.writeAsCsv("/home/hadoop/Desktop/Dataset/out2.csv", "\n", "|");
}
DataSet<Customer2>
customers1=env.readCsvFile("/home/hadoop/Desktop/Dataset/customer.csv")
.fieldDelimiter('|')
.includeFields("10000010").ignoreFirstLine()
.tupleType(Customer2.class);
customers = customers.filter(new
FilterFunction<Customer2>()
{
@Override
public boolean filter(Customer2 c) {
c.getField(1).toString().equals("MACHINERY");
}
});
customers1.print();
customers1.writeAsCsv("/home/hadoop/Desktop/Dataset/out1.csv", "\n", "|");
--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Error-when-use-tow-datasink-tp1205.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.
Re: Error when use tow datasink
Posted by Robert Metzger <rm...@apache.org>.
This looks like a dependency issue of the asm dependency.
Did you upgrade all flink dependencies to the 0.8.1 version?
I think you also refresh / reimport the project in your IDE so that it can
pick up the new dependencies.
On Mon, May 11, 2015 at 10:21 AM, hagersaleh <lo...@yahoo.com>
wrote:
> when upgrade from flink 0.7.0 to 0.8.1 display error message I use
> netbeanse
> when replace lib flink 0.7.0 to to lib 0.8.1
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/objectweb/asm/ClassVisitor
> at org.apache.flink.api.java.DataSet.clean(DataSet.java:133)
> at org.apache.flink.api.java.DataSet.filter(DataSet.java:231)
> at
>
> org.apache.flink.examples.java.relational.TPCHQuery3.getCustomerDataSetsubquery(TPCHQuery3.java:349)
> at
>
> org.apache.flink.examples.java.relational.TPCHQuery3.main(TPCHQuery3.java:306)
> Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 4 more
> Java Result: 1
>
>
>
>
> --
> View this message in context:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Error-when-use-tow-datasink-tp1205p1212.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive
> at Nabble.com.
>
Re: Error when use tow datasink
Posted by hagersaleh <lo...@yahoo.com>.
when upgrade from flink 0.7.0 to 0.8.1 display error message I use netbeanse
when replace lib flink 0.7.0 to to lib 0.8.1
Exception in thread "main" java.lang.NoClassDefFoundError:
org/objectweb/asm/ClassVisitor
at org.apache.flink.api.java.DataSet.clean(DataSet.java:133)
at org.apache.flink.api.java.DataSet.filter(DataSet.java:231)
at
org.apache.flink.examples.java.relational.TPCHQuery3.getCustomerDataSetsubquery(TPCHQuery3.java:349)
at
org.apache.flink.examples.java.relational.TPCHQuery3.main(TPCHQuery3.java:306)
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 4 more
Java Result: 1
--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Error-when-use-tow-datasink-tp1205p1212.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.
Re: Error when use tow datasink
Posted by Robert Metzger <rm...@apache.org>.
Can you upgrade to Flink 0.8.0 ?
On Sun, May 10, 2015 at 8:47 PM, hagersaleh <lo...@yahoo.com> wrote:
> use flink 7.0
>
>
>
> --
> View this message in context:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Error-when-use-tow-datasink-tp1205p1209.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive
> at Nabble.com.
>
Re: Error when use tow datasink
Posted by hagersaleh <lo...@yahoo.com>.
use flink 7.0
--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Error-when-use-tow-datasink-tp1205p1209.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.
Re: Error when use tow datasink
Posted by Robert Metzger <rm...@apache.org>.
Hi,
which version of Flink are you using?
Since 0.8.0, Flink supports disjoint dataflows (
https://issues.apache.org/jira/browse/FLINK-820).
On Sun, May 10, 2015 at 6:11 PM, hagersaleh <lo...@yahoo.com> wrote:
> Exception in thread "main" org.apache.flink.compiler.CompilerException:
> The
> given program contains multiple disconnected data flows
>
> example
> DataSet<Customer3>
> customers=env.readCsvFile("/home/hadoop/Desktop/Dataset/customer.csv")
> .fieldDelimiter('|')
> .includeFields(11000010).ignoreFirstLine()
> .tupleType(Customer3.class);
> customers = customers.filter(new
> FilterFunction<Customer3>()
> {
> @Override
> public boolean filter(Customer3 c) {
>
>
> c.getField(2).toString().equals("AUTOMOBILE");
> }
> return true;
>
> }
> });
> customers.print();
>
> customers.writeAsCsv("/home/hadoop/Desktop/Dataset/out2.csv", "\n", "|");
> }
>
>
> DataSet<Customer2>
> customers1=env.readCsvFile("/home/hadoop/Desktop/Dataset/customer.csv")
> .fieldDelimiter('|')
> .includeFields("10000010").ignoreFirstLine()
> .tupleType(Customer2.class);
> customers = customers.filter(new
> FilterFunction<Customer2>()
> {
> @Override
> public boolean filter(Customer2 c) {
>
> c.getField(1).toString().equals("MACHINERY");
> }
>
> });
>
> customers1.print();
>
>
> customers1.writeAsCsv("/home/hadoop/Desktop/Dataset/out1.csv", "\n", "|");
>
>
>
> --
> View this message in context:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Error-when-use-tow-datasink-tp1205.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive
> at Nabble.com.
>