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 |
---|---|
long |
getGenerationStamp() |
long |
getGenerationStampAtblockIdSwitch()
Gets the value of the generation stamp that delineates sequential
and random block IDs.
|
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 |
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 long getGenerationStamp()
public long getLegacyGenerationStampLimit()
Copyright © 2018 Apache Software Foundation. All Rights Reserved.