# NOT RUN {
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)
# try to extract values by key (this will result in an error)
# (HDFS can only lookup key-value pairs by key if data is in a mapfile)
hdd[["3"]]
# convert hdd into a mapfile
hdd <- makeExtractable(hdd)
# try again
hdd[["3"]]
# }
Run the code above in your browser using DataLab