hdfs.parts
Returns the number of parts composing a file in HDFS.
Usage
hdfs.parts(
dfs.id)
Arguments
- dfs.id
-
The name of a file in HDFS. The file name can include a path that is either absolute or relative to the current path.
Usage Notes
HDFS splits large files into parts, which provide a basis for the parallelization of MapReduce jobs. The more parts an HDFS file has, the more mappers can run in parallel.
Return Value
The number of parts composing the object, or 0
if the object does not exist in HDFS
Example
This example shows that the ontime_R file in HDFS has one part:
R> hdfs.parts("ontime_R")
[1] 1