Attempts to start and/or connect to and H2O instance.
h2o.init( ip = "localhost", port = 54321, name = NA_character_, startH2O = TRUE, forceDL = FALSE, enable_assertions = TRUE, license = NULL, nthreads = -1, max_mem_size = NULL, min_mem_size = NULL, ice_root = tempdir(), log_dir = NA_character_, log_level = NA_character_, strict_version_check = TRUE, proxy = NA_character_, https = FALSE, cacert = NA_character_, insecure = FALSE, username = NA_character_, password = NA_character_, use_spnego = FALSE, cookies = NA_character_, context_path = NA_character_, ignore_config = FALSE, extra_classpath = NULL, jvm_custom_args = NULL, bind_to_localhost = TRUE )
ip | Object of class |
---|---|
port | Object of class |
name | (Optional) A |
startH2O | (Optional) A |
forceDL | (Optional) A |
enable_assertions | (Optional) A |
license | (Optional) A |
nthreads | (Optional) Number of threads in the thread pool. This relates very closely to the number of CPUs used. -1 means use all CPUs on the host (Default). A positive integer specifies the number of CPUs directly. This value is only used when R starts H2O. |
max_mem_size | (Optional) A |
min_mem_size | (Optional) A |
ice_root | (Optional) A directory to handle object spillage. The defaul varies by OS. |
log_dir | (Optional) A directory where H2O server logs are stored. The default varies by OS. |
log_level | (Optional) The level of logging of H2O server. The default is INFO. |
strict_version_check | (Optional) Setting this to FALSE is unsupported and should only be done when advised by technical support. |
proxy | (Optional) A |
https | (Optional) Set this to TRUE to use https instead of http. |
cacert | (Optional) Path to a CA bundle file with root and intermediate certificates of trusted CAs. |
insecure | (Optional) Set this to TRUE to disable SSL certificate checking. |
username | (Optional) Username to login with. |
password | (Optional) Password to login with. |
use_spnego | (Optional) Set this to TRUE to enable SPNEGO authentication. |
cookies | (Optional) Vector(or list) of cookies to add to request. |
context_path | (Optional) The last part of connection URL: http://<ip>:<port>/<context_path> |
ignore_config | (Optional) A |
extra_classpath | (Optional) A vector of paths to libraries to be added to the Java classpath when H2O is started from R. |
jvm_custom_args | (Optional) A |
bind_to_localhost | (Optional) A |
this method will load it and return a H2OConnection
object containing the IP address and port number of the H2O server.
By default, this method first checks if an H2O instance is connectible. If it cannot connect and start = TRUE
with ip = "localhost"
, it will attempt to start and instance of H2O at localhost:54321.
If an open ip and port of your choice are passed in, then this method will attempt to start an H2O instance at that specified ip port.
When initializing H2O locally, this method searches for h2o.jar in the R library resources (system.file("java", "h2o.jar", package = "h2o")
), and if the file does not exist, it will automatically attempt to download the correct version from Amazon S3. The user must have Internet access for this process to be successful.
Once connected, the method checks to see if the local H2O R package version matches the version of H2O running on the server. If there is a mismatch and the user indicates she wishes to upgrade, it will remove the local H2O R package and download/install the H2O R package from the server.
Users may wish to manually upgrade their package (rather than waiting until being prompted), which requires that they fully uninstall and reinstall the H2O package, and the H2O client package. You must unload packages running in the environment before upgrading. It's recommended that users restart R or R studio after upgrading
H2O R package documentation for more details. h2o.shutdown
for shutting down from R.
if (FALSE) { # Try to connect to a local H2O instance that is already running. # If not found, start a local H2O instance from R with the default settings. h2o.init() # Try to connect to a local H2O instance. # If not found, raise an error. h2o.init(startH2O = FALSE) # Try to connect to a local H2O instance that is already running. # If not found, start a local H2O instance from R with 5 gigabytes of memory. h2o.init(max_mem_size = "5g") # Try to connect to a local H2O instance that is already running. # If not found, start a local H2O instance from R that uses 5 gigabytes of memory. h2o.init(max_mem_size = "5g") }