@Private
public class TransferFsImage
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
TransferFsImage.TransferResult |
| Constructor | Description |
|---|---|
TransferFsImage() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
copyFileToStream(java.io.OutputStream out,
java.io.File localfile,
java.io.FileInputStream infile,
DataTransferThrottler throttler) |
A server-side method to respond to a getfile http request
Copies the contents of the local file into the output stream.
|
static org.apache.hadoop.io.MD5Hash |
doGetUrl(java.net.URL url,
java.util.List<java.io.File> localPaths,
Storage dstStorage,
boolean getChecksum) |
|
static void |
downloadAliasMap(java.net.URL fsName,
java.io.File aliasMap,
boolean isBootstrapStandby) |
Download the InMemoryAliasMap from the remote NN.
|
static org.apache.hadoop.io.MD5Hash |
downloadImageToStorage(java.net.URL fsName,
long imageTxId,
Storage dstStorage,
boolean needDigest,
boolean isBootstrapStandby) |
|
static void |
downloadMostRecentImageToDirectory(java.net.URL infoServer,
java.io.File dir) |
|
static TransferFsImage.TransferResult |
uploadImageFromStorage(java.net.URL fsName,
org.apache.hadoop.conf.Configuration conf,
NNStorage storage,
NNStorage.NameNodeFile nnf,
long txid,
Canceler canceler) |
Requests that the NameNode download an image from this node.
|
public static void downloadMostRecentImageToDirectory(java.net.URL infoServer,
java.io.File dir)
throws java.io.IOException
java.io.IOExceptionpublic static org.apache.hadoop.io.MD5Hash downloadImageToStorage(java.net.URL fsName,
long imageTxId,
Storage dstStorage,
boolean needDigest,
boolean isBootstrapStandby)
throws java.io.IOException
java.io.IOExceptionpublic static void downloadAliasMap(java.net.URL fsName,
java.io.File aliasMap,
boolean isBootstrapStandby)
throws java.io.IOException
fsName - http address of remote NN.aliasMap - location of the alias map.isBootstrapStandby - flag to indicate if for bootstrap of standby.java.io.IOExceptionpublic static TransferFsImage.TransferResult uploadImageFromStorage(java.net.URL fsName, org.apache.hadoop.conf.Configuration conf, NNStorage storage, NNStorage.NameNodeFile nnf, long txid, Canceler canceler) throws java.io.IOException
fsName - the http address for the remote NNconf - Configurationstorage - the storage directory to transfer the image fromnnf - the NameNodeFile type of the imagetxid - the transaction ID of the image to be uploadedcanceler - optional canceler to check for abort of uploadjava.io.IOException - if there is an I/O error or cancellationpublic static void copyFileToStream(java.io.OutputStream out,
java.io.File localfile,
java.io.FileInputStream infile,
DataTransferThrottler throttler)
throws java.io.IOException
java.io.IOExceptionpublic static org.apache.hadoop.io.MD5Hash doGetUrl(java.net.URL url,
java.util.List<java.io.File> localPaths,
Storage dstStorage,
boolean getChecksum)
throws java.io.IOException
java.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.