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.id

Converts an HDFS path name to an R dfs.id object.

Usage

hdfs.id(
        dfs.x,
        force)

Arguments

dfs.x

A string or text expression that resolves to an HDFS file name.

force

Set to TRUE if the file need not exist, or set to FALSE to ensure that the file does exist.

Return Value

TRUE if the string matches an HDFS file name, or NULL if a file by that name is not found

Example

This example creates a dfs.id object for /user/oracle/demo:

R> hdfs.id('/user/oracle/demo')
[1] "user/oracle/demo"
attr(,"dfs.id")
[1] TRUE

The next example creates a dfs.id object named id for a nonexistent directory named /user/oracle/newdemo, after first failing:

R> id<-hdfs.id('/user/oracle/newdemo')
DBG: 16:11:38 [ER] "/user/oracle/newdemo" is not found
R> id<-hdfs.id('/user/oracle/newdemo', force=T)
R> id
[1] "user/oracle/newdemo"
attr(,"dfs.id")
[1] TRUE