water
Class Job

java.lang.Object
  extended by water.Iced
      extended by water.api.Constants
          extended by water.api.RequestStatics
              extended by water.api.RequestArguments
                  extended by water.api.RequestQueries
                      extended by water.api.RequestBuilders
                          extended by water.api.Request
                              extended by water.Request2
                                  extended by water.Job
All Implemented Interfaces:
java.lang.Cloneable, Freezable
Direct Known Subclasses:
DRF.DRFJob, GLMGrid, GridSearch, Job.ChunkProgressJob, Job.FrameJob, Job.HexJob, KMeans, ParseDataset, ParseDataset2

public class Job
extends Request2


Nested Class Summary
static class Job.ChunkProgress
           
static class Job.ChunkProgressJob
           
static class Job.ColumnsJob
           
static class Job.Fail
           
static class Job.FrameJob
           
static class Job.HexJob
           
static class Job.ModelJob
           
static interface Job.Progress
           
static interface Job.ProgressMonitor
           
static class Job.ValidatedJob
           
 
Nested classes/interfaces inherited from class water.Request2
Request2.ColumnSelect, Request2.Dependent, Request2.DoClassBoolean, Request2.MultiVecSelect, Request2.MultiVecSelectType, Request2.TypeaheadKey, Request2.VecClassSelect, Request2.VecSelect
 
Nested classes/interfaces inherited from class water.api.Request
Request.API, Request.Default, Request.Filter
 
Nested classes/interfaces inherited from class water.api.RequestBuilders
RequestBuilders.ArrayBuilder, RequestBuilders.ArrayHeaderRowBuilder, RequestBuilders.ArrayRowBuilder, RequestBuilders.ArrayRowElementBuilder, RequestBuilders.ArrayRowSingleColBuilder, RequestBuilders.BooleanStringBuilder, RequestBuilders.Builder, RequestBuilders.ElementBuilder, RequestBuilders.HideBuilder, RequestBuilders.KeyCellBuilder, RequestBuilders.KeyElementBuilder, RequestBuilders.KeyLinkElementBuilder, RequestBuilders.KeyMinAvgMaxBuilder, RequestBuilders.NoCaptionObjectBuilder, RequestBuilders.ObjectBuilder, RequestBuilders.PaginatedTable, RequestBuilders.PreFormattedBuilder, RequestBuilders.Response, RequestBuilders.WarningCellBuilder
 
Nested classes/interfaces inherited from class water.api.RequestArguments
RequestArguments.Argument<T>, RequestArguments.Bool, RequestArguments.CaseModeSelect, RequestArguments.CaseSelect, RequestArguments.ClassifyBool, RequestArguments.EnumArgument<T extends java.lang.Enum<T>>, RequestArguments.ExistingFile, RequestArguments.FrameClassVec, RequestArguments.FrameKeyMultiVec, RequestArguments.FrameKeyVec, RequestArguments.H2OCategoryStrata, RequestArguments.H2OCategoryWeights, RequestArguments.H2OExistingKey, RequestArguments.H2OGLMModelKey, RequestArguments.H2OHexKey, RequestArguments.H2OHexKeyCol, RequestArguments.H2OKey, RequestArguments.H2OKey2, RequestArguments.H2OKMeansModelKey, RequestArguments.H2OModelKey<TM extends OldModel,TK extends TypeaheadKeysRequest>, RequestArguments.H2OPCAModelKey, RequestArguments.HexAllColumnSelect, RequestArguments.HexColumnSelect, RequestArguments.HexKeyClassCol, RequestArguments.HexNonClassColumnSelect, RequestArguments.HexNonConstantColumnSelect, RequestArguments.HexPCAColumnSelect, RequestArguments.InputCheckBox, RequestArguments.InputSelect<T>, RequestArguments.InputText<T>, RequestArguments.Int, RequestArguments.LongInt, RequestArguments.MultipleSelect<T>, RequestArguments.MultipleText<T>, RequestArguments.NTree, RequestArguments.NumberSequence, RequestArguments.Real, RequestArguments.Record<T>, RequestArguments.RFModelKey, RequestArguments.RSeq, RequestArguments.Str, RequestArguments.StringList, RequestArguments.TypeaheadInputText<T>
 
Nested classes/interfaces inherited from class water.api.RequestStatics
RequestStatics.RequestType
 
Nested classes/interfaces inherited from class water.api.Constants
Constants.Extensions, Constants.Schemes, Constants.Suffixes
 
Field Summary
 H2O.H2OCountedCompleter _fjtask
           
static long CANCELLED_END_TIME
           
 java.lang.String description
           
 Key destination_key
           
static DocGen.FieldDoc[] DOC_FIELDS
           
 long end_time
           
 java.lang.String exception
           
 Key job_key
           
 long start_time
           
 
Fields inherited from class water.api.Request
_requestHelp, SUPPORTS_ONLY_V1, SUPPORTS_ONLY_V2, SUPPORTS_V1_V2
 
Fields inherited from class water.api.RequestBuilders
ARRAY_BUILDER, ARRAY_HEADER_ROW_BUILDER, ARRAY_ROW_BUILDER, ARRAY_ROW_ELEMENT_BUILDER, ARRAY_ROW_SINGLECOL_BUILDER, ELEMENT_BUILDER, GSON_BUILDER, OBJECT_BUILDER, ROOT_OBJECT
 
Fields inherited from class water.api.RequestQueries
_queryHtml
 
Fields inherited from class water.api.RequestArguments
_arguments
 
Fields inherited from class water.api.Constants
ALPHA, ARGUMENTS, AUC, BASE, BEST_THRESHOLD, BETA_EPS, BIN_LIMIT, BROWSE, BUCKET, BUILT_IN_KEY_JOBS, CANCELLED, CASE, CASE_MODE, CHUNK, CLASS, CLOUD_NAME, CLOUD_SIZE, CLUSTERS, COEFFICIENTS, COLS, COLUMNS_DISPLAY, CONSENSUS, CONTENTS, COUNT, DATA_KEY, DEPTH, DESCRIPTION, DEST_KEY, DTHRESHOLDS, END_TIME, ENUM_DOMAIN_SIZE, ERROR, ESCAPE_NAN, EXCLUSIVE_SPLIT_LIMIT, EXPRESSION, FAILED, FAMILY, FEATURES, FILE, FILES, FILTER, FIRST_CHUNK, FJ_QUEUE_HI, FJ_QUEUE_LO, FJ_THREADS_HI, FJ_THREADS_LO, FREE_DISK, FREE_MEM, HEADER, HEIGHT, HELP, IGNORE, ITEMS, ITERATIVE_CM, JOB, JOB_KEY, JOBS, JSON_H2O, KEY, KEYS, LAMBDA, LAST_CONTACT, LIMIT, LINK, LOCKED, MAX, MAX_DISK, MAX_ITER, MAX_MEM, MAX_ROWS, MEAN, MIN, MODEL_KEY, MODELS, MORE, MTRY, MTRY_NODES, NAME, NEG_X, NO_CM, NODE, NODE_NAME, NODES, NORMALIZE, NUM_COLS, NUM_CPUS, NUM_FAILED, NUM_KEYS, NUM_MISSING_VALUES, NUM_ROWS, NUM_SUCCEEDED, NUM_TREES, OBJECT, OFFSET, OOBEE, PARALLEL, PARSER_TYPE, PATH, PREVIEW, PREVIOUS_MODEL_KEY, PROGRESS, PROGRESS_KEY, PROGRESS_TOTAL, REDIRECT, REDIRECT_ARGS, REPLICATION_FACTOR, REQUEST_TIME, RESPONSE, RHO, ROW, ROW_SIZE, ROWS, RPCS, SAMPLE, SAMPLING_STRATEGY, SCALE, SEED, SENT_ROWS, SEPARATOR, SIZE, SOURCE_KEY, STACK_TRACES, START_TIME, STAT_TYPE, STATUS, STEP, STRATA_SAMPLES, SUCCEEDED, SYSTEM_LOAD, TASK_KEY, TCPS_ACTIVE, TCPS_DUTY, TIME, TOT_MEM, TREE_COUNT, TREE_DEPTH, TREE_LEAVES, TREE_NUM, TREES, TWEEDIE_POWER, TYPE, URL, USE_NON_LOCAL_DATA, VALUE, VALUE_SIZE, VALUE_TYPE, VARIANCE, VERSION, VIEW, WARNINGS, WEIGHT, WEIGHTS, WIDTH, X, XVAL, Y
 
Constructor Summary
Job()
           
 
Method Summary
static Job[] all()
           
 void cancel()
           
static void cancel(Key self, java.lang.String exception)
           
 void cancel(java.lang.String msg)
           
 boolean cancelled()
           
protected  Key defaultDestKey()
           
protected  Key defaultJobKey()
           
 Key dest()
           
protected  void done()
          Invoked after job has run for cleanup purposes.
protected  void exec()
          Actual job code.
static Job findJob(Key key)
          Finds a job with given key or returns null
static Job findJobByDest(Key destKey)
          Finds a job with given dest key or returns null
 Job fork()
           
<T> T
get()
           
protected  void init()
          Invoked before job runs.
 void invoke()
           
protected  void logStart()
           
protected  void onCancelled()
           
 float progress()
           
protected  RequestBuilders.Response redirect()
           
 void remove()
           
 boolean running()
           
static boolean running(Key self)
           
 long runTimeMs()
          Returns job execution time in milliseconds
 Key self()
           
protected  RequestBuilders.Response serve()
           
 java.lang.String speedDescription()
          Description of a speed criteria: msecs/frob
 long speedValue()
          Value of the described speed criteria: msecs/frob
 void start(H2O.H2OCountedCompleter fjtask)
           
static void waitUntilJobEnded(Key jobkey)
          Block synchronously waiting for a job to end, success or not.
static void waitUntilJobEnded(Key jobkey, int pollingIntervalMillis)
          Block synchronously waiting for a job to end, success or not.
 
Methods inherited from class water.Request2
create, input, registered, serveGrid, set, split, superServeGrid, supportedVersions
 
Methods inherited from class water.api.Request
addToNavbar, addToNavbar, DocExampleFail, DocExampleSucc, href, href, hrefType, HTMLHelp, initializeNavBar, log, mapTypeahead, ReSTHelp, serve, toDocGET, toHTML, wrap, wrap, wrap, writeJSONFields
 
Methods inherited from class water.api.RequestBuilders
build, buildJSONResponseBox, buildResponseHeader, name
 
Methods inherited from class water.api.RequestQueries
buildQuery, checkArguments, queryArgumentValueSet
 
Methods inherited from class water.api.RequestArguments
arguments, argumentsToJson, frameColumnNameToIndex, vaCategoryNames, vaCategoryNames, vaColumnNameToIndex
 
Methods inherited from class water.api.RequestStatics
checkJsonName, encodeRedirectArgs, JSON2HTML, jsonError, requestName, Str2JSON
 
Methods inherited from class water.Iced
clone, frozenType, init, newInstance, read, toDocField, write, writeJSON
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOC_FIELDS

public static DocGen.FieldDoc[] DOC_FIELDS

CANCELLED_END_TIME

public static final long CANCELLED_END_TIME
See Also:
Constant Field Values

job_key

public Key job_key

destination_key

public Key destination_key

description

public java.lang.String description

start_time

public long start_time

end_time

public long end_time

exception

public java.lang.String exception

_fjtask

public transient H2O.H2OCountedCompleter _fjtask
Constructor Detail

Job

public Job()
Method Detail

self

public Key self()

dest

public Key dest()

logStart

protected void logStart()

all

public static Job[] all()

defaultJobKey

protected Key defaultJobKey()

defaultDestKey

protected Key defaultDestKey()

start

public void start(H2O.H2OCountedCompleter fjtask)

progress

public float progress()

get

public <T> T get()

cancel

public void cancel()

cancel

public void cancel(java.lang.String msg)

cancel

public static void cancel(Key self,
                          java.lang.String exception)

onCancelled

protected void onCancelled()

cancelled

public boolean cancelled()

running

public boolean running()

running

public static boolean running(Key self)

remove

public void remove()

findJob

public static final Job findJob(Key key)
Finds a job with given key or returns null


findJobByDest

public static final Job findJobByDest(Key destKey)
Finds a job with given dest key or returns null


runTimeMs

public final long runTimeMs()
Returns job execution time in milliseconds


speedDescription

public java.lang.String speedDescription()
Description of a speed criteria: msecs/frob


speedValue

public long speedValue()
Value of the described speed criteria: msecs/frob


serve

protected RequestBuilders.Response serve()
Specified by:
serve in class Request

redirect

protected RequestBuilders.Response redirect()

fork

public Job fork()

invoke

public void invoke()

init

protected void init()
             throws java.lang.IllegalArgumentException
Invoked before job runs. This is the place to checks arguments are valid or throw IllegalArgumentException. It will get invoked both from the Web and Java APIs.

Throws:
java.lang.IllegalArgumentException

exec

protected void exec()
Actual job code. Should be blocking until execution is done.


done

protected void done()
Invoked after job has run for cleanup purposes.


waitUntilJobEnded

public static void waitUntilJobEnded(Key jobkey,
                                     int pollingIntervalMillis)
Block synchronously waiting for a job to end, success or not.

Parameters:
jobkey - Job to wait for.
pollingIntervalMillis - Polling interval sleep time.

waitUntilJobEnded

public static void waitUntilJobEnded(Key jobkey)
Block synchronously waiting for a job to end, success or not.

Parameters:
jobkey - Job to wait for.