use of org.apache.ignite.internal.igfs.common.IgfsDataOutputStream in project ignite by apache.
the class HadoopIgfsIpcIo method start.
/**
* Starts the IO.
*
* @throws IgniteCheckedException If failed to connect the endpoint.
*/
private void start() throws IgniteCheckedException {
boolean success = false;
try {
endpoint = IpcEndpointFactory.connectEndpoint(endpointAddr, new GridLoggerProxy(new HadoopIgfsJclLogger(log), null, null, ""));
out = new IgfsDataOutputStream(new BufferedOutputStream(endpoint.outputStream()));
reader = new ReaderThread();
// Required for Hadoop 2.x
reader.setDaemon(true);
reader.start();
success = true;
} catch (IgniteCheckedException e) {
IpcOutOfSystemResourcesException resEx = e.getCause(IpcOutOfSystemResourcesException.class);
if (resEx != null)
throw new IgniteCheckedException(IpcSharedMemoryServerEndpoint.OUT_OF_RESOURCES_MSG, resEx);
throw e;
} finally {
if (!success)
stop();
}
}
Aggregations