Example #1
0
            /// <exception cref="System.IO.IOException"/>
            public void VerifyClusterPostUpgrade(MiniDFSCluster cluster)
            {
                // Verify that a GUID-based storage ID was generated.
                string bpid = cluster.GetNamesystem().GetBlockPoolId();

                StorageReport[] reports = cluster.GetDataNodes()[0].GetFSDataset().GetStorageReports
                                              (bpid);
                Assert.AssertThat(reports.Length, IS.Is(1));
                string storageID = reports[0].GetStorage().GetStorageID();

                NUnit.Framework.Assert.IsTrue(DatanodeStorage.IsValidStorageId(storageID));
                if (expectedStorageId != null)
                {
                    Assert.AssertThat(storageID, IS.Is(expectedStorageId));
                }
            }