use of org.apache.ignite.internal.igfs.common.IgfsPathControlRequest in project ignite by apache.
the class HadoopIgfsOutProc method create.
/**
* {@inheritDoc}
*/
@Override
public HadoopIgfsStreamDelegate create(IgfsPath path, boolean overwrite, boolean colocate, int replication, long blockSize, @Nullable Map<String, String> props) throws IgniteCheckedException {
final IgfsPathControlRequest msg = new IgfsPathControlRequest();
msg.command(OPEN_CREATE);
msg.path(path);
msg.flag(overwrite);
msg.colocate(colocate);
msg.properties(props);
msg.replication(replication);
msg.blockSize(blockSize);
msg.userName(userName);
Long streamId = io.send(msg).chain(LONG_RES).get();
return new HadoopIgfsStreamDelegate(this, streamId);
}
use of org.apache.ignite.internal.igfs.common.IgfsPathControlRequest in project ignite by apache.
the class HadoopIgfsOutProc method listPaths.
/**
* {@inheritDoc}
*/
@Override
public Collection<IgfsPath> listPaths(IgfsPath path) throws IgniteCheckedException {
final IgfsPathControlRequest msg = new IgfsPathControlRequest();
msg.command(LIST_PATHS);
msg.path(path);
msg.userName(userName);
return io.send(msg).chain(PATH_COL_RES).get();
}
use of org.apache.ignite.internal.igfs.common.IgfsPathControlRequest in project ignite by apache.
the class HadoopIgfsOutProc method contentSummary.
/**
* {@inheritDoc}
*/
@Override
public IgfsPathSummary contentSummary(IgfsPath path) throws IgniteCheckedException {
final IgfsPathControlRequest msg = new IgfsPathControlRequest();
msg.command(PATH_SUMMARY);
msg.path(path);
msg.userName(userName);
return io.send(msg).chain(SUMMARY_RES).get();
}
use of org.apache.ignite.internal.igfs.common.IgfsPathControlRequest in project ignite by apache.
the class HadoopIgfsOutProc method rename.
/**
* {@inheritDoc}
*/
@Override
public Boolean rename(IgfsPath src, IgfsPath dest) throws IgniteCheckedException {
final IgfsPathControlRequest msg = new IgfsPathControlRequest();
msg.command(RENAME);
msg.path(src);
msg.destinationPath(dest);
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 affinity.
/**
* {@inheritDoc}
*/
@Override
public Collection<IgfsBlockLocation> affinity(IgfsPath path, long start, long len) throws IgniteCheckedException {
final IgfsPathControlRequest msg = new IgfsPathControlRequest();
msg.command(AFFINITY);
msg.path(path);
msg.start(start);
msg.length(len);
msg.userName(userName);
return io.send(msg).chain(BLOCK_LOCATION_COL_RES).get();
}
Aggregations