private static void startLocalNode ( ) { // Figure self out; this is surprisingly hard NetworkInit . initializeNetworkSockets ( ) ; // Do not forget to put SELF into the static configuration (to simulate proper multicast behavior) if ( ! ARGS . client && H2O . isFlatfileEnabled ( ) && ! H2O . isNodeInFlatfile ( SELF ) ) { Log . warn ( "Flatfile configuration does not include self: " + SELF + ", but contains " + H2O . getFlatfile ( ) ) ; H2O . addNodeToFlatfile ( SELF ) ; } Log . info ( "H2O cloud name: '" + ARGS . name + "' on " + SELF + ( H2O . isFlatfileEnabled ( ) ? ( ", discovery address " + CLOUD_MULTICAST_GROUP + ":" + CLOUD_MULTICAST_PORT ) : ", static configuration based on -flatfile " + ARGS . flatfile ) ) ; if ( ! H2O . ARGS . disable_web ) { Log . info ( "If you have trouble connecting, try SSH tunneling from your local machine (e.g., via port 55555):\n" + " 1. Open a terminal and run 'ssh -L 55555:localhost:" + API_PORT + " " + System . getProperty ( "user.name" ) + "@" + SELF_ADDRESS . getHostAddress ( ) + "'\n" + " 2. Point your browser to " + NetworkInit . h2oHttpView . getScheme ( ) + "://localhost:55555" ) ; } // Create the starter Cloud with 1 member SELF . _heartbeat . _jar_md5 = JarHash . JARHASH ; SELF . _heartbeat . _client = ARGS . client ; SELF . _heartbeat . _cloud_name_hash = ARGS . name . hashCode ( ) ; }
Initializes the local node and the local cloud with itself as the only member .