Hydrospheredata / mist

Serverless proxy for Spark cluster
http://hydrosphere.io/mist/
Apache License 2.0
326 stars 68 forks source link

Starting streaming jobs via mist-cli / rest api results in 504 timeout #458

Open austinnichols101 opened 6 years ago

austinnichols101 commented 6 years ago

Streaming jobs start, but return a 504 timeout because they do not return a result (they run forever). Streaming jobs need special handling...

$ curl -s --data '{}' -H 'Content-Type:application/json' -X POST http://myserver:2004/v2/api/functions/myfunction/jobs?force=true

<html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.13.8</center>
</body>
</html>
Job succeeded
mkf-simpson commented 6 years ago

The force parameter keeps your http connection alive until your job returns a response. You can run jobs without the ?force=true parameter, this will work asynchronously.

austinnichols101 commented 6 years ago

I will try that - thanks.

As an enhancement, I think calling a streaming function should return started/failed/etc .