static MD5Hash downloadImageToStorage ( String fsName , long imageTxId , FSImage dstImage , boolean needDigest , boolean disableThrottle ) throws IOException { String fileid = GetImageServlet . getParamStringForImage ( imageTxId , dstImage . storage , disableThrottle ) ; List < OutputStream > outputStreams = dstImage . getCheckpointImageOutputStreams ( imageTxId ) ; if ( outputStreams . size ( ) == 0 ) { throw new IOException ( "No targets in destination storage!" ) ; } MD5Hash hash = getFileClient ( fsName , fileid , outputStreams , dstImage . storage , needDigest ) ; LOG . info ( "Downloaded image files for txid: " + imageTxId ) ; return hash ; }
Download image to local storage . Throttling can be disabled .