public _PrivilegedExceptionAction_333(FileSystemAccessService _enclosing, Configuration conf, FileSystemAccess.FileSystemExecutor <T> executor) { this._enclosing = _enclosing; this.conf = conf; this.executor = executor; }
/// <exception cref="Org.Apache.Hadoop.Lib.Service.FileSystemAccessException"/> public override T Execute <T>(string user, Configuration conf, FileSystemAccess.FileSystemExecutor <T> executor) { Check.NotEmpty(user, "user"); Check.NotNull(conf, "conf"); Check.NotNull(executor, "executor"); if (!conf.GetBoolean(FileSystemServiceCreated, false)) { throw new FileSystemAccessException(FileSystemAccessException.ERROR.H04); } if (conf.Get(CommonConfigurationKeysPublic.FsDefaultNameKey) == null || conf.GetTrimmed (CommonConfigurationKeysPublic.FsDefaultNameKey).Length == 0) { throw new FileSystemAccessException(FileSystemAccessException.ERROR.H06, CommonConfigurationKeysPublic .FsDefaultNameKey); } try { ValidateNamenode(new URI(conf.Get(CommonConfigurationKeysPublic.FsDefaultNameKey) ).GetAuthority()); UserGroupInformation ugi = GetUGI(user); return(ugi.DoAs(new _PrivilegedExceptionAction_333(this, conf, executor))); } catch (FileSystemAccessException ex) { throw; } catch (Exception ex) { throw new FileSystemAccessException(FileSystemAccessException.ERROR.H03, ex); } }
/// <summary> /// Executes a /// <see cref="Org.Apache.Hadoop.Lib.Service.FileSystemAccess.FileSystemExecutor{T}"/ /// > /// using a filesystem for the effective /// user. /// </summary> /// <param name="ugi">user making the request.</param> /// <param name="executor">FileSystemExecutor to execute.</param> /// <returns>FileSystemExecutor response</returns> /// <exception cref="System.IO.IOException">thrown if an IO error occurrs.</exception> /// <exception cref="Org.Apache.Hadoop.Lib.Service.FileSystemAccessException"> /// thrown if a FileSystemAccess releated error occurred. Thrown /// exceptions are handled by /// <see cref="HttpFSExceptionProvider"/> /// . /// </exception> private T FsExecute <T>(UserGroupInformation ugi, FileSystemAccess.FileSystemExecutor <T> executor) { FileSystemAccess fsAccess = HttpFSServerWebApp.Get().Get <FileSystemAccess>(); Configuration conf = HttpFSServerWebApp.Get().Get <FileSystemAccess>().GetFileSystemConfiguration (); return(fsAccess.Execute(ugi.GetShortUserName(), conf, executor)); }
/// <exception cref="Org.Apache.Hadoop.Lib.Service.FileSystemAccessException"/> public abstract T Execute <T>(string user, Configuration conf, FileSystemAccess.FileSystemExecutor <T> executor);