Learn R Programming

datadr (version 0.8.6.1)

hdfsConn: Connect to Data Source on HDFS

Description

Connect to a data source on HDFS

Usage

hdfsConn(loc, type = "sequence", autoYes = FALSE, reset = FALSE,
  verbose = TRUE)

Arguments

loc

location on HDFS for the data source

type

the type of data ("map", "sequence", "text")

autoYes

automatically answer "yes" to questions about creating a path on HDFS

reset

should existing metadata for this object be overwritten?

verbose

logical - print messages about what is being done

Value

a "kvConnection" object of class "hdfsConn"

Details

This simply creates a "connection" to a directory on HDFS (which need not have data in it). To actually do things with this data, see ddo, etc.

See Also

addData, ddo, ddf, localDiskConn

Examples

Run this code
# NOT RUN {
  # connect to empty HDFS directory
  conn <- hdfsConn("/test/irisSplit")
  # add some data
  addData(conn, list(list("1", iris[1:10,])))
  addData(conn, list(list("2", iris[11:110,])))
  addData(conn, list(list("3", iris[111:150,])))
  # represent it as a distributed data frame
  hdd <- ddf(conn)
# }

Run the code above in your browser using DataLab