public class BlockIdManager extends Object
FSNamesystem
is responsible for persisting the allocations in the
EditLog
.Constructor and Description |
---|
BlockIdManager(org.apache.hadoop.hdfs.server.blockmanagement.BlockManager blockManager) |
Modifier and Type | Method and Description |
---|---|
void |
applyImpendingGenerationStamp()
Set the current genstamp to the impending genstamp.
|
long |
getGenerationStamp() |
long |
getGenerationStampAtblockIdSwitch()
Gets the value of the generation stamp that delineates sequential
and random block IDs.
|
long |
getImpendingGenerationStamp() |
long |
getLastAllocatedBlockId()
Gets the maximum sequentially allocated block ID for this filesystem
|
long |
getLegacyGenerationStamp()
Gets the current generation stamp for legacy blocks
|
long |
getLegacyGenerationStampLimit() |
void |
setGenerationStamp(long stamp)
Gets the current generation stamp for this filesystem
|
void |
setGenerationStampIfGreater(long stamp)
Set genstamp only when the given one is higher.
|
void |
setImpendingGenerationStamp(long stamp)
Set the currently highest gen stamp from active.
|
void |
setLastAllocatedBlockId(long blockId)
Sets the maximum allocated block ID for this filesystem.
|
void |
setLegacyGenerationStamp(long stamp)
Sets the current generation stamp for legacy blocks
|
void |
setLegacyGenerationStampLimit(long stamp)
Sets the generation stamp that delineates random and sequentially
allocated block IDs.
|
long |
upgradeLegacyGenerationStamp()
Upgrades the generation stamp for the filesystem
by reserving a sufficient range for all existing blocks.
|
public BlockIdManager(org.apache.hadoop.hdfs.server.blockmanagement.BlockManager blockManager)
public long upgradeLegacyGenerationStamp()
public void setLegacyGenerationStampLimit(long stamp)
stamp
- set generation stamp limit to this valuepublic long getGenerationStampAtblockIdSwitch()
public void setLastAllocatedBlockId(long blockId)
public long getLastAllocatedBlockId()
public void setLegacyGenerationStamp(long stamp)
public long getLegacyGenerationStamp()
public void setGenerationStamp(long stamp)
public void setImpendingGenerationStamp(long stamp)
stamp
- new genstamppublic void applyImpendingGenerationStamp()
public long getImpendingGenerationStamp()
public void setGenerationStampIfGreater(long stamp)
stamp
- public long getGenerationStamp()
public long getLegacyGenerationStampLimit()
Copyright © 2022 Apache Software Foundation. All rights reserved.