hdfs_upload()

Read(3004) Label: upload, local file,

Description:

Upload a local file to a specific position.

Syntax:

hdfs_upload( hd, local, remote)

Note:

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

Parameter:

hd

An hd connection.

local

A local file or folder.

remote

A remote file or folder.

Option:

@d

Upload all files in the specified folder to the specified path, 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_upload(A1,"emp.txt","/user")

Upload local file emp.txt to the path /user.

3

=hdfs_upload(A1,"stu.txt","/user/stu1.txt")

Upload local file stu.txt to the path /user, and rename it stu1.txt.

4

=hdfs_upload(A1,"/h1","/s1")

Upload local file /h1 to path /s1.

5

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

Upload all files in the local folder /h1 to path /s1.

6

=hdfs_close(A1)