use of org.apache.ignite.internal.processors.igfs.client.IgfsClientMkdirsCallable in project ignite by apache.
the class IgfsImpl method mkdirs.
/** {@inheritDoc} */
@Override
public void mkdirs(final IgfsPath path, @Nullable final Map<String, String> props) {
A.notNull(path, "path");
if (meta.isClient()) {
meta.runClientTask(new IgfsClientMkdirsCallable(cfg.getName(), IgfsUserContext.currentUser(), path, props));
return;
}
safeOp(new Callable<Void>() {
@Override
public Void call() throws Exception {
if (log.isDebugEnabled())
log.debug("Make directories: " + path);
IgfsMode mode = resolveMode(path);
switch(mode) {
case PRIMARY:
meta.mkdirs(path, props == null ? DFLT_DIR_META : new HashMap<>(props));
break;
case DUAL_ASYNC:
case DUAL_SYNC:
await(path);
meta.mkdirsDual(secondaryFs, path, props);
break;
case PROXY:
secondaryFs.mkdirs(path, props);
break;
}
return null;
}
});
}
Aggregations