use of org.apache.ignite.internal.igfs.common.IgfsPathControlRequest in project ignite by apache.
the class HadoopIgfsOutProc method listFiles.
/**
* {@inheritDoc}
*/
@Override
public Collection<IgfsFile> listFiles(IgfsPath path) throws IgniteCheckedException {
final IgfsPathControlRequest msg = new IgfsPathControlRequest();
msg.command(LIST_FILES);
msg.path(path);
msg.userName(userName);
return io.send(msg).chain(FILE_COL_RES).get();
}
use of org.apache.ignite.internal.igfs.common.IgfsPathControlRequest in project ignite by apache.
the class HadoopIgfsOutProc method mkdirs.
/**
* {@inheritDoc}
*/
@Override
public Boolean mkdirs(IgfsPath path, Map<String, String> props) throws IgniteCheckedException {
final IgfsPathControlRequest msg = new IgfsPathControlRequest();
msg.command(MAKE_DIRECTORIES);
msg.path(path);
msg.properties(props);
msg.userName(userName);
return io.send(msg).chain(BOOL_RES).get();
}
use of org.apache.ignite.internal.igfs.common.IgfsPathControlRequest in project ignite by apache.
the class HadoopIgfsOutProc method setTimes.
/**
* {@inheritDoc}
*/
@Override
public Boolean setTimes(IgfsPath path, long accessTime, long modificationTime) throws IgniteCheckedException {
final IgfsPathControlRequest msg = new IgfsPathControlRequest();
msg.command(SET_TIMES);
msg.path(path);
msg.accessTime(accessTime);
msg.modificationTime(modificationTime);
msg.userName(userName);
return io.send(msg).chain(BOOL_RES).get();
}
use of org.apache.ignite.internal.igfs.common.IgfsPathControlRequest in project ignite by apache.
the class HadoopIgfsOutProc method open.
/**
* {@inheritDoc}
*/
@Override
public HadoopIgfsStreamDelegate open(IgfsPath path, int seqReadsBeforePrefetch) throws IgniteCheckedException {
final IgfsPathControlRequest msg = new IgfsPathControlRequest();
msg.command(OPEN_READ);
msg.path(path);
msg.flag(true);
msg.sequentialReadsBeforePrefetch(seqReadsBeforePrefetch);
msg.userName(userName);
IgfsInputStreamDescriptor rmtDesc = io.send(msg).chain(STREAM_DESCRIPTOR_RES).get();
return new HadoopIgfsStreamDelegate(this, rmtDesc.streamId(), rmtDesc.length());
}
use of org.apache.ignite.internal.igfs.common.IgfsPathControlRequest in project ignite by apache.
the class HadoopIgfsOutProc method append.
/**
* {@inheritDoc}
*/
@Override
public HadoopIgfsStreamDelegate append(IgfsPath path, boolean create, @Nullable Map<String, String> props) throws IgniteCheckedException {
final IgfsPathControlRequest msg = new IgfsPathControlRequest();
msg.command(OPEN_APPEND);
msg.path(path);
msg.flag(create);
msg.properties(props);
msg.userName(userName);
Long streamId = io.send(msg).chain(LONG_RES).get();
return new HadoopIgfsStreamDelegate(this, streamId);
}
Aggregations