Skip Headers
Oracle® Big Data Connectors User's Guide
Release 2 (2.1)

Part Number E36961-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

hdfs.tail

Copies a specified number of lines from the end of a file in HDFS.

Usage

hdfs.tail(
        dfs.id,
        n)

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.

n

The number of lines to retrieve from the file.

Return Value

The last n lines of the file.

See Also

hdfs.head

Example

This example returns the last three lines of ontime.R:

R> hdfs.tail('ontime_R', 3)
[1] "\"219930\",1994,8,\"M08\",1,\"D01\",1,1947,1945,2038,2048,\"US\",1073,NA,51,63,NA,-10,2,\"PIT\",\"LAN\",275,NA,NA,0,NA,\"0\""
[2] "\"219931\",1994,8,\"M08\",2,\"D02\",2,802,805,948,950,\"AA\",1726,NA,106,105,NA,-2,-3,\"DFW\",\"BNA\",631,NA,NA,0,NA,\"0\""  
[3] "\"219932\",1994,8,\"M08\",2,\"D02\",2,829,832,1015,1011,\"US\",1191,NA,166,159,NA,4,-3,\"BWI\",\"MSY\",998,NA,NA,0,NA,\"0\""