Class FixedBlockResolver
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.BlockResolver
org.apache.hadoop.hdfs.server.namenode.FixedBlockResolver
- All Implemented Interfaces:
Configurable
- Direct Known Subclasses:
FixedBlockMultiReplicaResolver
Resolver mapping all files to a configurable, uniform blocksize.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConf()Return the configuration used by this object.intlonglastId()longnextId()longvoidsetConf(Configuration conf) Set the configuration to be used by this object.Methods inherited from class org.apache.hadoop.hdfs.server.namenode.BlockResolver
buildBlock, buildBlock, resolve
-
Field Details
-
BLOCKSIZE
- See Also:
-
START_BLOCK
- See Also:
-
BLOCKSIZE_DEFAULT
public static final long BLOCKSIZE_DEFAULT- See Also:
-
-
Constructor Details
-
FixedBlockResolver
public FixedBlockResolver()
-
-
Method Details
-
setConf
Description copied from interface:ConfigurableSet the configuration to be used by this object.- Specified by:
setConfin interfaceConfigurable- Parameters:
conf- configuration to be used
-
getConf
Description copied from interface:ConfigurableReturn the configuration used by this object.- Specified by:
getConfin interfaceConfigurable- Returns:
- Configuration
-
blockLengths
- Specified by:
blockLengthsin classBlockResolver- Parameters:
s- the external reference.- Returns:
- the lengths of the resultant blocks.
-
nextId
public long nextId()- Specified by:
nextIdin classBlockResolver- Returns:
- the next block id.
-
lastId
public long lastId()- Specified by:
lastIdin classBlockResolver- Returns:
- the maximum sequentially allocated block ID for this filesystem.
-
preferredBlockSize
- Overrides:
preferredBlockSizein classBlockResolver- Parameters:
s- the external reference.- Returns:
- the block size to assign to this external reference.
-
getReplication
- Specified by:
getReplicationin classBlockResolver- Parameters:
s- the external reference.- Returns:
- the replication to assign to this external reference.
-