Description Usage Arguments Note Author(s) See Also Examples
Add key-value pairs to a data connection
1 |
conn |
a kvConnection object |
data |
a list of key-value pairs (list of lists where each sub-list has two elements, the key and the value) |
overwrite |
if data with the same key is already present in the data, should it be overwritten? (does not work for HDFS connections) |
This is generally not recommended for HDFS as it writes a new file each time it is called, and can result in more individual files than Hadoop likes to deal with.
Ryan Hafen
removeData
, localDiskConn
, hdfsConn
1 2 3 4 5 6 7 8 9 10 11 | ## 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)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.