Display result of Spark Job in HUE

38 views
Skip to first unread message

Richard Grossman

unread,
Feb 5, 2015, 10:31:24 AM2/5/15
to hue-...@cloudera.org
Hi

I've sucessfully configure HUE to execute my job all is running but the result are always empty.
How do I tell to spark to generate a result that can be displayed in HUE
actually my job is just printing the result like this

val all = sqlContext.sql(jobConfig.getString("query"))
    all.map(rk => rk).collect().foreach {
      r => {
        println(r.toString().drop(1).dropRight(1))
      }
    }

I get a list of result like col1,col2,col3 etc ...

But nothing displayed in HUE
I've watched the word count example except the fact that it only generate a Map Key,Value and me a list of value there is no difference?

Romain Rigaux

unread,
Feb 5, 2015, 11:17:31 AM2/5/15
to Richard Grossman, Hue-Users
Hue should be able to display all the json that it gets back from the Job Server. You can checks the calls in the browser console to see what Hue sends back to the browser and if it is a display problem.

Romain

To unsubscribe from this group and stop receiving emails from it, send an email to hue-user+u...@cloudera.org.

Richard Grossman

unread,
Feb 5, 2015, 11:43:00 AM2/5/15
to hue-...@cloudera.org, rich...@gmail.com
Hi

I'm attaching the full log I get in Hue if it can help.
I don't see exception but don't see any result too it's empty I see OK ...
hue-logs-1423154474.86.zip

Romain Rigaux

unread,
Feb 5, 2015, 12:21:28 PM2/5/15
to Richard Grossman, Hue-Users
The logs are truncated:

[05/Feb/2015 11:36:33 -0500] access       INFO     82.80.46.146 admin - "GET /spark/api/job/7a6bc996-27e4-417e-8bbe-1851dd62b0e7 HTTP/1.1"
[05/Feb/2015 11:36:34 -0500] connectionpool DEBUG    Setting read timeout to None
[05/Feb/2015 11:36:34 -0500] connectionpool DEBUG    "GET /jobs/7a6bc996-27e4-417e-8bbe-1851dd62b0e7 HTTP/1.1" 200 38
[05/Feb/2015 11:36:34 -0500] resource     DEBUG    GET Got response: {
  "status": "OK",
  "result": ...

so can't really see.

Could you check in the network tab of the Browser developer console? There should be a getResult() call or something like this with all the data.

Romain

BTW: we will have a better way to execute SQL soon ;)



To unsubscribe from this group and stop receiving emails from it, send an email to hue-user+u...@cloudera.org.

Richard Grossman

unread,
Feb 22, 2015, 12:39:24 PM2/22/15
to hue-...@cloudera.org, rich...@gmail.com
Hi
Sorry for delay in this thread
In fact yes I can't see any result from the job server return back to Hue
So my question is regarding I want to return back a result set what do I need to return from the job to be ok from HUE

For example the wordcount sample is OK because because it return a map Key,Value what do I need to return to display the result as query result a list of value ?

val all = sqlContext.sql(jobConfig.getString("query"))
all.map(rk => rk).collect()

This is my code actually it doesn't return nothing but the result of the collect is Array[sql.ROW] could I return back this array ?

Thanks

Richard Grossman

unread,
Feb 24, 2015, 9:21:43 AM2/24/15
to hue-...@cloudera.org, rich...@gmail.com

Hi

I've succeed to get result from Job server then I get a list of list (any)
But How can I get in Hue something more user friendly

I get only Key/Value columns

I've attached a picture

Romain Rigaux

unread,
Feb 25, 2015, 11:46:58 PM2/25/15
to Richard Grossman, Hue-Users
Yes, this app is pretty buggy. We are almost done with a new version with a new version, more about this within a month,

Romain

To unsubscribe from this group and stop receiving emails from it, send an email to hue-user+u...@cloudera.org.

Reply all
Reply to author
Forward
0 new messages