Permalink
Switch branches/tags
v2.0.4.1 nn-2 jenkins-tomk-repackage-gson-3 jenkins-tomk-repackage-gson-2 jenkins-tomk-repackage-gson-1 jenkins-tomas-parse-3 jenkins-tomas-parse-2 jenkins-rel-nunes-2 jenkins-rel-nunes-1 jenkins-rel-novikov-3 jenkins-rel-novikov-2 jenkins-rel-novikov-1 jenkins-rel-noether-4 jenkins-rel-noether-3 jenkins-rel-noether-2 jenkins-rel-noether-1 jenkins-rel-mirzakhani-2 jenkins-rel-mirzakhani-1 jenkins-rel-maxwell-8 jenkins-rel-maxwell-7 jenkins-rel-maxwell-6 jenkins-rel-maxwell-5 jenkins-rel-maxwell-4 jenkins-rel-maxwell-3 jenkins-rel-maxwell-2 jenkins-rel-maxwell-1 jenkins-rel-markov-1 jenkins-rel-mandelbrot-1 jenkins-rel-lambert-5 jenkins-rel-lambert-4 jenkins-rel-lambert-3 jenkins-rel-lambert-2 jenkins-rel-lambert-1 jenkins-rel-ito-3 jenkins-rel-ito-2 jenkins-master-1763 jenkins-master-1762 jenkins-master-1761 jenkins-master-1760 jenkins-master-1759 jenkins-master-1758 jenkins-master-1757 jenkins-master-1756 jenkins-master-1755 jenkins-master-1754 jenkins-master-1753 jenkins-master-1752 jenkins-master-1751 jenkins-master-1750 jenkins-master-1749 jenkins-master-1748 jenkins-master-1747 jenkins-master-1746 jenkins-master-1745 jenkins-master-1744 jenkins-master-1743 jenkins-master-1742 jenkins-master-1741 jenkins-master-1740 jenkins-master-1739 jenkins-master-1738 jenkins-master-1737 jenkins-master-1736 jenkins-master-1735 jenkins-master-1734 jenkins-master-1733 jenkins-master-1732 jenkins-master-1731 jenkins-master-1730 jenkins-master-1729 jenkins-master-1728 jenkins-master-1727 jenkins-master-1726 jenkins-master-1725 jenkins-master-1724 jenkins-master-1723 jenkins-master-1722 jenkins-master-1721 jenkins-master-1720 jenkins-master-1719 jenkins-master-1718 jenkins-master-1717 jenkins-master-1716 jenkins-master-1715 jenkins-master-1714 jenkins-master-1713 jenkins-master-1712 jenkins-master-1711 jenkins-master-1710 jenkins-master-1709 jenkins-master-1708 jenkins-master-1707 jenkins-master-1706 jenkins-master-1705 jenkins-master-1704 jenkins-master-1703 jenkins-master-1702 jenkins-master-1701 jenkins-master-1700 jenkins-master-1699
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (46 sloc) 1.7 KB
#----------------------------------------------------------------------
# Purpose: This test exercises amazon s3n access from R.
#----------------------------------------------------------------------
# setwd("/Users/tomk/0xdata/ws/h2o/R/tests/testdir_hdfs")
local({r <- getOption("repos"); r["CRAN"] <- "http://cran.us.r-project.org"; options(repos = r)})
if (!"R.utils" %in% rownames(installed.packages())) install.packages("R.utils")
options(echo=TRUE)
TEST_ROOT_DIR <- ".."
source(sprintf("%s/%s", TEST_ROOT_DIR, "findNSourceUtils.R"))
heading("BEGIN TEST")
conn <- new("H2OClient", ip=myIP, port=myPort)
#----------------------------------------------------------------------
# Single file cases.
#----------------------------------------------------------------------
heading("Testing single file importFile S3N")
s3n_iris_file <- "0xdata-public/examples/h2o/R/datasets/iris_wheader.csv"
url <- sprintf("s3n://%s", s3n_iris_file)
iris.hex <- h2o.importFile(conn, url)
head(iris.hex)
tail(iris.hex)
n <- nrow(iris.hex)
print(n)
if (n != 150) {
stop("nrows is wrong")
}
if (class(iris.hex) != "H2OParsedData") {
stop("iris.hex is the wrong type")
}
#----------------------------------------------------------------------
# Directory cases.
#----------------------------------------------------------------------
heading("Testing directory importFolder S3N")
s3n_iris_dir <- "0xdata-public/examples/h2o/R/datasets"
url2 <- sprintf("s3n://%s", s3n_iris_dir)
irisdir.hex <- h2o.importFolder(conn, url2)
head(irisdir.hex)
tail(irisdir.hex)
n <- nrow(irisdir.hex)
print(n)
if (n != 150) {
stop("nrows is wrong")
}
if (class(irisdir.hex) != "H2OParsedData") {
stop("irisdir.hex is the wrong type")
}
PASS_BANNER()