public class NameNode extends Object implements ClientProtocol, DatanodeProtocol, NamenodeProtocol, FSConstants, RefreshAuthorizationPolicyProtocol, RefreshUserMappingsProtocol
FSConstants.DatanodeReportType, FSConstants.SafeModeAction, FSConstants.UpgradeAction
限定符和类型 | 字段和说明 |
---|---|
static int |
DEFAULT_PORT |
static org.apache.commons.logging.Log |
LOG |
protected InetSocketAddress |
serviceRPCAddress
RPC server for DN address
|
static org.apache.commons.logging.Log |
stateChangeLog |
GET_STATS_CAPACITY_IDX, GET_STATS_CORRUPT_BLOCKS_IDX, GET_STATS_MISSING_BLOCKS_IDX, GET_STATS_REMAINING_IDX, GET_STATS_UNDER_REPLICATED_IDX, GET_STATS_USED_IDX, versionID
DISK_ERROR, DNA_ACCESSKEYUPDATE, DNA_BALANCERBANDWIDTHUPDATE, DNA_FINALIZE, DNA_INVALIDATE, DNA_RECOVERBLOCK, DNA_REGISTER, DNA_SHUTDOWN, DNA_TRANSFER, DNA_UNKNOWN, FATAL_DISK_ERROR, INVALID_BLOCK, NOTIFY, versionID
versionID
BLOCKREPORT_INITIAL_DELAY, BLOCKREPORT_INTERVAL, BUFFER_SIZE, DEFAULT_BLOCK_SIZE, DEFAULT_DATA_SOCKET_SIZE, HEARTBEAT_INTERVAL, LAYOUT_VERSION, LEASE_HARDLIMIT_PERIOD, LEASE_RECOVER_PERIOD, LEASE_SOFTLIMIT_PERIOD, MAX_PATH_DEPTH, MAX_PATH_LENGTH, MIN_BLOCKS_FOR_WRITE, QUOTA_DONT_SET, QUOTA_RESET, SIZE_OF_INTEGER, SMALL_BUFFER_SIZE
versionID
versionID
构造器和说明 |
---|
NameNode(Configuration conf)
Start NameNode.
|
限定符和类型 | 方法和说明 |
---|---|
void |
abandonBlock(Block b,
String src,
String holder)
The client needs to give up on the block.
|
LocatedBlock |
addBlock(String src,
String clientName)
Stub for 0.20 clients that don't support HDFS-630
|
LocatedBlock |
addBlock(String src,
String clientName,
DatanodeInfo[] excludedNodes)
A client that wants to write an additional block to the
indicated filename (which must currently be open for writing)
should call addBlock().
|
LocatedBlock |
append(String src,
String clientName)
Append to the end of the file.
|
void |
blockReceived(DatanodeRegistration nodeReg,
Block[] blocks,
String[] delHints)
blockReceived() allows the DataNode to tell the NameNode about
recently-received block data, with a hint for pereferred replica
to be deleted when there is any excessive blocks.
|
DatanodeCommand |
blockReport(DatanodeRegistration nodeReg,
long[] blocks)
blockReport() tells the NameNode about all the locally-stored blocks.
|
void |
blocksBeingWrittenReport(DatanodeRegistration nodeReg,
long[] blocks)
add new replica blocks to the Inode to target mapping
also add the Inode file to DataNodeDesc
|
void |
cancelDelegationToken(Token<DelegationTokenIdentifier> token)
Cancel an existing delegation token.
|
void |
commitBlockSynchronization(Block block,
long newgenerationstamp,
long newlength,
boolean closeFile,
boolean deleteblock,
DatanodeID[] newtargets)
Commit block synchronization in lease recovery
|
boolean |
complete(String src,
String clientName)
The client is done writing data to the given filename, and would
like to complete it.
|
void |
concat(String trg,
String[] src)
Moves blocks from srcs to trg and delete srcs
|
void |
create(String src,
FsPermission masked,
String clientName,
boolean overwrite,
boolean createParent,
short replication,
long blockSize)
Create a new file entry in the namespace.
|
void |
create(String src,
FsPermission masked,
String clientName,
boolean overwrite,
short replication,
long blockSize)
已过时。
|
static NameNode |
createNameNode(String[] argv,
Configuration conf) |
boolean |
delete(String src)
已过时。
|
boolean |
delete(String src,
boolean recursive)
Delete the given file or directory from the file system.
|
UpgradeStatusReport |
distributedUpgradeProgress(FSConstants.UpgradeAction action)
Report distributed upgrade progress or force current upgrade to proceed.
|
void |
errorReport(DatanodeRegistration nodeReg,
int errorCode,
String msg)
errorReport() tells the NameNode about something that has gone
awry.
|
void |
finalizeUpgrade()
Finalize previous upgrade.
|
static void |
format(Configuration conf)
Format a new filesystem.
|
void |
fsync(String src,
String clientName)
Write all metadata for this file into persistent storage.
|
static InetSocketAddress |
getAddress(Configuration conf) |
static InetSocketAddress |
getAddress(String address) |
ExportedBlockKeys |
getBlockKeys()
Get the current block keys
|
LocatedBlocks |
getBlockLocations(String src,
long offset,
long length)
Get locations of the blocks of the specified file within the specified range.
|
BlocksWithLocations |
getBlocks(DatanodeInfo datanode,
long size)
return a list of blocks & their locations on
datanode whose
total size is size |
ContentSummary |
getContentSummary(String path)
Get
ContentSummary rooted at the specified directory. |
DatanodeInfo[] |
getDatanodeReport(FSConstants.DatanodeReportType type)
Get a report on the system's current datanodes.
|
Token<DelegationTokenIdentifier> |
getDelegationToken(Text renewer)
Get a valid Delegation Token.
|
long |
getEditLogSize()
Returns the size of the current edit log.
|
HdfsFileStatus |
getFileInfo(String src)
Get the file info for a specific file.
|
FSImage |
getFSImage() |
File |
getFsImageName()
Returns the name of the fsImage file
|
File[] |
getFsImageNameCheckpoint()
Returns the name of the fsImage file uploaded by periodic
checkpointing
|
InetSocketAddress |
getHttpAddress()
Returns the address of the NameNodes http server,
which is used to access the name-node web UI.
|
static String |
getHttpUriScheme() |
static String |
getInfoServer(Configuration conf) |
DirectoryListing |
getListing(String src,
byte[] startAfter)
Get a partial listing of the indicated directory
|
InetSocketAddress |
getNameNodeAddress()
Returns the address on which the NameNodes is listening to.
|
static NameNodeInstrumentation |
getNameNodeMetrics() |
FSNamesystem |
getNamesystem() |
long |
getPreferredBlockSize(String filename)
Get the block size for the given file.
|
long |
getProtocolVersion(String protocol,
long clientVersion)
Return protocol version corresponding to protocol interface.
|
static InetSocketAddress |
getServiceAddress(Configuration conf,
boolean fallback)
Fetches the address for services to use when connecting to namenode
based on the value of fallback returns null if the special
address is not specified or returns the default namenode address
to be used by both clients and services.
|
protected InetSocketAddress |
getServiceRpcServerAddress(Configuration conf)
Given a configuration get the address of the service rpc server
If the service rpc is not configured returns null
|
long[] |
getStats()
Get a set of statistics about the filesystem.
|
static URI |
getUri(InetSocketAddress namenode) |
boolean |
isFileClosed(String src)
Get the close status of a file
|
boolean |
isInSafeMode()
Is the cluster currently in safe mode?
|
void |
join()
Wait for service to finish.
|
static void |
main(String[] argv) |
void |
metaSave(String filename)
Dumps namenode state into specified file
|
boolean |
mkdirs(String src,
FsPermission masked)
Create a directory (or hierarchy of directories) with the given
name and permission.
|
long |
nextGenerationStamp(Block block,
boolean fromNN)
Get the next GenerationStamp to be associated with the specified
block.
|
UpgradeCommand |
processUpgradeCommand(UpgradeCommand comm)
This is a very general way to send a command to the name-node during
distributed upgrade process.
|
boolean |
recoverLease(String src,
String clientName)
Start lease recovery
|
void |
refreshNodes()
Refresh the list of datanodes that the namenode should allow to
connect.
|
void |
refreshServiceAcl()
Refresh the service-level authorization policy in-effect.
|
void |
refreshSuperUserGroupsConfiguration()
Refresh superuser proxy group list
|
void |
refreshUserToGroupsMappings()
Refresh user to group mappings.
|
DatanodeRegistration |
register(DatanodeRegistration nodeReg)
Register Datanode.
|
boolean |
rename(String src,
String dst)
Rename an item in the file system namespace.
|
long |
renewDelegationToken(Token<DelegationTokenIdentifier> token)
Renew an existing delegation token.
|
void |
renewLease(String clientName)
Client programs can cause stateful changes in the NameNode
that affect other clients.
|
void |
reportBadBlocks(LocatedBlock[] blocks)
The client has detected an error on the specified located blocks
and is reporting them to the server.
|
CheckpointSignature |
rollEditLog()
Roll the edit log.
|
void |
rollFsImage()
Roll the image
|
void |
saveNamespace()
Save namespace image.
|
DatanodeCommand[] |
sendHeartbeat(DatanodeRegistration nodeReg,
long capacity,
long dfsUsed,
long remaining,
int xmitsInProgress,
int xceiverCount)
Data node notify the name node that it is alive
Return an array of block-oriented commands for the datanode to execute.
|
void |
setBalancerBandwidth(long bandwidth)
Tell all datanodes to use a new, non-persistent bandwidth value for
dfs.balance.bandwidthPerSec.
|
void |
setNamesystem(FSNamesystem ns) |
void |
setOwner(String src,
String username,
String groupname)
Set owner of a path (i.e. a file or a directory).
|
void |
setPermission(String src,
FsPermission permissions)
Set permissions for an existing file/directory.
|
void |
setQuota(String path,
long namespaceQuota,
long diskspaceQuota)
Set the quota for a directory.
|
boolean |
setReplication(String src,
short replication)
Set replication for an existing file.
|
protected void |
setRpcServiceServerAddress(Configuration conf)
Modifies the configuration passed to contain the service rpc address setting
|
boolean |
setSafeMode(FSConstants.SafeModeAction action)
Enter, leave or get safe mode.
|
static void |
setServiceAddress(Configuration conf,
String address)
Set the configuration property for the service rpc address
to address
|
void |
setTimes(String src,
long mtime,
long atime)
Sets the modification and access time of the file to the specified time.
|
void |
stop()
Stop all NameNode threads and wait for all to finish.
|
void |
verifyRequest(DatanodeRegistration nodeReg)
Verify request.
|
void |
verifyVersion(int version)
Verify version.
|
NamespaceInfo |
versionRequest() |
public static final int DEFAULT_PORT
public static final org.apache.commons.logging.Log LOG
public static final org.apache.commons.logging.Log stateChangeLog
protected InetSocketAddress serviceRPCAddress
public NameNode(Configuration conf) throws IOException
The name-node can be started with one of the following startup options:
REGULAR
- normal name node startupFORMAT
- format name nodeUPGRADE
- start the cluster
RECOVER
- recover name node
metadataROLLBACK
- roll the
cluster back to the previous statezero
in the conf.conf
- confirgurationIOException
public long getProtocolVersion(String protocol, long clientVersion) throws IOException
VersionedProtocol
getProtocolVersion
在接口中 VersionedProtocol
protocol
- The classname of the protocol interfaceclientVersion
- The version of the protocol that the client speaksIOException
public static void format(Configuration conf) throws IOException
IOException
public void setNamesystem(FSNamesystem ns)
public FSNamesystem getNamesystem()
public static NameNodeInstrumentation getNameNodeMetrics()
public static InetSocketAddress getAddress(String address)
public static void setServiceAddress(Configuration conf, String address)
public static InetSocketAddress getServiceAddress(Configuration conf, boolean fallback)
public static InetSocketAddress getAddress(Configuration conf)
public static URI getUri(InetSocketAddress namenode)
protected InetSocketAddress getServiceRpcServerAddress(Configuration conf) throws IOException
IOException
protected void setRpcServiceServerAddress(Configuration conf)
public static String getInfoServer(Configuration conf)
public static String getHttpUriScheme()
public void join()
public void stop()
public BlocksWithLocations getBlocks(DatanodeInfo datanode, long size) throws IOException
datanode
whose
total size is size
getBlocks
在接口中 NamenodeProtocol
datanode
- on which blocks are locatedsize
- total size of blocksIOException
public Token<DelegationTokenIdentifier> getDelegationToken(Text renewer) throws IOException
ClientProtocol
getDelegationToken
在接口中 ClientProtocol
renewer
- the designated renewer for the tokenIOException
public long renewDelegationToken(Token<DelegationTokenIdentifier> token) throws SecretManager.InvalidToken, IOException
ClientProtocol
renewDelegationToken
在接口中 ClientProtocol
token
- delegation token obtained earlierIOException
SecretManager.InvalidToken
public void cancelDelegationToken(Token<DelegationTokenIdentifier> token) throws IOException
ClientProtocol
cancelDelegationToken
在接口中 ClientProtocol
token
- delegation tokenIOException
public LocatedBlocks getBlockLocations(String src, long offset, long length) throws IOException
Return LocatedBlocks
which contains
file length, blocks and their locations.
DataNode locations for each block are sorted by
the distance to the client's address.
The client will then have to contact one of the indicated DataNodes to obtain the actual data.
getBlockLocations
在接口中 ClientProtocol
src
- file nameoffset
- range start offsetlength
- range lengthIOException
@Deprecated public void create(String src, FsPermission masked, String clientName, boolean overwrite, short replication, long blockSize) throws IOException
ClientProtocol
create
在接口中 ClientProtocol
IOException
public void create(String src, FsPermission masked, String clientName, boolean overwrite, boolean createParent, short replication, long blockSize) throws IOException
This will create an empty file specified by the source path. The path should reflect a full path originated at the root. The name-node does not have a notion of "current" directory for a client.
Once created, the file is visible and available for read to other clients.
Although, other clients cannot ClientProtocol.delete(String)
, re-create or
ClientProtocol.rename(String, String)
it until the file is completed
or explicitly as a result of lease expiration.
Blocks have a maximum size. Clients that intend to
create multi-block files must also use ClientProtocol.addBlock(String, String)
.
create
在接口中 ClientProtocol
src
- path of the file being created.masked
- masked permission.clientName
- name of the current client.overwrite
- indicates whether the file should be
overwritten if it already exists.createParent
- create missing parent directory if truereplication
- block replication factor.blockSize
- maximum block size.AccessControlException
- if permission to create file is
denied by the system. As usually on the client side the exception will
be wrapped into RemoteException
.QuotaExceededException
- if the file creation violates
any quota restrictionIOException
- if other errors occur.public LocatedBlock append(String src, String clientName) throws IOException
append
在接口中 ClientProtocol
src
- path of the file being created.clientName
- name of the current client.AccessControlException
- if permission to append file is
denied by the system. As usually on the client side the exception will
be wrapped into RemoteException
.
Allows appending to an existing file if the server is
configured with the parameter dfs.support.broken.append set to true, otherwise
throws an IOException.IOException
- if other errors occur.public boolean isFileClosed(String src) throws IOException
isFileClosed
在接口中 ClientProtocol
src
- The string representation of the path to the fileAccessControlException
- permission deniedFileNotFoundException
- file src
is not foundIOException
- If an I/O error occurredpublic boolean recoverLease(String src, String clientName) throws IOException
recoverLease
在接口中 ClientProtocol
src
- path of the file to start lease recoveryclientName
- name of the current clientIOException
public boolean setReplication(String src, short replication) throws IOException
The NameNode sets replication to the new value and returns. The actual block replication is not expected to be performed during this method call. The blocks will be populated or removed in the background as the result of the routine block maintenance procedures.
setReplication
在接口中 ClientProtocol
src
- file namereplication
- new replicationIOException
public void setPermission(String src, FsPermission permissions) throws IOException
setPermission
在接口中 ClientProtocol
IOException
public void setOwner(String src, String username, String groupname) throws IOException
setOwner
在接口中 ClientProtocol
username
- If it is null, the original username remains unchanged.groupname
- If it is null, the original groupname remains unchanged.IOException
public LocatedBlock addBlock(String src, String clientName) throws IOException
addBlock
在接口中 ClientProtocol
IOException
public LocatedBlock addBlock(String src, String clientName, DatanodeInfo[] excludedNodes) throws IOException
ClientProtocol
addBlock
在接口中 ClientProtocol
excludedNodes
- a list of nodes that should not be allocatedIOException
public void abandonBlock(Block b, String src, String holder) throws IOException
abandonBlock
在接口中 ClientProtocol
IOException
public boolean complete(String src, String clientName) throws IOException
complete
在接口中 ClientProtocol
IOException
public void reportBadBlocks(LocatedBlock[] blocks) throws IOException
reportBadBlocks
在接口中 ClientProtocol
reportBadBlocks
在接口中 DatanodeProtocol
blocks
- Array of located blocks to reportIOException
public long nextGenerationStamp(Block block, boolean fromNN) throws IOException
nextGenerationStamp
在接口中 DatanodeProtocol
block
- blockfromNN
- if it is for lease recovery initiated by NameNodeIOException
public void commitBlockSynchronization(Block block, long newgenerationstamp, long newlength, boolean closeFile, boolean deleteblock, DatanodeID[] newtargets) throws IOException
commitBlockSynchronization
在接口中 DatanodeProtocol
IOException
public long getPreferredBlockSize(String filename) throws IOException
ClientProtocol
getPreferredBlockSize
在接口中 ClientProtocol
filename
- The name of the fileIOException
public void concat(String trg, String[] src) throws IOException
concat
在接口中 ClientProtocol
trg
- existing filesrc
- - list of existing files (same block size, same replication)IOException
- if some arguments are invalidpublic boolean rename(String src, String dst) throws IOException
ClientProtocol
rename
在接口中 ClientProtocol
src
- existing file or directory name.dst
- new name.IOException
- if the new name is invalid.QuotaExceededException
- if the rename would violate
any quota restriction@Deprecated public boolean delete(String src) throws IOException
ClientProtocol
Any blocks belonging to the deleted files will be garbage-collected.
delete
在接口中 ClientProtocol
src
- existing name.IOException
public boolean delete(String src, boolean recursive) throws IOException
same as delete but provides a way to avoid accidentally deleting non empty directories programmatically.
delete
在接口中 ClientProtocol
src
- existing namerecursive
- if true deletes a non empty directory recursively,
else throws an exception.IOException
public boolean mkdirs(String src, FsPermission masked) throws IOException
mkdirs
在接口中 ClientProtocol
src
- The path of the directory being createdmasked
- The masked permission of the directory being createdQuotaExceededException
- if the operation would violate
any quota restriction.IOException
public void renewLease(String clientName) throws IOException
ClientProtocol
So, the NameNode will revoke the locks and live file-creates for clients that it thinks have died. A client tells the NameNode that it is still alive by periodically calling renewLease(). If a certain amount of time passes since the last call to renewLease(), the NameNode assumes the client has died.
renewLease
在接口中 ClientProtocol
IOException
public DirectoryListing getListing(String src, byte[] startAfter) throws IOException
ClientProtocol
getListing
在接口中 ClientProtocol
src
- the directory namestartAfter
- the name of the last entry received by the clientIOException
public HdfsFileStatus getFileInfo(String src) throws IOException
getFileInfo
在接口中 ClientProtocol
src
- The string representation of the path to the fileIOException
- if permission to access file is denied by the systempublic long[] getStats() throws IOException
ClientProtocol
ClientProtocol.GET_STATS_CAPACITY_IDX
in place of
actual numbers to index into the array.getStats
在接口中 ClientProtocol
IOException
public DatanodeInfo[] getDatanodeReport(FSConstants.DatanodeReportType type) throws IOException
ClientProtocol
getDatanodeReport
在接口中 ClientProtocol
IOException
public boolean setSafeMode(FSConstants.SafeModeAction action) throws IOException
ClientProtocol
Safe mode is a name node state when it
Safe mode is entered automatically at name node startup.
Safe mode can also be entered manually using
setSafeMode(SafeModeAction.SAFEMODE_GET)
.
At startup the name node accepts data node reports collecting information about block locations. In order to leave safe mode it needs to collect a configurable percentage called threshold of blocks, which satisfy the minimal replication condition. The minimal replication condition is that each block must have at least dfs.replication.min replicas. When the threshold is reached the name node extends safe mode for a configurable amount of time to let the remaining data nodes to check in before it will start replicating missing blocks. Then the name node leaves safe mode.
If safe mode is turned on manually using
setSafeMode(SafeModeAction.SAFEMODE_ENTER)
then the name node stays in safe mode until it is manually turned off
using setSafeMode(SafeModeAction.SAFEMODE_LEAVE)
.
Current state of the name node can be verified using
setSafeMode(SafeModeAction.SAFEMODE_GET)
setSafeMode
在接口中 ClientProtocol
action
- IOException
public boolean isInSafeMode()
public void saveNamespace() throws IOException
ClientProtocol
Saves current namespace into storage directories and reset edits log. Requires superuser privilege and safe mode.
saveNamespace
在接口中 ClientProtocol
AccessControlException
- if the superuser privilege is violated.IOException
- if image creation failed.public void refreshNodes() throws IOException
refreshNodes
在接口中 ClientProtocol
IOException
public long getEditLogSize() throws IOException
getEditLogSize
在接口中 NamenodeProtocol
IOException
public CheckpointSignature rollEditLog() throws IOException
rollEditLog
在接口中 NamenodeProtocol
IOException
public void rollFsImage() throws IOException
rollFsImage
在接口中 NamenodeProtocol
IOException
public void finalizeUpgrade() throws IOException
ClientProtocol
finalizeUpgrade
在接口中 ClientProtocol
IOException
public UpgradeStatusReport distributedUpgradeProgress(FSConstants.UpgradeAction action) throws IOException
ClientProtocol
distributedUpgradeProgress
在接口中 ClientProtocol
action
- FSConstants.UpgradeAction
to performIOException
public void metaSave(String filename) throws IOException
metaSave
在接口中 ClientProtocol
IOException
public void setBalancerBandwidth(long bandwidth) throws IOException
setBalancerBandwidth
在接口中 ClientProtocol
bandwidth
- Blanacer bandwidth in bytes per second for all datanodes.IOException
public ContentSummary getContentSummary(String path) throws IOException
ContentSummary
rooted at the specified directory.getContentSummary
在接口中 ClientProtocol
path
- The string representation of the pathIOException
public void setQuota(String path, long namespaceQuota, long diskspaceQuota) throws IOException
setQuota
在接口中 ClientProtocol
path
- The string representation of the path to the directorynamespaceQuota
- Limit on the number of names in the tree rooted
at the directorydiskspaceQuota
- Limit on disk space occupied all the files under
this directory.
FSConstants.QUOTA_DONT_SET
implies
the quota will not be changed, and (3) FSConstants.QUOTA_RESET
implies the quota will be reset. Any other value is a runtime error.FileNotFoundException
- if the path is a file or
does not existQuotaExceededException
- if the directory size
is greater than the given quotaIOException
public void fsync(String src, String clientName) throws IOException
fsync
在接口中 ClientProtocol
src
- The string representation of the pathclientName
- The string representation of the clientIOException
public void setTimes(String src, long mtime, long atime) throws IOException
ClientProtocol
setTimes
在接口中 ClientProtocol
src
- The string representation of the pathmtime
- The number of milliseconds since Jan 1, 1970.
Setting mtime to -1 means that modification time should not be set
by this call.atime
- The number of milliseconds since Jan 1, 1970.
Setting atime to -1 means that access time should not be set
by this call.IOException
public DatanodeRegistration register(DatanodeRegistration nodeReg) throws IOException
DatanodeProtocol
register
在接口中 DatanodeProtocol
DatanodeRegistration
, which contains
new storageID if the datanode did not have one and
registration ID for further communication.IOException
DataNode.dnRegistration
,
FSNamesystem.registerDatanode(DatanodeRegistration)
public DatanodeCommand[] sendHeartbeat(DatanodeRegistration nodeReg, long capacity, long dfsUsed, long remaining, int xmitsInProgress, int xceiverCount) throws IOException
sendHeartbeat
在接口中 DatanodeProtocol
IOException
public DatanodeCommand blockReport(DatanodeRegistration nodeReg, long[] blocks) throws IOException
DatanodeProtocol
blockReport
在接口中 DatanodeProtocol
blocks
- - the block list as an array of longs.
Each block is represented as 2 longs.
This is done instead of Block[] to reduce memory used by block reports.IOException
public void blocksBeingWrittenReport(DatanodeRegistration nodeReg, long[] blocks) throws IOException
blocksBeingWrittenReport
在接口中 DatanodeProtocol
IOException
public void blockReceived(DatanodeRegistration nodeReg, Block[] blocks, String[] delHints) throws IOException
DatanodeProtocol
blockReceived
在接口中 DatanodeProtocol
IOException
public ExportedBlockKeys getBlockKeys() throws IOException
getBlockKeys
在接口中 NamenodeProtocol
IOException
public void errorReport(DatanodeRegistration nodeReg, int errorCode, String msg) throws IOException
DatanodeProtocol
errorReport
在接口中 DatanodeProtocol
IOException
public NamespaceInfo versionRequest() throws IOException
versionRequest
在接口中 DatanodeProtocol
IOException
public UpgradeCommand processUpgradeCommand(UpgradeCommand comm) throws IOException
DatanodeProtocol
processUpgradeCommand
在接口中 DatanodeProtocol
IOException
public void verifyRequest(DatanodeRegistration nodeReg) throws IOException
nodeReg
- data node registrationIOException
public void verifyVersion(int version) throws IOException
version
- IOException
public File getFsImageName() throws IOException
IOException
public FSImage getFSImage()
public File[] getFsImageNameCheckpoint() throws IOException
IOException
public InetSocketAddress getNameNodeAddress()
public InetSocketAddress getHttpAddress()
public void refreshServiceAcl() throws IOException
RefreshAuthorizationPolicyProtocol
refreshServiceAcl
在接口中 RefreshAuthorizationPolicyProtocol
IOException
public void refreshUserToGroupsMappings() throws IOException
RefreshUserMappingsProtocol
public void refreshSuperUserGroupsConfiguration()
RefreshUserMappingsProtocol
public static NameNode createNameNode(String[] argv, Configuration conf) throws IOException
IOException
Copyright © 2009 The Apache Software Foundation