private CreateDirectoryOptions() { super(); mAllowExists = false; mTtl = Constants.NO_TTL; mTtlAction = TtlAction.DELETE; mMode.applyDirectoryUMask(); mUfsStatus = null; }
/** * Constructs a default {@link MkdirsOptions}. */ private MkdirsOptions() { // By default create parent is true. mCreateParent = true; // default owner and group are null (unset) mOwner = null; mGroup = null; mMode = Mode.defaults().applyDirectoryUMask(); }
mInodeTree.initializeRoot(SecurityUtils.getOwnerFromLoginModule(), SecurityUtils.getGroupFromLoginModule(), Mode.createFullAccess().applyDirectoryUMask(), context); context.append(mInodeTree.getRoot().toJournalEntry());
/** * Constructs an instance of {@link CreateDirectoryOptions} from {@link CreateDirectoryTOptions}. * The option of permission is constructed with the username obtained from thrift * transport. * * @param options the {@link CreateDirectoryTOptions} to use */ public CreateDirectoryOptions(CreateDirectoryTOptions options) { this(); if (options != null) { if (options.isSetCommonOptions()) { mCommonOptions = new CommonOptions(options.getCommonOptions()); } mAllowExists = options.isAllowExists(); mPersisted = options.isPersisted(); mRecursive = options.isRecursive(); mTtl = options.getTtl(); mTtlAction = TtlAction.fromThrift(options.getTtlAction()); if (SecurityUtils.isAuthenticationEnabled()) { mOwner = SecurityUtils.getOwnerFromThriftClient(); mGroup = SecurityUtils.getGroupFromThriftClient(); } if (options.isSetMode()) { mMode = new Mode(options.getMode()); } else { mMode.applyDirectoryUMask(); } } }