Cascading Word Count error

174 views
Skip to first unread message

Han Chen

unread,
Nov 19, 2013, 2:06:37 PM11/19/13
to cascadi...@googlegroups.com
I am following the tutorial part 2 on Cascading official website which is about word count example. I copy the code from its Github and run, but always get the following error:

13/11/19 11:36:32 INFO util.HadoopUtil: resolving application jar from found main method on: com.starscriber.cascadingtest.Main
13/11/19 11:36:32 INFO planner.HadoopPlanner: using application jar: /home/hchen/cascading.jar
13/11/19 11:36:32 INFO property.AppProps: using app.id: D576F756A0584235835EBFBCC1E04713
13/11/19 11:36:33 INFO util.NativeCodeLoader: Loaded the native-hadoop library
13/11/19 11:36:33 WARN snappy.LoadSnappy: Snappy native library not loaded
13/11/19 11:36:33 INFO mapred.FileInputFormat: Total input paths to process : 1
Exception in thread "main" cascading.flow.planner.PlannerException: could not build flow from assembly: [[token][com.starscriber.cascadingtest.Main.main(Main.java:44)] unable to resolve argument selector: [{1}:'text'], with incoming: [{1}:'doc01        A rain shadow is a dry area on the lee back side of a mountainous area.']]
at cascading.flow.planner.FlowPlanner.handleExceptionDuringPlanning(FlowPlanner.java:576)
at cascading.flow.hadoop.planner.HadoopPlanner.buildFlow(HadoopPlanner.java:263)
at cascading.flow.hadoop.planner.HadoopPlanner.buildFlow(HadoopPlanner.java:80)
at cascading.flow.FlowConnector.connect(FlowConnector.java:459)
at com.starscriber.cascadingtest.Main.main(Main.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: cascading.pipe.OperatorException: [token][com.starscriber.cascadingtest.Main.main(Main.java:44)] unable to resolve argument selector: [{1}:'text'], with incoming: [{1}:'doc01        A rain shadow is a dry area on the lee back side of a mountainous area.']
at cascading.pipe.Operator.resolveArgumentSelector(Operator.java:345)
at cascading.pipe.Each.outgoingScopeFor(Each.java:368)
at cascading.flow.planner.ElementGraph.resolveFields(ElementGraph.java:628)
at cascading.flow.planner.ElementGraph.resolveFields(ElementGraph.java:610)
at cascading.flow.hadoop.planner.HadoopPlanner.buildFlow(HadoopPlanner.java:248)
... 8 more
Caused by: cascading.tuple.FieldsResolverException: could not select fields: [{1}:'text'], from: [{1}:'doc01        A rain shadow is a dry area on the lee back side of a mountainous area.']
at cascading.tuple.Fields.indexOf(Fields.java:1008)
at cascading.tuple.Fields.select(Fields.java:1064)
at cascading.pipe.Operator.resolveArgumentSelector(Operator.java:341)
... 12 more

And the input file:
doc01        A rain shadow is a dry area on the lee back side of a mountainous area.
doc02        This sinking, dry air produces a rain shadow, or area in the lee of a mountain with less rain and cloudcover.
doc03        A rain shadow is an area of dry land that lies on the leeward (or downwind) side of a mountain.
doc04        This is known as the rain shadow effect and is the primary cause of leeward deserts of mountain ranges, such as California's Death Valley.
doc05        Two Women. Secrets. A Broken Land. [DVD Australia]

I just don't understand. I don't change any code at all and just copy and paste, why it always gives this error??


Paco Nathan

unread,
Nov 20, 2013, 3:08:26 PM11/20/13
to cascadi...@googlegroups.com
Hi Han,

The input data file that you've listed is incorrect. It's missing the header line, so there is no way to determine the names of the required fields.


--
You received this message because you are subscribed to the Google Groups "cascading-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cascading-use...@googlegroups.com.
To post to this group, send email to cascadi...@googlegroups.com.
Visit this group at http://groups.google.com/group/cascading-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/cascading-user/1ec32e1f-26e2-4e63-9f2f-c761b307db41%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Han Chen

unread,
Nov 21, 2013, 7:55:41 PM11/21/13
to cascadi...@googlegroups.com
Yeah. I have noticed my stupid error...Thank you for relying me :)
Reply all
Reply to author
Forward
0 new messages