Description:
Check whether there is a specified file or folder in HDFS and return a Boolean value.
Syntax:
hdfs_exists(
hd,
file/path)
Note:
The external library function (See External Library Guide) checks whether a file or a folder exists and returns a Boolean value.
Parameter:
hd |
An hd connection. |
file |
Hadoop file name. |
path |
Hadoop path name. |
Return value:
Boolean
Example:
|
|
|
|
=hdfs_open("hdfs://192.168.0.76:9000") |
Connect to HDFS file system. |
|
=hdfs_exists(A1,"/user") |
Check whether folder user exists. |
|
=hdfs_exists(A1,"/user/emp.txt") |
Check whether file emp.txt exists. |
|
=hdfs_close(A1) |
|