You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Nipun Arora <ni...@gmail.com> on 2017/05/18 17:10:20 UTC
SparkAppHandle - get Input and output streams
Hi,
I wanted to know how to get the the input and output streams from
SparkAppHandle?
I start application like the following:
SparkAppHandle sparkAppHandle = sparkLauncher.startApplication();
I have used the following previously to capture inputstream from error and
output streams, but I would like to know how to do the same for
SparkAppHandle.
Process process= sparkLauncher.launch();
InputStreamReaderRunnable inputStreamReaderRunnable = new
InputStreamReaderRunnable(process.getInputStream(), "input");
Thread inputThread = new Thread(inputStreamReaderRunnable,
"LogStreamReader input");
inputThread.start();
InputStreamReaderRunnable errorStreamReaderRunnable = new
InputStreamReaderRunnable(process.getErrorStream(), "error");
Thread errorThread = new Thread(errorStreamReaderRunnable,
"LogStreamReader error");
errorThread.start();
Thanks
Nipun
Re: SparkAppHandle - get Input and output streams
Posted by Marcelo Vanzin <va...@cloudera.com>.
On Thu, May 18, 2017 at 10:10 AM, Nipun Arora <ni...@gmail.com> wrote:
> I wanted to know how to get the the input and output streams from
> SparkAppHandle?
You can't. You can redirect the output, but not directly get the streams.
--
Marcelo
---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscribe@spark.apache.org