Running a separate H2O instance from R

Traditionally in R, an H2O instance that is created using h2o.init() will be shared by everyone else. This poses a problem since because the resources (threads) are shared - everyone can't basically do work at the same time.

While h2o.init() itself has a function to specify which port and ip, it is currently buggy since you can't initiate an instance without using the 54321 port.

To work around this, you'll need to initiate an h2o instance externally from unix. From there, you can then connect directly to your defined instance.In addition, connecting to an instance in this manner provides another layer of protection, since you're no longer relying on libraries that are loaded in R (libraries that are loaded in R can be removed by other users using RStudio).

You may use the following command to:

1. Create h2o instance externally
2. Connect to your h2o instance from R.

So basically from R;
launchH2O <- -jar="" -name="" -nthreads="" -port="" -xmx16g="" 16="" 54380="" br="" h2o.jar="" h2o="" hafidzcluster="" java="" lib64="" library="" usr="">system(command = launchH2O, intern =FALSE, wait=FALSE)
h2o.init(startH2O = FALSE, ip = "localhost", port = 54380)

Note that to shutdown your instance, you'll have to do it manually within unix. Don't use the h2o.shutdown() since that only affects local instances started by R.

Comments

Popular posts from this blog

HIVE: Both Left and Right Aliases Encountered in Join

A Basic Recipe for Machine Learning

Changing Windows Account password using Outlook