Skip to content

Commit

Permalink
updte to R console instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
dearirenelang committed Feb 4, 2014
1 parent 84ae514 commit 5bb2dec
Show file tree
Hide file tree
Showing 13 changed files with 131 additions and 94 deletions.
58 changes: 43 additions & 15 deletions h2o-docs/source/Ruser/R_studio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ These instructions assume you are using R Studio 2.14.0 or later.

**STEP 1**

To use H2O in R, users need a copy of H2O.
The download package can be obtained by clicking on the button Download H\ :sub:`2`\ O at `http://0xdata.com/downloadtable <http://0xdata.com/downloadtable/>`_.

Unzip the downloaded H\ :sub:`2`\ O zip file.
Expand All @@ -20,32 +21,58 @@ Start an instance of H\ :sub:`2`\ O. For help with this see :ref:`GettingStarted
Users should be aware that in order for H\ :sub:`2`\ O to successfully run through R, an instance of H\ :sub:`2`\ O must also simultaneously be running. If the instance of H\ :sub:`2`\ O is stopped, the R program will no longer run, and work done will be lost.


**STEP 3**
**STEP 3**

Install the H\ :sub:`2`\ O package, and the H\ :sub:`2`\ O client package simultaneously by clicking on **Install Package**
For users who may have already installed a prior version of the H2O
package. New users may skip this step.

.. image:: Rinstall.png
:width: 70%

Walk through the installer helper to the H\ :sub:`2`\ O downloaded folder.
For packages to be successfully removed and updated in R studio - they
must first be detatched from the R environment and then uninstalled.
Simply enter the following:

::

detach("package:h2o", unload=TRUE)
detach("package:h2oRClient", unload=TRUE)
remove.packages("h2o")
remove.packages("h2oRClient")


Note: users may get warnings of the type "Error in
detatch("package:h2o", unload = TRUE): invalid 'name' argument.
This tells users that there is no h2o package to uninstall. These
warnings can safely be ignored.

.. image:: Rfilefinder.png
:width: 70%
.. image:: Rstudioinstall1.jpg
:width: 90%


Once the correct path has been specified click **Install.** This will install the package in R.
**STEP 4**

Install the H\ :sub:`2`\ O package from the H2ORepo, the H2O cran that
functions exactly like the usual R cran, but is managed and maintained
by H2O.
Simply enter the call:

::

Start the H\ :sub:`2`\ O package by clicking the check box next to the package name **h2o**.

install.packages("h2o", repos=(c("http://h2o-release.s3.amazonaws.com/h2o/rel-jacobi/2/R", getOption("repos"))))
as shown here:

.. image:: Rcheckbox.png
:width: 70%
.. image:: Rstudioinstall2.jpg
:width: 90%




**STEP 4**

If you have not started an instance of H2O from your command line
terminal, R will start an instance for you automatically. If you have
already started an instance, H2O R will connect to this instance, and
no other instance will be started.

Get R Studio talking to your instance of H\ :sub:`2`\ O by typing in the call:

::
Expand All @@ -60,8 +87,9 @@ Upgrading the H\ :sub:`2`\ O R Packages
"""""""""""""""""""""""""""""""""""""""


Users may wish to manually upgrade their R packages. For instance, if you are running the bleeding edge developer build, it’s possible that the code has changed, but that the revision number has not, in which case manually upgrading ensures the most current version of not only the H\ :sub:`2`\ O code, but the corresponding R code as well.
It is highly recommended that users close and restart R, manually remove (by clicking the x next to BOTH h2o packages, as shown in the picture above), and reinstall.
Users may wish to manually upgrade their R packages. They can do this
by returning to STEP 3, and following the instructions through
STEP 4.



Expand Down
Binary file removed h2o-docs/source/Ruser/Rcheckbox.png
Binary file not shown.
Binary file removed h2o-docs/source/Ruser/Rfilefinder.png
Binary file not shown.
Binary file removed h2o-docs/source/Ruser/Rinstall.png
Binary file not shown.
81 changes: 49 additions & 32 deletions h2o-docs/source/Ruser/Rinstall.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,68 @@ program will no longer run, and work done will be lost.

**STEP 3:**

Install the H\ :sub:`2`\ O package, and the H\ :sub:`2`\ O client
package simultaneously by entering the following call into your R
console with an instance of H\ :sub:`2`\ O already running (if H\ :sub:`2`\ O is not
running, an instance will be started automatically at ip=LocalHost and
port=54321).

**DO NOT CUT AND PASTE THIS CALL.** Please replace "foo" and the
revision number with the appropriate file path and revision number
specifying your downloaded and unzipped H\ :sub:`2`\ O file.
New uses can safely skip this step, while users who have previously
installed the H\ :sub:`2`\ O R packages should uninstall them by entering the
following commands to the R console:

::

install.packages("foo/R/h2o_2.1.0.99999.tar.gz", repos = NULL, type = "source")
Once the correct path has been specified, the H\ :sub:`2`\ O package will be
installed.
detach("package:h2o", unload=TRUE)
detach("package:h2oRClient", unload=TRUE)
remove.packages("h2o")
remove.packages("h2oRClient")


Note: users may get warnings of the type "Error in
detatch("package:h2o", unload = TRUE): invalid 'name' argument.
This tells users that there is no h2o package to uninstall. These
warnings can safely be ignored.

**STEP 4:**

Call:
Install the H\ :sub:`2`\ O package, and the H\ :sub:`2`\ O client
package via the H\ :sub:`2`\ O cran. This repository functions exactly like the R
repository, but is maintained by H\ :sub:`2`\ O.

::

library(h2o)
localH2O<- h2o.init()
install.packages("h2o", repos=(c("http://h2o-release.s3.amazonaws.com/h2o/rel-jacobi/2/R", getOption("repos"))))

**STEP 4:**

Once the H\ :sub:`2`\ O R package has been installed, call the
package, and establish a connection to a running instance of H\
:sub:`2`\ O.

If there is no running instance of H\ :sub:`2`\ O prior to using
the command "h2o.init()", H\ :sub:`2`\ O in R will start an instance
automatically for the user.
Note that in the call "localH2O<- h2o.init()" the h2o.init object is
being named localH2O in the R environment for use later in model
specification. Users who wish to specify a different IP, port, or heap
size can do so by entering the appropriate information within the
call. Entering the call exactly as it is written above assumes the
user wishes to connect to IP localhost and port: 54321.
user wishes to connect to IP localhost and port: 54321.

::

library(h2o)
localH2O<- h2o.init()


Users who wish to specify a connection
with a server (rather than local host at port 54321) must explicity
state the IP address and port number in the h2o.init call.
An example is given below, but **do not cut and paste**; users should
specify the IP and port number appropriate to their specific
environment.

::

library(h2o)
localH2O = h2o.init(ip = "192.555.1.123", port = 12345, startH2O = FALSE, silentUpgrade = TRUE)

This call *may* return the output:

Expand All @@ -77,22 +107,9 @@ the code has changed, but that the revision number has not, in which
case manually upgrading ensures the most current version of not only
the H\ :sub:`2`\ O code, but the corresponding R code as well.

This can be done using the following commands.

**IMPORTANT**
Before you cut and paste these commands please check that the file path to
the version of H\ :sub:`2`\ O R you would like to install is correct. Replace **foo** with the correct file path.
This can be done by returning to STEP 3, and following the commands
through STEP 4.

::
detach("h2oRClient”)
detach("h2oRClient”)
remove.packages("h2oRClient")
remove.packages("h2o")
install.packages("foo/R/h2o_2.1.0.99999.tar.gz", repos = NULL,
type = "source")
library(h2o)
localH2O=h2o.init()



Expand Down
Binary file removed h2o-docs/source/Ruser/Ripandport.png
Binary file not shown.
Binary file added h2o-docs/source/Ruser/Rstudioinstall1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed h2o-docs/source/Ruser/Rstudioinstall1.png
Binary file not shown.
Binary file added h2o-docs/source/Ruser/Rstudioinstall2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed h2o-docs/source/Ruser/Rstudioinstall2.png
Binary file not shown.
12 changes: 7 additions & 5 deletions h2o-docs/source/deployment/multinode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ an H\ :sub:`2`\ O multi-node cluster. Begin by locating a set of hosts to make u
**STEP 1**

To download H\ :sub:`2`\ O, including the .jar, go to
`the H\ :sub: `2` O downloads page <http://0xdata.com/downloadtable/>`_ and choose the version that is right for your environment.
the H\ :sub:`2`\ O `downloads page <http://0xdata.com/downloadtable/>`_ and choose the version that is right for your environment.


**STEP 2**
Expand Down Expand Up @@ -52,8 +52,8 @@ memory.
For best performance, we recommend you size your cluster to be about
four times the size of your data (but to avoid swapping, Xmx must not
be larger than physical memory on any given node). Giving all nodes
the same amount of memory is strongly recommended (H\ :sub:`2`\ O works best with
symmetric nodes).
the same amount of memory is strongly recommended (H\ :sub:`2`\ O
works best withsymmetric nodes).

Note the optional -ip (not shown in the example below) and -port
options tell this H\ :sub:`2`\ O node what IP address and ports (port and port+1
Expand All @@ -62,7 +62,7 @@ that have multiple network interfaces.

::

$ java -Xmx20g -jar h2o.jar -flatfile flatfile.txt -port 54321 -name MyClusterName
$ java -Xmx20g -jar h2o.jar -flatfile flatfile.txt -port 54321

You will see output similar to the following:

Expand All @@ -80,7 +80,9 @@ You will see output similar to the following:
08:35:33.559 main INFO WATER: Java heap maxMemory: 17.78 gb
08:35:33.559 main INFO WATER: ICE root: '/tmp/h2o-tomk'
08:35:33.580 main INFO WATER: Internal communication uses port: 54322
+ Listening for HTTP and REST traffic on http://192.168.1.163:54321/
+ Listening for HTTP and REST
traffic
on http://192.168.1.163:54321/
08:35:33.613 main INFO WATER: H2O cloud name: 'MyClusterName'
08:35:33.613 main INFO WATER: (v1.7.0.520) 'MyClusterName' on /192.168.1.163:54321, static configuration based on -flatfile flatfile.txt
08:35:33.615 main INFO WATER: Cloud of size 1 formed [/192.168.1.163:54321]
Expand Down
25 changes: 0 additions & 25 deletions h2o-docs/source/misc/troubleshoot.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
H\ :sub:`2`\ O Troubleshooting
------------------------------


**How to Send Logs:** Reporting Errors in H\ :sub:`2`\ O
---------------------------------------------------------

**Errors in Browser Based GUI**

When you encounter an error while working in the web based GUI for
H\ :sub:`2`\ O, following the instructions below will assist H\ :sub:`2`\ O developers in
giving you the best possible solution.

**Step 1**

Through the drop down menu **Admin** go to **Log View**.
Expand Down Expand Up @@ -194,15 +181,3 @@ on 192.168.1.173:55599

.. Image:: Clusterstattunnel.png
:width: 70%












49 changes: 32 additions & 17 deletions h2o-docs/source/newuser/quickstart_jar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Getting Started from a Downloaded Zip File

Quick Step-by-step
""""""""""""""""""
1. Download the latest release of H\ :sub:`2`\ O as a .zip file from H\ :sub:`2`\ O `website <http://0xdata.com/h2O/>`_.
1. Download the latest release of H\ :sub:`2`\ O as a .zip file from
H\ :sub:`2`\ O `downloads page <http://0xdata.com/downloadtable//>`_.

2. From your terminal change your working directory to the same directory where your .zip file is saved.

Expand All @@ -23,25 +24,39 @@ Quick Step-by-step
cd h2o-1.7.0.520 #change working directory to the downloaded file
java -Xmx1g -jar h2o.jar

5. Wait a few moments and the following output will appear in your terminal window:
5. Wait a few moments and output similar to the following will appear in your terminal window:

::

03:05:45.311 main INFO WATER: ----- H2O started -----
03:05:45.312 main INFO WATER: Build git branch: master
03:05:45.312 main INFO WATER: Build git hash: f253798433c109b19acd14cb973b45f255c59f3f
03:05:45.312 main INFO WATER: Build git describe: f253798
03:05:45.312 main INFO WATER: Build project version: 1.7.0.520
03:05:45.313 main INFO WATER: Built by: 'jenkins'
03:05:45.313 main INFO WATER: Built on: 'Thu Sep 12 00:01:52 PDT 2013'
03:05:45.313 main INFO WATER: Java availableProcessors: 8
03:05:45.321 main INFO WATER: Java heap totalMemory: 0.08 gb
03:05:45.321 main INFO WATER: Java heap maxMemory: 0.99 gb
03:05:45.322 main INFO WATER: ICE root: '/tmp/h2o-tomk'
03:05:45.364 main INFO WATER: Internal communication uses port: 54322
+ Listening for HTTP and REST traffic on http://192.168.1.52:54321/
03:05:45.409 main INFO WATER: 03:05:45.411 main INFO WATER: Cloud of size 1 formed [/192.168.1.52:54321]
03:05:45.543 main INFO WATER: Log dir: '/tmp/h2o-tomk/h2ologs'
Irenes-MacBook-Pro:target Irene$ java -Xmx3g -jar h2o.jar
09:54:05.400 main INFO WATER: ----- H2O started -----
09:54:05.402 main INFO WATER: Build git branch: master
09:54:05.402 main INFO WATER: Build git hash: e44ee2cec508140fc6312e3d6874df8069eac669
09:54:05.402 main INFO WATER: Build git describe: nn-2-3032-ge44ee2c-dirty
09:54:05.402 main INFO WATER: Build project version: 2.1.0.99999
09:54:05.402 main INFO WATER: Built by: 'Irene'
09:54:05.402 main INFO WATER: Built on: 'Tue Feb 4 09:45:26 PST 2014'
09:54:05.402 main INFO WATER: Java availableProcessors: 8
09:54:05.403 main INFO WATER: Java heap totalMemory: 0.24 gb
09:54:05.403 main INFO WATER: Java heap maxMemory: 2.67 gb
09:54:05.404 main INFO WATER: Java version: Java 1.7.0_51 (from Oracle Corporation)
09:54:05.404 main INFO WATER: OS version: Mac OS X 10.9.1 (x86_64)
09:54:05.404 main INFO WATER: ICE root: '/tmp/h2o-Irene'
09:54:05.407 main INFO WATER: Possible IP Address: en0 (en0), fe80:0:0:0:6203:8ff:fe91:950a%4
09:54:05.407 main INFO WATER: Possible IP Address: en0 (en0), 192.168.0.4
09:54:05.408 main INFO WATER: Possible IP Address: lo0 (lo0), fe80:0:0:0:0:0:0:1%1
09:54:05.408 main INFO WATER: Possible IP Address: lo0 (lo0), 0:0:0:0:0:0:0:1
09:54:05.408 main INFO WATER: Possible IP Address: lo0 (lo0), 127.0.0.1
09:54:05.431 main INFO WATER: Internal communication uses port: 54322
+ Listening for HTTP and REST traffic on http://192.168.0.4:54321/
09:54:05.471 main INFO WATER: H2O cloud name: 'Irene'
09:54:05.472 main INFO WATER: (v2.1.0.99999) 'Irene' on
/192.168.0.4:54321, discovery address /229.58.14.243:58682
09:54:05.472 main INFO WATER: If you have trouble connecting, try SSH tunneling from your local machine (e.g., via port 55555):
+ 1. Open a terminal and run 'ssh -L 55555:localhost:54321 [email protected]'
+ 2. Point your browser to http://localhost:55555
09:54:05.475 main INFO WATER: Cloud of size 1 formed [/192.168.0.4:54321]
09:54:05.475 main INFO WATER: Log dir: '/tmp/h2o-Irene/h2ologs'

5. Point your web-browser to:

Expand Down

0 comments on commit 5bb2dec

Please sign in to comment.