hdfs_download()

Read(3910) Label: download, local file,

Description:

Download a local file to a specific position.

Syntax:

hdfs_download(hd, local,remote)

Note:

The external library function (See External Library Guide) downloads a remote file or folder remote to a local file/folder local.

Parameter:

hd

An hd connection.

local

A local file or folder.

remote

A remote file or folder.

localPath

A local file name.

Option:

@d

Download all files in the specified folder to the local machine, and require both the source and directories are folders.

Return value:

Boolean

Example:

 

A

 

1

=hdfs_open("hdfs://192.168.0.8:9000")

Connect to HDFS file system.

2

=hdfs_download(A1," /test "," /emp/emp.txt ")

Download emp.txt in /emp folder to the local folder /test.

3

=hdfs_download(A1," /test/emp1.txt "," /emp/emp.txt ")

Download emp.txt in /emp folder to the local folder /test, and rename the file emp1.txt.

4

=hdfs_download@d(A1,"/s1","/h1")

Download all files under folder /h1 to the local folder /s1.

5

=hdfs_close(A1)