If I start H2O using Jetty HashLoginService (i.e. -hash_login -login_conf realm.properties
) in order to protect my H2O instance with password, I cannot convert H2O object into R object.
For example in the following as.data.frame
will not work, as if would work if I didn't use HashLoginService:
> require(h2o)
> h2o.init(port = 54324, startH2O = F,
password = "pass", username = "uname")
Connection successful!
R is connected to the H2O cluster:
H2O cluster uptime: 5 days 15 hours
H2O cluster version: 3.9.1.3405
H2O cluster name: uname
H2O cluster total nodes: 1
H2O cluster total memory: 22.19 GB
H2O cluster total cores: 8
H2O cluster allowed cores: 2
H2O cluster healthy: TRUE
H2O Connection ip: localhost
H2O Connection port: 54324
H2O Connection proxy: NA
R Version: R version 3.1.1 (2014-07-10)
> packageVersion("h2o")
[1] ‘3.9.1.3405’
> df <- data.frame(a = c(0.2, 0.3, 0.1, 0.5, 0.1, 0.2),
b = c(0.1, 0.1, 0.7, 0.3, 0.2, 0.9))
> h2o_df <- as.h2o(df, "h2o_df")
|==============================================================================| 100%
> head(h2o_df)
a b
1 0.2 0.1
2 0.3 0.1
3 0.1 0.7
4 0.5 0.3
5 0.1 0.2
6 0.2 0.9
> class(h2o_df)
[1] "H2OFrame"
> as.data.frame(h2o_df)
X.html.
1 <head>
2 <meta http-equiv=Content-Type content=text/html;charset=ISO-8859-1/>
3 <title>Error 401 Unauthorized</title>
4 </head>
5 <body>
6 <h2>HTTP ERROR: 401</h2>
7 <p>Problem accessing /3/DownloadDataset. Reason:
8 <pre> Unauthorized</pre></p>
9 <hr /><i><small>Powered by Jetty://</small></i>
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 </body>
31 </html>
Warning message:
In read.table(file = file, header = header, sep = sep, quote = quote, :
cols = 1 != length(data) = 11
Any idea how to resolve this problem?
UPDATE
This is a bug and you can track it here: https://0xdata.atlassian.net/browse/PUBDEV-2968
username
andpassword
parameters toh2o.init()
?as.data.frame
(looks like it might not be using the credentials) - will consult the the team and get back to you!