示例#1
0
 internal CheckpointSignature(FSImage fsImage)
     : base(fsImage.GetStorage())
 {
     blockpoolID = fsImage.GetBlockPoolID();
     mostRecentCheckpointTxId = fsImage.GetStorage().GetMostRecentCheckpointTxId();
     curSegmentTxId           = fsImage.GetEditLog().GetCurSegmentTxId();
 }
示例#2
0
 /// <exception cref="System.IO.IOException"/>
 internal virtual void ValidateStorageInfo(FSImage si)
 {
     if (!IsSameCluster(si) || !StorageVersionMatches(si.GetStorage()))
     {
         throw new IOException("Inconsistent checkpoint fields.\n" + "LV = " + layoutVersion
                               + " namespaceID = " + namespaceID + " cTime = " + cTime + " ; clusterId = " + clusterID
                               + " ; blockpoolId = " + blockpoolID + ".\nExpecting respectively: " + si.GetStorage
                                   ().layoutVersion + "; " + si.GetStorage().namespaceID + "; " + si.GetStorage().cTime
                               + "; " + si.GetClusterID() + "; " + si.GetBlockPoolID() + ".");
     }
 }
示例#3
0
 internal virtual bool IsSameCluster(FSImage si)
 {
     return(namespaceID == si.GetStorage().namespaceID&& clusterID.Equals(si.GetClusterID
                                                                              ()) && blockpoolID.Equals(si.GetBlockPoolID()));
 }