示例#1
0
 public _FSAction_622(FileSystemRMStateStore _enclosing, Path src, Path dst)
     : base(_enclosing)
 {
     this._enclosing = _enclosing;
     this.src        = src;
     this.dst        = dst;
 }
示例#2
0
 public _FSAction_660(FileSystemRMStateStore _enclosing, Path inputPath, long len)
     : base(_enclosing)
 {
     this._enclosing = _enclosing;
     this.inputPath  = inputPath;
     this.len        = len;
 }
示例#3
0
 public _FSAction_680(FileSystemRMStateStore _enclosing, Path path, PathFilter filter
                      )
     : base(_enclosing)
 {
     this._enclosing = _enclosing;
     this.path       = path;
     this.filter     = filter;
 }
示例#4
0
 public _FSAction_601(FileSystemRMStateStore _enclosing, Path outputPath, byte[] data
                      , bool makeUnreadableByAdmin)
     : base(_enclosing)
 {
     this._enclosing            = _enclosing;
     this.outputPath            = outputPath;
     this.data                  = data;
     this.makeUnreadableByAdmin = makeUnreadableByAdmin;
 }
示例#5
0
        /// <exception cref="System.Exception"/>
        protected internal override void ModifyRMDelegationTokenState()
        {
            // imitate dt file is still .new, but old one is deleted
            Path nodeCreatePath = fsTester.store.GetNodePath(fsTester.store.rmDTSecretManagerRoot
                                                             , FileSystemRMStateStore.DelegationTokenPrefix + 0);
            FileSystemRMStateStore fileSystemRMStateStore = (FileSystemRMStateStore)fsTester.
                                                            GetRMStateStore();

            fileSystemRMStateStore.RenameFile(nodeCreatePath, new Path(nodeCreatePath.GetParent
                                                                           (), nodeCreatePath.GetName() + ".new"));
        }
示例#6
0
        /// <exception cref="System.Exception"/>
        protected internal override void ModifyAppState()
        {
            // imitate appAttemptFile1 is still .new, but old one is deleted
            string appAttemptIdStr1         = "appattempt_1352994193343_0001_000001";
            ApplicationAttemptId attemptId1 = ConverterUtils.ToApplicationAttemptId(appAttemptIdStr1
                                                                                    );
            Path appDir          = fsTester.store.GetAppDir(attemptId1.GetApplicationId().ToString());
            Path appAttemptFile1 = new Path(appDir, attemptId1.ToString() + ".new");
            FileSystemRMStateStore fileSystemRMStateStore = (FileSystemRMStateStore)fsTester.
                                                            GetRMStateStore();

            fileSystemRMStateStore.RenameFile(appAttemptFile1, new Path(appAttemptFile1.GetParent
                                                                            (), appAttemptFile1.GetName() + ".new"));
        }
示例#7
0
        /// <exception cref="System.Exception"/>
        public virtual void TestFSRMStateStore()
        {
            HdfsConfiguration conf    = new HdfsConfiguration();
            MiniDFSCluster    cluster = new MiniDFSCluster.Builder(conf).NumDataNodes(1).Build();

            try
            {
                fsTester = new TestFSRMStateStore.TestFSRMStateStoreTester(this, cluster, false);
                // If the state store is FileSystemRMStateStore then add corrupted entry.
                // It should discard the entry and remove it from file system.
                FSDataOutputStream     fsOut = null;
                FileSystemRMStateStore fileSystemRMStateStore = (FileSystemRMStateStore)fsTester.
                                                                GetRMStateStore();
                string appAttemptIdStr3         = "appattempt_1352994193343_0001_000003";
                ApplicationAttemptId attemptId3 = ConverterUtils.ToApplicationAttemptId(appAttemptIdStr3
                                                                                        );
                Path appDir             = fsTester.store.GetAppDir(attemptId3.GetApplicationId().ToString());
                Path tempAppAttemptFile = new Path(appDir, attemptId3.ToString() + ".tmp");
                fsOut = fileSystemRMStateStore.fs.Create(tempAppAttemptFile, false);
                fsOut.Write(Sharpen.Runtime.GetBytesForString("Some random data "));
                fsOut.Close();
                TestRMAppStateStore(fsTester);
                NUnit.Framework.Assert.IsFalse(fsTester.workingDirPathURI.GetFileSystem(conf).Exists
                                                   (tempAppAttemptFile));
                TestRMDTSecretManagerStateStore(fsTester);
                TestCheckVersion(fsTester);
                TestEpoch(fsTester);
                TestAppDeletion(fsTester);
                TestDeleteStore(fsTester);
                TestAMRMTokenSecretManagerStateStore(fsTester);
            }
            finally
            {
                cluster.Shutdown();
            }
        }
示例#8
0
 public _FSAction_689(FileSystemRMStateStore _enclosing)
     : base(_enclosing)
 {
     this._enclosing = _enclosing;
 }
示例#9
0
 public _FSAction_670(FileSystemRMStateStore _enclosing, Path path)
     : base(_enclosing)
 {
     this._enclosing = _enclosing;
     this.path       = path;
 }
示例#10
0
 public _FSAction_631(FileSystemRMStateStore _enclosing, Path newFile)
     : base(_enclosing)
 {
     this._enclosing = _enclosing;
     this.newFile    = newFile;
 }
示例#11
0
 public _FSAction_611(FileSystemRMStateStore _enclosing, Path deletePath)
     : base(_enclosing)
 {
     this._enclosing = _enclosing;
     this.deletePath = deletePath;
 }
示例#12
0
 public _FSAction_589(FileSystemRMStateStore _enclosing, Path appDirPath)
     : base(_enclosing)
 {
     this._enclosing = _enclosing;
     this.appDirPath = appDirPath;
 }
示例#13
0
 public _FSAction_580(FileSystemRMStateStore _enclosing, Path record)
     : base(_enclosing)
 {
     this._enclosing = _enclosing;
     this.record     = record;
 }
示例#14
0
 internal FSAction(FileSystemRMStateStore _enclosing)
 {
     this._enclosing = _enclosing;
 }