/// <summary> /// Validate and set clusterId from /// <see cref="Sharpen.Properties"/> /// /// </summary> /// <exception cref="Org.Apache.Hadoop.Hdfs.Server.Common.InconsistentFSStateException /// "/> protected internal virtual void SetClusterId(Properties props, int layoutVersion, Storage.StorageDirectory sd) { // Set cluster ID in version that supports federation if (LayoutVersion.Supports(GetServiceLayoutFeatureMap(), LayoutVersion.Feature.Federation , layoutVersion)) { string cid = GetProperty(props, sd, "clusterID"); if (!(clusterID.Equals(string.Empty) || cid.Equals(string.Empty) || clusterID.Equals (cid))) { throw new InconsistentFSStateException(sd.GetRoot(), "cluster Id is incompatible with others." ); } clusterID = cid; } }
public void setLayoutVersion(LayoutVersion version) { mLayoutVersion = version; }
public static bool Supports(LayoutVersion.LayoutFeature f, int lv) { return(LayoutVersion.Supports(Features, f, lv)); }
static DataNodeLayoutVersion() { LayoutVersion.UpdateMap(Features, LayoutVersion.Feature.Values()); LayoutVersion.UpdateMap(Features, DataNodeLayoutVersion.Feature.Values()); }
public virtual bool VersionSupportsFederation(IDictionary <int, ICollection <LayoutVersion.LayoutFeature > > map) { return(LayoutVersion.Supports(map, LayoutVersion.Feature.Federation, layoutVersion )); }
static NameNodeLayoutVersion() { LayoutVersion.UpdateMap(Features, LayoutVersion.Feature.Values()); LayoutVersion.UpdateMap(Features, NameNodeLayoutVersion.Feature.Values()); }