Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pass Objects in API #87

Open
batghare opened this issue Nov 5, 2014 · 0 comments
Open

How to pass Objects in API #87

batghare opened this issue Nov 5, 2014 · 0 comments

Comments

@batghare
Copy link

batghare commented Nov 5, 2014

Hi Guys,

Thanks for providing wonderful job server capabilities over Spark.

We are new to Spark.

We are using Java and we are done experimenting WorkCountExample. Tried below sample and it works fine.

curl -d "input.string = a b c a b see" 'localhost:8090/jobs?appName=test&classPath=spark.jobserver.WordCountExample'

But our basic need is to pass Custom Objects to run Job method and use serialization to consume that object in runJob and trigger real work.

e.g pass this instance of java class Test

Test :

{"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
}}

We tried looking online could not get any good sample code for it. Please provide us with some sample code to pass this data using POST and what how do we get it in runJob .

Regards,
Vishal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant