FAQ
Hello folks,

I'm using JCascalog version 2.1.0 and I'm trying to write out the flow of
execution for some of queries to understand how to fix up their performance
issues.

The code where I attempt to write the .dot file looks like this:

public void saveExecutionFlow(Subquery query, String outputPath) {
         Tap debugTap = new Hfs(new TextLine(), outputPath,
SinkMode.REPLACE);
         Flow<?> flow = (Flow<?>) Api.compileFlow(getId() + "-flow",
debugTap, query);
         flow.writeDOT(outputPath);
}

This results in the following exception:

Exception in thread "main" java.lang.ClassCastException:
cascalog.cascading.types.ClojureFlow cannot be cast to cascading.flow.Flow
         at jcascalog.Api.compileFlow(Api.java:26)
         at jcascalog.Api.compileFlow(Api.java:30)
         at FlowWriter.saveExecutionFlow(FlowWriter.java:193)
... (some of my other classes here)
         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:606)
         at org.apache.hadoop.util.RunJar.main(RunJar.java:160)

So, despite the Api.compileFlow (from compile-flow in api.clj<https://github.com/nathanmarz/cascalog/blob/81b160d9f68eb7f776b0dcf0f63e204cde319042/cascalog-core/src/clj/cascalog/api.clj#L161>) method
indicating a cascading.flow.Flow object would be returned, it appears that
a ClojureFlow object (which looks like it is in types.clj<https://github.com/nathanmarz/cascalog/blob/develop/cascalog-core/src/clj/cascalog/cascading/types.clj#L52> from
cascalog) is being returned instead. It doesn't appear that I can import
ClojureFlow to get the appropriate handle on the object, so I was wondering
if someone had any insight that would help make this work or if I've turned
over a rock that most don't and uncovered a bug

Thanks much,

Matt

--
You received this message because you are subscribed to the Google Groups "cascalog-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cascalog-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Sam Ritchie at Apr 10, 2014 at 2:53 pm
    Jcascalog is desperately in need of a developer sponsor, I think. No one on our little core team uses it - Nathan created it to support his book, but doesn't actually support its development.


    What the project needs is some love and testing from its users. This definitely sounds like a bug. I'd love a patch and a test once you dig a little deeper.




    Cheers, and sorry to not have better news.

    Sent from Mailbox for iPhone

    On Thu, Apr 10, 2014 at 6:46 AM, Matthew Sweeney
    wrote:
    Hello folks,
    I'm using JCascalog version 2.1.0 and I'm trying to write out the flow of
    execution for some of queries to understand how to fix up their performance
    issues.
    The code where I attempt to write the .dot file looks like this:
    public void saveExecutionFlow(Subquery query, String outputPath) {
    Tap debugTap = new Hfs(new TextLine(), outputPath,
    SinkMode.REPLACE);
    Flow<?> flow = (Flow<?>) Api.compileFlow(getId() + "-flow",
    debugTap, query);
    flow.writeDOT(outputPath);
    }
    This results in the following exception:
    Exception in thread "main" java.lang.ClassCastException:
    cascalog.cascading.types.ClojureFlow cannot be cast to cascading.flow.Flow
    at jcascalog.Api.compileFlow(Api.java:26)
    at jcascalog.Api.compileFlow(Api.java:30)
    at FlowWriter.saveExecutionFlow(FlowWriter.java:193)
    ... (some of my other classes here)
    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:606)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
    So, despite the Api.compileFlow (from compile-flow in api.clj<https://github.com/nathanmarz/cascalog/blob/81b160d9f68eb7f776b0dcf0f63e204cde319042/cascalog-core/src/clj/cascalog/api.clj#L161>) method
    indicating a cascading.flow.Flow object would be returned, it appears that
    a ClojureFlow object (which looks like it is in types.clj<https://github.com/nathanmarz/cascalog/blob/develop/cascalog-core/src/clj/cascalog/cascading/types.clj#L52> from
    cascalog) is being returned instead. It doesn't appear that I can import
    ClojureFlow to get the appropriate handle on the object, so I was wondering
    if someone had any insight that would help make this work or if I've turned
    over a rock that most don't and uncovered a bug
    Thanks much,
    Matt
    --
    You received this message because you are subscribed to the Google Groups "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to cascalog-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to cascalog-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Soren Macbeth at Apr 10, 2014 at 3:28 pm
    +1 on the need for someone to step up and become a developer sponsor for
    jcascalog. I have neither the time nor the inclination to do it myself.

    On Thu, Apr 10, 2014 at 7:53 AM, Sam Ritchie wrote:

    Jcascalog is desperately in need of a developer sponsor, I think. No one
    on our little core team uses it - Nathan created it to support his book,
    but doesn't actually support its development.

    What the project needs is some love and testing from its users. This
    definitely sounds like a bug. I'd love a patch and a test once you dig a
    little deeper.

    Cheers, and sorry to not have better news.
    --
    Sent from Mailbox <https://www.dropbox.com/mailbox> for iPhone


    On Thu, Apr 10, 2014 at 6:46 AM, Matthew Sweeney <
    matthewssweeney@gmail.com> wrote:
    Hello folks,

    I'm using JCascalog version 2.1.0 and I'm trying to write out the flow of
    execution for some of queries to understand how to fix up their performance
    issues.

    The code where I attempt to write the .dot file looks like this:

    public void saveExecutionFlow(Subquery query, String outputPath) {
    Tap debugTap = new Hfs(new TextLine(), outputPath,
    SinkMode.REPLACE);
    Flow<?> flow = (Flow<?>) Api.compileFlow(getId() + "-flow",
    debugTap, query);
    flow.writeDOT(outputPath);
    }

    This results in the following exception:

    Exception in thread "main" java.lang.ClassCastException:
    cascalog.cascading.types.ClojureFlow cannot be cast to cascading.flow.Flow
    at jcascalog.Api.compileFlow(Api.java:26)
    at jcascalog.Api.compileFlow(Api.java:30)
    at FlowWriter.saveExecutionFlow(FlowWriter.java:193)
    ... (some of my other classes here)
    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:606)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:160)

    So, despite the Api.compileFlow (from compile-flow in api.clj<https://github.com/nathanmarz/cascalog/blob/81b160d9f68eb7f776b0dcf0f63e204cde319042/cascalog-core/src/clj/cascalog/api.clj#L161>) method
    indicating a cascading.flow.Flow object would be returned, it appears that
    a ClojureFlow object (which looks like it is in types.clj<https://github.com/nathanmarz/cascalog/blob/develop/cascalog-core/src/clj/cascalog/cascading/types.clj#L52> from
    cascalog) is being returned instead. It doesn't appear that I can import
    ClojureFlow to get the appropriate handle on the object, so I was wondering
    if someone had any insight that would help make this work or if I've turned
    over a rock that most don't and uncovered a bug

    Thanks much,

    Matt

    --
    You received this message because you are subscribed to the Google Groups
    "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to cascalog-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups
    "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to cascalog-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.


    --
    http://about.me/soren

    --
    You received this message because you are subscribed to the Google Groups "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to cascalog-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Matthew Sweeney at Apr 10, 2014 at 4:17 pm
    Thanks for the quick response confirming my suspicion, Sam. I'll dig into
    it and get back to you.
    On Thursday, April 10, 2014 10:53:13 AM UTC-4, Sam Ritchie wrote:

    Jcascalog is desperately in need of a developer sponsor, I think. No one
    on our little core team uses it - Nathan created it to support his book,
    but doesn't actually support its development.

    What the project needs is some love and testing from its users. This
    definitely sounds like a bug. I'd love a patch and a test once you dig a
    little deeper.

    Cheers, and sorry to not have better news.

    Sent from Mailbox <https://www.dropbox.com/mailbox> for iPhone


    On Thu, Apr 10, 2014 at 6:46 AM, Matthew Sweeney <matthew...@gmail.com<javascript:>
    wrote:
    Hello folks,

    I'm using JCascalog version 2.1.0 and I'm trying to write out the flow of
    execution for some of queries to understand how to fix up their performance
    issues.

    The code where I attempt to write the .dot file looks like this:

    public void saveExecutionFlow(Subquery query, String outputPath) {
    Tap debugTap = new Hfs(new TextLine(), outputPath,
    SinkMode.REPLACE);
    Flow<?> flow = (Flow<?>) Api.compileFlow(getId() + "-flow",
    debugTap, query);
    flow.writeDOT(outputPath);
    }

    This results in the following exception:

    Exception in thread "main" java.lang.ClassCastException:
    cascalog.cascading.types.ClojureFlow cannot be cast to cascading.flow.Flow
    at jcascalog.Api.compileFlow(Api.java:26)
    at jcascalog.Api.compileFlow(Api.java:30)
    at FlowWriter.saveExecutionFlow(FlowWriter.java:193)
    ... (some of my other classes here)
    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:606)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:160)

    So, despite the Api.compileFlow (from compile-flow in api.clj<https://github.com/nathanmarz/cascalog/blob/81b160d9f68eb7f776b0dcf0f63e204cde319042/cascalog-core/src/clj/cascalog/api.clj#L161>) method
    indicating a cascading.flow.Flow object would be returned, it appears that
    a ClojureFlow object (which looks like it is in types.clj<https://github.com/nathanmarz/cascalog/blob/develop/cascalog-core/src/clj/cascalog/cascading/types.clj#L52> from
    cascalog) is being returned instead. It doesn't appear that I can import
    ClojureFlow to get the appropriate handle on the object, so I was wondering
    if someone had any insight that would help make this work or if I've turned
    over a rock that most don't and uncovered a bug

    Thanks much,

    Matt

    --
    You received this message because you are subscribed to the Google Groups
    "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to cascalog-use...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to cascalog-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcascalog-user @
categoriesclojure, hadoop
postedApr 10, '14 at 1:46p
activeApr 10, '14 at 4:17p
posts4
users3
websiteclojure.org
irc#clojure

People

Translate

site design / logo © 2021 Grokbase