public virtual void TestDataNodeFeature() { LayoutVersion.LayoutFeature first = DataNodeLayoutVersion.Feature.FirstLayout; NUnit.Framework.Assert.IsTrue(DataNodeLayoutVersion.Supports(LastNonReservedCommonFeature , first.GetInfo().GetLayoutVersion())); NUnit.Framework.Assert.AreEqual(LastCommonFeature.GetInfo().GetLayoutVersion() - 1, first.GetInfo().GetLayoutVersion()); }
/// <exception cref="System.IO.IOException"/> public static void CreateBlockPoolVersionFile(FilePath bpDir, StorageInfo version , string bpid) { // Create block pool version files if (DataNodeLayoutVersion.Supports(LayoutVersion.Feature.Federation, version.layoutVersion )) { FilePath bpCurDir = new FilePath(bpDir, Storage.StorageDirCurrent); BlockPoolSliceStorage bpStorage = new BlockPoolSliceStorage(version, bpid); FilePath versionFile = new FilePath(bpCurDir, "VERSION"); Storage.StorageDirectory sd = new Storage.StorageDirectory(bpDir); bpStorage.WriteProperties(versionFile, sd); } }