Reputation: 33213
I have an application (spark based service), which when starts..works like following.
At localhost:9000
if I do nc -lk localhost 9000
and then start entering the text.. it takes the text entered in terminal as an input and do a simple wordcount computation on it.
how do i use the requests
library to programmatically send the text, instead of manually writing them in the terminal.
Not sure if my question is making sense..
Upvotes: 0
Views: 61
Reputation: 3662
requests is a HTTP request library, while Spark's wordcount example provides a raw socket server, so no, requests is not the right package to communicate with your Spark app.
Upvotes: 1