Ejemplo n.º 1
0
        /// <summary>
        /// Perform a upgrade using the test image corresponding to
        /// testCaseName.
        /// </summary>
        /// <param name="testCaseName"/>
        /// <param name="expectedStorageId">
        /// if null, then the upgrade generates a new
        /// unique storage ID.
        /// </param>
        /// <exception cref="System.IO.IOException"/>
        private static void RunLayoutUpgradeTest(string testCaseName, string expectedStorageId
                                                 )
        {
            TestDFSUpgradeFromImage upgrade = new TestDFSUpgradeFromImage();

            upgrade.UnpackStorage(testCaseName + ".tgz", testCaseName + ".txt");
            Configuration conf = new Configuration(TestDFSUpgradeFromImage.upgradeConf);

            InitStorageDirs(conf, testCaseName);
            UpgradeAndVerify(upgrade, conf, new _ClusterVerifier_70(expectedStorageId));
        }
Ejemplo n.º 2
0
        public virtual void TestUpgradeToIdBasedLayout()
        {
            // Upgrade from LDir-based layout to block ID-based layout -- change described
            // in HDFS-6482
            TestDFSUpgradeFromImage upgrade = new TestDFSUpgradeFromImage();

            upgrade.UnpackStorage(Hadoop24Datanode, HadoopDatanodeDirTxt);
            Configuration conf = new Configuration(TestDFSUpgradeFromImage.upgradeConf);

            conf.Set(DFSConfigKeys.DfsDatanodeDataDirKey, Runtime.GetProperty("test.build.data"
                                                                              ) + FilePath.separator + "dfs" + FilePath.separator + "data");
            conf.Set(DFSConfigKeys.DfsNamenodeNameDirKey, Runtime.GetProperty("test.build.data"
                                                                              ) + FilePath.separator + "dfs" + FilePath.separator + "name");
            upgrade.UpgradeAndVerify(new MiniDFSCluster.Builder(conf).NumDataNodes(1).ManageDataDfsDirs
                                         (false).ManageNameDfsDirs(false), null);
        }