我的意圖是在同一計算機/服務器上從R內啓動兩個或多個h2o羣集/實例(不是兩個或更多節點!)以使多個用戶可以在h2o同一時間。此外,我希望能夠分別關閉和重新啓動集羣,也可以從R內部單獨重新啓動集羣。我已經知道我無法簡單地從R內部控制多個h2o集羣,因此我試圖從命令行啓動兩個集羣在Windows 10:從內部啓動多個h2o羣集
java -Xmx1g -jar h2o.jar -name testCluster1 -nthreads 1 -port 54321
java -Xmx1g -jar h2o.jar -name testCluster2 -nthreads 1 -port 54323
這對我工作得很好:
library(h2o)
h2o.init(startH2O = FALSE, ip = "localhost", port = 54321)
Connection successful!
R is connected to the H2O cluster:
H2O cluster uptime: 4 minutes 8 seconds
H2O cluster version: 3.8.3.2
H2O cluster name: testCluster
H2O cluster total nodes: 1
H2O cluster total memory: 0.87 GB
H2O cluster total cores: 4
H2O cluster allowed cores: 1
H2O cluster healthy: TRUE
H2O Connection ip: localhost
H2O Connection port: 54321
H2O Connection proxy: NA
R Version: R version 3.2.5 (2016-04-14)
h2o.init(startH2O = FALSE, ip = "localhost", port = 54323)
Connection successful!
R is connected to the H2O cluster:
H2O cluster uptime: 3 minutes 32 seconds
H2O cluster version: 3.8.3.2
H2O cluster name: testCluster2
H2O cluster total nodes: 1
H2O cluster total memory: 0.87 GB
H2O cluster total cores: 4
H2O cluster allowed cores: 1
H2O cluster healthy: TRUE
H2O Connection ip: localhost
H2O Connection port: 54323
H2O Connection proxy: NA
R Version: R version 3.2.5 (2016-04-14)
現在,我想通過該系統()命令來完成從R內部相同。
launchH2O <- as.character("java -Xmx1g -jar h2o.jar -name testCluster -nthreads 1 -port 54321")
system(command = launchH2O, intern =TRUE)
但我得到一個錯誤信息:
[1] "Error: Unable to access jarfile h2o.jar"
attr(,"status")
[1] 1
Warning message:
running command 'java -Xmx1g -jar h2o.jar -name testCluster -nthreads 1 -port 54321' had status 1
試圖
system2(command = launchH2O)
我得到一個警告消息,我無法與羣集連接:
system2(command = launchH2O)
Warning message:
running command '"java -Xmx1g -jar h2o.jar -name testCluster -nthreads 1 -port 54321"' had status 127
h2o.init(startH2O = FALSE, ip = "localhost", port = 54321)
Error in h2o.init(startH2O = FALSE, ip = "localhost", port = 54321) :
Cannot connect to H2O server. Please check that H2O is running at http://localhost:54321/
任何想法如何開始/ sh從R內部摧毀兩個或兩個以上的h2o羣集? 提前謝謝!
注意1:我只使用我的本地Windows設備進行測試,實際上我想在Linux服務器上創建多個h2o羣集。
注2:我用R GUI(3.2.5)和R Studio(版本0.99.892)試了一下,我把它們作爲管理員運行。 h2o.jar文件位於我的工作目錄中,我的Java版本是(Build 1.8.0_91-b14)。
注3:系統信息: - H2O & H2O [R包版本:3.8.3.2 - 視窗10家,版本1511 - 16 RAM,英特爾酷睿i5-6200U CPU採用2.30 GHz的
考慮運行linux,甚至作爲VM客戶。使用開源軟件時,它通常可以提高生產力。只有當您部署到該平臺時,IMO win開發機纔有意義,即天藍色。 – jangorecki