Search in sources :

Example 11 with IgfsPathControlRequest

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);
}
Also used : IgfsPathControlRequest(org.apache.ignite.internal.igfs.common.IgfsPathControlRequest)

Example 12 with IgfsPathControlRequest

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();
}
Also used : IgfsPathControlRequest(org.apache.ignite.internal.igfs.common.IgfsPathControlRequest)

Example 13 with IgfsPathControlRequest

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();
}
Also used : IgfsPathControlRequest(org.apache.ignite.internal.igfs.common.IgfsPathControlRequest)

Example 14 with IgfsPathControlRequest

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();
}
Also used : IgfsPathControlRequest(org.apache.ignite.internal.igfs.common.IgfsPathControlRequest)

Example 15 with IgfsPathControlRequest

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();
}
Also used : IgfsPathControlRequest(org.apache.ignite.internal.igfs.common.IgfsPathControlRequest)

Aggregations

IgfsPathControlRequest (org.apache.ignite.internal.igfs.common.IgfsPathControlRequest)15 IgfsInputStreamDescriptor (org.apache.ignite.internal.processors.igfs.IgfsInputStreamDescriptor)2 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)1 IgniteException (org.apache.ignite.IgniteException)1 IgfsInputStream (org.apache.ignite.igfs.IgfsInputStream)1 IgfsControlResponse (org.apache.ignite.internal.igfs.common.IgfsControlResponse)1