Re: How to pass parameters to a spark-jobserver Scala class?
Sorry for the long silence. We are able to 1. Pass parameters from Vaadin (Java Framework) to spark-jobserver using HttpURLConnection POST method. 2. Receive filtered (based on passed parameters) RDD results from spark-jobserver using HttpURLConnection GET method. 3. Finally, showing the results on Vaadin UI. Thank you once again for valuable inputs. -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/How-to-pass-parameters-to-a-spark-jobserver-Scala-class-tp21671p22078.html Sent from the Apache Spark User List mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org
Re: How to pass parameters to a spark-jobserver Scala class?
Thanks Vasu. Let me get back to you once I am done with trials. -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/How-to-pass-parameters-to-a-spark-jobserver-Scala-class-tp21671p21732.html Sent from the Apache Spark User List mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org
Re: How to pass parameters to a spark-jobserver Scala class?
Hi Sasi, I am not sure about Vaadin, but by simple googling you can find many article on how to pass json parameters in http. http://stackoverflow.com/questions/21404252/post-request-send-json-data-java-httpurlconnection You can also try Finagle which is fully fault tolerant framework by Twitter. Regards, Vasu C -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/How-to-pass-parameters-to-a-spark-jobserver-Scala-class-tp21671p21727.html Sent from the Apache Spark User List mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org
Re: How to pass parameters to a spark-jobserver Scala class?
Thank you very much Vasu. Let me add some more points to my question. We are developing a Java program for connection spark-jobserver to Vaadin (Java framework). Following is the sample code I wrote for connecting both (the code works fine): / URL url = null; HttpURLConnection connection = null; String strQueryUri = "http://localhost:8090/jobs?appName=sparking&classPath=sparking.jobserver.GetOrCreateUsers&context=user-context";; url = new URL(strQueryUri); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("Accept", "application/json"); InputStream isQueryJSON = connection.getInputStream(); LinkedHashMap queryMap = (LinkedHashMap) getJSONKeyValue(isQueryJSON, null, "result"); String strJobId = (String) queryMap.get("jobId");/ Can you suggest how to modify above code for passing parameters (as we do in *curl -d ...*) during job run? Hope I make sense. Sasi -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/How-to-pass-parameters-to-a-spark-jobserver-Scala-class-tp21671p21717.html Sent from the Apache Spark User List mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org
Re: How to pass parameters to a spark-jobserver Scala class?
Hi Sasi, Forgot to mention job server uses Typesafe Config library. The input is JSON, you can find syntax in below link https://github.com/typesafehub/config Regards, Vasu C -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/How-to-pass-parameters-to-a-spark-jobserver-Scala-class-tp21671p21695.html Sent from the Apache Spark User List mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org
Re: How to pass parameters to a spark-jobserver Scala class?
Hi Sasi, To pass parameters to spark-jobserver use " curl -d "input.string = a b c a b see" " and in Job server class use config.getString("input.string"). You can pass multiple parameters like starttime,endtime etc and use config.getString("") to get the values. The examples are shown here https://github.com/spark-jobserver/spark-jobserver Regards, Vasu C -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/How-to-pass-parameters-to-a-spark-jobserver-Scala-class-tp21671p21692.html Sent from the Apache Spark User List mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org