Ejemplo n.º 1
0
 public virtual void TestStartupOptUpgradeFrom204()
 {
     layoutVersion = LayoutVersion.Feature.ReservedRel20204.GetInfo().GetLayoutVersion
                         ();
     storage.ProcessStartupOptionsForUpgrade(startOpt, layoutVersion);
     NUnit.Framework.Assert.IsTrue("Clusterid should start with CID", storage.GetClusterID
                                       ().StartsWith("CID"));
 }
Ejemplo n.º 2
0
 /// <exception cref="System.IO.IOException"/>
 public virtual void ValidateStorage(NNStorage storage)
 {
     if (layoutVersion != storage.GetLayoutVersion() || namespaceID != storage.GetNamespaceID
             () || cTime != storage.cTime || !clusterID.Equals(storage.GetClusterID()) || !blockPoolID
         .Equals(storage.GetBlockPoolID()))
     {
         throw new IOException("Inconsistent namespace information:\n" + "NamespaceInfo has:\n"
                               + "LV=" + layoutVersion + ";" + "NS=" + namespaceID + ";" + "cTime=" + cTime +
                               ";" + "CID=" + clusterID + ";" + "BPID=" + blockPoolID + ".\nStorage has:\n" + "LV="
                               + storage.GetLayoutVersion() + ";" + "NS=" + storage.GetNamespaceID() + ";" + "cTime="
                               + storage.GetCTime() + ";" + "CID=" + storage.GetClusterID() + ";" + "BPID=" +
                               storage.GetBlockPoolID() + ".");
     }
 }