/** * Gets the current generation stamp for legacy blocks */ public long getLegacyGenerationStamp() { return legacyGenerationStamp.getCurrentValue(); }
public long getGenerationStamp() { return generationStamp.getCurrentValue(); }
/** * Upgrades the generation stamp for the filesystem * by reserving a sufficient range for all existing blocks. * Should be invoked only during the first upgrade to * sequential block IDs. */ public long upgradeLegacyGenerationStamp() { Preconditions.checkState(generationStamp.getCurrentValue() == GenerationStamp.LAST_RESERVED_STAMP); generationStamp.skipTo(legacyGenerationStamp.getCurrentValue() + HdfsServerConstants.RESERVED_LEGACY_GENERATION_STAMPS); legacyGenerationStampLimit = generationStamp.getCurrentValue(); return generationStamp.getCurrentValue(); }
public long getGenerationStampV2() { return generationStampV2.getCurrentValue(); }
/** * Gets the current generation stamp for legacy blocks */ public long getGenerationStampV1() { return generationStampV1.getCurrentValue(); }
/** * Gets the current generation stamp for legacy blocks */ public long getGenerationStampV1() { return generationStampV1.getCurrentValue(); }
public long getGenerationStampV2() { return generationStampV2.getCurrentValue(); }
/** * Upgrades the generation stamp for the filesystem * by reserving a sufficient range for all existing blocks. * Should be invoked only during the first upgrade to * sequential block IDs. */ public long upgradeGenerationStampToV2() { Preconditions.checkState(generationStampV2.getCurrentValue() == GenerationStamp.LAST_RESERVED_STAMP); generationStampV2.skipTo(generationStampV1.getCurrentValue() + HdfsConstants.RESERVED_GENERATION_STAMPS_V1); generationStampV1Limit = generationStampV2.getCurrentValue(); return generationStampV2.getCurrentValue(); }
/** * Upgrades the generation stamp for the filesystem * by reserving a sufficient range for all existing blocks. * Should be invoked only during the first upgrade to * sequential block IDs. */ public long upgradeGenerationStampToV2() { Preconditions.checkState(generationStampV2.getCurrentValue() == GenerationStamp.LAST_RESERVED_STAMP); generationStampV2.skipTo(generationStampV1.getCurrentValue() + HdfsConstants.RESERVED_GENERATION_STAMPS_V1); generationStampV1Limit = generationStampV2.getCurrentValue(); return generationStampV2.getCurrentValue(); }