public final class H2O
extends java.lang.Object
H2O
Cloud.Modifier and Type | Class and Description |
---|---|
static class |
H2O.AboutEntry |
static class |
H2O.BaseArgs
A class containing all of the authentication arguments for H2O.
|
static class |
H2O.FJWThr |
static class |
H2O.GAStartupReportThread |
static class |
H2O.H2OCallback<T extends H2O.H2OCountedCompleter> |
static class |
H2O.H2OCountedCompleter<T extends H2O.H2OCountedCompleter>
Simple wrapper over F/J
CountedCompleter to support priority
queues. |
static class |
H2O.H2OFuture<T> |
static class |
H2O.OptArgs
A class containing all of the arguments for H2O.
|
static class |
H2O.OptString |
Modifier and Type | Field and Description |
---|---|
H2ONode[] |
_memary |
static AbstractBuildVersion |
ABV |
static byte |
ACK_ACK_PRIORITY |
static byte |
ACK_PRIORITY |
static int |
API_PORT |
static H2O.OptArgs |
ARGS
Singleton ARGS instance that contains the processed arguments.
|
static byte |
ATOMIC_PRIORITY |
static int |
CLIENT_ID_GA_CUST_DIM |
static int |
CLIENT_TYPE_GA_CUST_DIM |
static H2O |
CLOUD |
static java.net.InetAddress |
CLOUD_MULTICAST_GROUP |
static java.net.NetworkInterface |
CLOUD_MULTICAST_IF |
static int |
CLOUD_MULTICAST_PORT |
static java.net.MulticastSocket |
CLOUD_MULTICAST_SOCKET |
static long |
CLUSTER_ID |
static java.lang.String |
DEFAULT_JKS_PASS |
static byte |
DESERIAL_PRIORITY |
static AbstractEmbeddedH2OConfig |
embeddedH2OConfig |
static byte |
FETCH_ACK_PRIORITY |
static com.brsanthu.googleanalytics.GoogleAnalytics |
GA |
static byte |
GET_KEY_PRIORITY |
static byte |
GUI_PRIORITY |
static int |
H2O_PORT |
static java.net.URI |
ICE_ROOT |
static byte |
INVALIDATE_PRIORITY |
static int |
LOW_PRIORITY_API_WORK |
static java.lang.String |
LOW_PRIORITY_API_WORK_CLASS |
static byte |
MAX_PRIORITY |
static byte |
MIN_HI_PRIORITY |
static byte |
MIN_PRIORITY |
static int |
NUMCPUS |
static long |
PID |
static byte |
PUT_KEY_PRIORITY |
static H2ONode |
SELF
Myself, as a Node in the Cloud
|
static java.net.InetAddress |
SELF_ADDRESS
IP address of this node used for communication
with other nodes.
|
static java.util.concurrent.atomic.AtomicLong |
START_TIME_MILLIS |
static water.nbhm.NonBlockingHashMap<Key,Value> |
STORE |
Modifier and Type | Method and Description |
---|---|
static void |
addAboutEntry(java.lang.String name,
java.lang.String value) |
static void |
addCoreExtension(AbstractH2OExtension e) |
static boolean |
addNodeToFlatfile(H2ONode node)
Add node to a manual multicast list.
|
static void |
addRestAPIExtension(RestApiExtension e) |
static java.lang.String |
calcNextUniqueModelId(java.lang.String desc)
Calculate a unique model id that includes User-Agent info (if it can be discovered).
|
static boolean |
checkUnsupportedJava()
Check if the Java version is not supported
|
static void |
closeAll() |
static void |
configureLogging() |
static boolean |
containsKey(Key key) |
static void |
decrementActiveRapidsCounter()
Decrement the current number of active Rapids exec calls.
|
static java.lang.String |
DEFAULT_FLOW_DIR() |
static java.lang.String |
DEFAULT_ICE_ROOT() |
static void |
die(java.lang.String s) |
static void |
exit(int status)
Notify embedding software instance H2O wants to exit.
|
static H2OFailException |
fail() |
static H2OFailException |
fail(java.lang.String msg) |
static H2OFailException |
fail(java.lang.String msg,
java.lang.Throwable cause)
H2O.fail is intended to be used in code where something should never happen, and if
it does it's a coding error that needs to be addressed immediately.
|
static void |
finalizeRegistration()
Deprecated.
use starServingRestApi
|
long |
free_mem() |
static void |
gc()
Run System.gc() on every node in the H2O cluster.
|
static java.util.ArrayList<H2O.AboutEntry> |
getAboutEntries() |
static H2ONode |
getClientByIPPort(java.lang.String ipPort) |
static java.util.HashSet<H2ONode> |
getClients() |
static int |
getCloudSize() |
static java.util.ArrayList<AbstractH2OExtension> |
getCoreExtensions() |
static AbstractEmbeddedH2OConfig |
getEmbeddedH2OConfig() |
static java.util.HashSet<H2ONode> |
getFlatfile()
Returns a set of nodes which are contacted during manual
multicast.
|
static long |
getIdleTimeMillis()
Get the number of milliseconds the H2O cluster has been idle.
|
static java.lang.String |
getIpPortString() |
static JettyHTTPD |
getJetty() |
H2ONode |
getNodeByIpPort(java.lang.String ipPort) |
static NodePersistentStorage |
getNPS() |
static PersistManager |
getPM() |
static java.util.ArrayList<RestApiExtension> |
getRestApiExtensions() |
static boolean |
getShutdownRequested() |
static java.lang.String |
getURL(java.lang.String schema) |
static java.lang.String |
getURL(java.lang.String schema,
java.net.InetAddress address,
int port,
java.lang.String contextPath) |
static boolean |
haveInheritedLog4jConfiguration() |
boolean |
healthy() |
static void |
incrementActiveRapidsCounter()
Increment the current number of active Rapids exec calls.
|
static boolean |
isFlatfileEnabled()
Is manual multicast enabled?
|
static boolean |
isNodeInFlatfile(H2ONode node)
Check if a node is included in a manual multicast list.
|
static void |
joinOthers() |
static java.util.Set<Key> |
localKeySet() |
static void |
main(java.lang.String[] args) |
H2ONode[] |
members() |
static void |
notifyAboutCloudSize(java.net.InetAddress ip,
int port,
int size)
Tell the embedding software that this H2O instance belongs to
a cloud of a certain size.
|
static int |
orderlyShutdown()
Orderly shutdown with infinite timeout for confirmations from the nodes in the cluster
|
static int |
orderlyShutdown(int timeout) |
static void |
parseFailed(java.lang.String message) |
static void |
printHelp()
Print help about command line arguments.
|
static Value |
putIfMatch(Key key,
Value val,
Value old) |
static void |
raw_clear() |
static void |
raw_remove(Key key) |
static void |
register(java.lang.String method_url,
java.lang.Class<? extends Handler> hclass,
java.lang.String method,
java.lang.String apiName,
java.lang.String summary) |
static void |
registerExtensions()
Register H2O extensions.
|
static void |
registerResourceRoot(java.io.File f) |
static void |
registerRestApis(java.lang.String relativeResourcePath)
Register REST API routes.
|
static H2ONode |
removeClient(H2ONode client) |
static boolean |
removeNodeFromFlatfile(H2ONode node)
Remove node from a manual multicast list.
|
static H2ONode |
reportClient(H2ONode client) |
static void |
requestShutdown() |
static void |
setEmbeddedH2OConfig(AbstractEmbeddedH2OConfig c)
Register embedded H2O configuration object with H2O instance.
|
static void |
setFlatfile(java.util.HashSet<H2ONode> nodes)
Setup a set of nodes which should be contacted during
manual multicast.
|
static void |
setJetty(JettyHTTPD value) |
static void |
shutdown(int status)
Cluster shutdown itself by sending a shutdown UDP packet.
|
int |
size() |
static void |
startServingRestApi()
This switch Jetty into accepting mode.
|
static int |
store_size() |
static java.lang.String |
STOREtoString() |
static <T extends H2O.H2OCountedCompleter> |
submitTask(T task) |
static java.lang.String |
technote(int[] numbers,
java.lang.String message)
Return an error message with an accompanying list of URLs to help the user get more detailed information.
|
static java.lang.String |
technote(int number,
java.lang.String message)
Return an error message with an accompanying URL to help the user get more detailed information.
|
java.lang.String |
toString() |
static H2OIllegalArgumentException |
unimpl()
Throw an exception that will cause the request to fail, but the cluster to continue.
|
static H2OIllegalArgumentException |
unimpl(java.lang.String msg)
Throw an exception that will cause the request to fail, but the cluster to continue.
|
static void |
updateNotIdle()
Update the last time that something happened to reset the idle timer.
|
static void |
waitForCloudSize(int x,
long ms) |
public static final java.lang.String DEFAULT_JKS_PASS
public static final H2O.OptArgs ARGS
public static com.brsanthu.googleanalytics.GoogleAnalytics GA
public static int CLIENT_TYPE_GA_CUST_DIM
public static int CLIENT_ID_GA_CUST_DIM
public static volatile AbstractEmbeddedH2OConfig embeddedH2OConfig
public static final AbstractBuildVersion ABV
public static final java.util.concurrent.atomic.AtomicLong START_TIME_MILLIS
public static final int NUMCPUS
public static final long PID
public static final byte MAX_PRIORITY
public static final byte ACK_ACK_PRIORITY
public static final byte FETCH_ACK_PRIORITY
public static final byte ACK_PRIORITY
public static final byte DESERIAL_PRIORITY
public static final byte INVALIDATE_PRIORITY
public static final byte GET_KEY_PRIORITY
public static final byte PUT_KEY_PRIORITY
public static final byte ATOMIC_PRIORITY
public static final byte GUI_PRIORITY
public static final byte MIN_HI_PRIORITY
public static final byte MIN_PRIORITY
public static int LOW_PRIORITY_API_WORK
public static java.lang.String LOW_PRIORITY_API_WORK_CLASS
public static int H2O_PORT
public static int API_PORT
public static java.net.MulticastSocket CLOUD_MULTICAST_SOCKET
public static java.net.NetworkInterface CLOUD_MULTICAST_IF
public static java.net.InetAddress CLOUD_MULTICAST_GROUP
public static int CLOUD_MULTICAST_PORT
public static H2ONode SELF
public static java.net.InetAddress SELF_ADDRESS
public static java.net.URI ICE_ROOT
public static final long CLUSTER_ID
public static volatile H2O CLOUD
public final H2ONode[] _memary
public static void printHelp()
public static void parseFailed(java.lang.String message)
public static void setEmbeddedH2OConfig(AbstractEmbeddedH2OConfig c)
public static AbstractEmbeddedH2OConfig getEmbeddedH2OConfig()
public static void notifyAboutCloudSize(java.net.InetAddress ip, int port, int size)
ip
- IP address this H2O can be reached at.port
- Port this H2O can be reached at (for REST API and browser).size
- Number of H2O instances in the cloud.public static void closeAll()
public static void exit(int status)
status
- H2O's requested process exit value.public static void shutdown(int status)
public static int orderlyShutdown()
public static int orderlyShutdown(int timeout)
public static void requestShutdown()
public static boolean getShutdownRequested()
public static boolean haveInheritedLog4jConfiguration()
public static void configureLogging()
public static void registerExtensions()
public static void addCoreExtension(AbstractH2OExtension e)
public static void addRestAPIExtension(RestApiExtension e)
public static java.util.ArrayList<AbstractH2OExtension> getCoreExtensions()
public static java.util.ArrayList<RestApiExtension> getRestApiExtensions()
public static void registerRestApis(java.lang.String relativeResourcePath)
AbstractRegister
and call the register() method for each.relativeResourcePath
- Relative path from running process working dir to find web resources.public static void addAboutEntry(java.lang.String name, java.lang.String value)
public static java.util.ArrayList<H2O.AboutEntry> getAboutEntries()
public static java.lang.String calcNextUniqueModelId(java.lang.String desc)
desc
- Model description.public static long getIdleTimeMillis()
public static void updateNotIdle()
public static void incrementActiveRapidsCounter()
public static void decrementActiveRapidsCounter()
public static H2OIllegalArgumentException unimpl()
fail(String, Throwable)
public static H2OIllegalArgumentException unimpl(java.lang.String msg)
unimpl(String)
,
fail(String, Throwable)
public static H2OFailException fail(java.lang.String msg, java.lang.Throwable cause)
It should *not* be used when only the single request should fail, it should *only* be used if the error means that someone needs to go add some code right away.
msg
- Message to Log.fatal()cause
- Optional cause exception to Log.fatal()public static H2OFailException fail()
fail(String, Throwable)
public static H2OFailException fail(java.lang.String msg)
fail(String, Throwable)
public static java.lang.String technote(int number, java.lang.String message)
number
- H2O tech note number.message
- Message to present to the user.public static java.lang.String technote(int[] numbers, java.lang.String message)
numbers
- H2O tech note numbers.message
- Message to present to the user.public static <T extends H2O.H2OCountedCompleter> T submitTask(T task)
public static java.lang.String getIpPortString()
public static java.lang.String getURL(java.lang.String schema)
public static java.lang.String getURL(java.lang.String schema, java.net.InetAddress address, int port, java.lang.String contextPath)
public static java.lang.String DEFAULT_ICE_ROOT()
public static java.lang.String DEFAULT_FLOW_DIR()
public static void setJetty(JettyHTTPD value)
public static JettyHTTPD getJetty()
public static void register(java.lang.String method_url, java.lang.Class<? extends Handler> hclass, java.lang.String method, java.lang.String apiName, java.lang.String summary)
public static void registerResourceRoot(java.io.File f)
@Deprecated public static void finalizeRegistration()
public static void startServingRestApi()
public H2ONode getNodeByIpPort(java.lang.String ipPort)
public final int size()
public java.lang.String toString()
toString
in class java.lang.Object
public H2ONode[] members()
public long free_mem()
public boolean healthy()
public static void waitForCloudSize(int x, long ms)
public static int getCloudSize()
public static void joinOthers()
public static void raw_remove(Key key)
public static void raw_clear()
public static boolean containsKey(Key key)
public static java.util.Set<Key> localKeySet()
public static int store_size()
public static java.lang.String STOREtoString()
public static PersistManager getPM()
public static NodePersistentStorage getNPS()
public static void gc()
public static boolean checkUnsupportedJava()
public static void main(java.lang.String[] args)
public static void die(java.lang.String s)
public static boolean addNodeToFlatfile(H2ONode node)
node
- h2o nodepublic static boolean removeNodeFromFlatfile(H2ONode node)
node
- h2o nodepublic static boolean isNodeInFlatfile(H2ONode node)
node
- h2o nodepublic static boolean isFlatfileEnabled()
public static void setFlatfile(java.util.HashSet<H2ONode> nodes)
nodes
- set of H2O nodes.public static java.util.HashSet<H2ONode> getFlatfile()
public static java.util.HashSet<H2ONode> getClients()
public static H2ONode getClientByIPPort(java.lang.String ipPort)