예제 #1
0
 public _PrivilegedExceptionAction_333(FileSystemAccessService _enclosing, Configuration
                                       conf, FileSystemAccess.FileSystemExecutor <T> executor)
 {
     this._enclosing = _enclosing;
     this.conf       = conf;
     this.executor   = executor;
 }
        public virtual void ServiceHadoopConfCustomDir()
        {
            string dir           = TestDirHelper.GetTestDir().GetAbsolutePath();
            string hadoopConfDir = new FilePath(dir, "confx").GetAbsolutePath();

            new FilePath(hadoopConfDir).Mkdirs();
            string services = StringUtils.Join(",", Arrays.AsList(typeof(InstrumentationService
                                                                         ).FullName, typeof(SchedulerService).FullName, typeof(FileSystemAccessService).FullName
                                                                  ));
            Configuration conf = new Configuration(false);

            conf.Set("server.services", services);
            conf.Set("server.hadoop.config.dir", hadoopConfDir);
            FilePath      hdfsSite   = new FilePath(hadoopConfDir, "hdfs-site.xml");
            OutputStream  os         = new FileOutputStream(hdfsSite);
            Configuration hadoopConf = new Configuration(false);

            hadoopConf.Set("foo", "BAR");
            hadoopConf.WriteXml(os);
            os.Close();
            Org.Apache.Hadoop.Lib.Server.Server server = new Org.Apache.Hadoop.Lib.Server.Server
                                                             ("server", dir, dir, dir, dir, conf);
            server.Init();
            FileSystemAccessService fsAccess = (FileSystemAccessService)server.Get <FileSystemAccess
                                                                                    >();

            NUnit.Framework.Assert.AreEqual(fsAccess.serviceHadoopConf.Get("foo"), "BAR");
            server.Destroy();
        }
        public virtual void NameNodeNotinWhitelists()
        {
            string dir      = TestDirHelper.GetTestDir().GetAbsolutePath();
            string services = StringUtils.Join(",", Arrays.AsList(typeof(InstrumentationService
                                                                         ).FullName, typeof(SchedulerService).FullName, typeof(FileSystemAccessService).FullName
                                                                  ));
            Configuration conf = new Configuration(false);

            conf.Set("server.services", services);
            conf.Set("server.hadoop.name.node.whitelist", "NN");
            Org.Apache.Hadoop.Lib.Server.Server server = new Org.Apache.Hadoop.Lib.Server.Server
                                                             ("server", dir, dir, dir, dir, conf);
            server.Init();
            FileSystemAccessService fsAccess = (FileSystemAccessService)server.Get <FileSystemAccess
                                                                                    >();

            fsAccess.ValidateNamenode("NNx");
        }
        public virtual void ServiceHadoopConf()
        {
            string dir      = TestDirHelper.GetTestDir().GetAbsolutePath();
            string services = StringUtils.Join(",", Arrays.AsList(typeof(InstrumentationService
                                                                         ).FullName, typeof(SchedulerService).FullName, typeof(FileSystemAccessService).FullName
                                                                  ));
            Configuration conf = new Configuration(false);

            conf.Set("server.services", services);
            Org.Apache.Hadoop.Lib.Server.Server server = new Org.Apache.Hadoop.Lib.Server.Server
                                                             ("server", dir, dir, dir, dir, conf);
            server.Init();
            FileSystemAccessService fsAccess = (FileSystemAccessService)server.Get <FileSystemAccess
                                                                                    >();

            NUnit.Framework.Assert.AreEqual(fsAccess.serviceHadoopConf.Get("foo"), "FOO");
            server.Destroy();
        }
예제 #5
0
 public _PrivilegedExceptionAction_368(FileSystemAccessService _enclosing, Configuration
                                       conf)
 {
     this._enclosing = _enclosing;
     this.conf       = conf;
 }
예제 #6
0
 internal FileSystemCachePurger(FileSystemAccessService _enclosing)
 {
     this._enclosing = _enclosing;
 }
예제 #7
0
 public _Variable_223(FileSystemAccessService _enclosing)
 {
     this._enclosing = _enclosing;
 }