@InterfaceAudience.Private public class DAGClientImpl extends DAGClient
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isATSEnabled |
protected DAGClientInternal |
realClient |
| Constructor and Description |
|---|
DAGClientImpl(org.apache.hadoop.yarn.api.records.ApplicationId appId,
String dagId,
TezConfiguration conf,
FrameworkClient frameworkClient,
org.apache.hadoop.security.UserGroupInformation ugi) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected org.apache.hadoop.yarn.api.records.ApplicationReport |
getApplicationReportInternal() |
String |
getDagIdentifierString()
Get the dag identifier for the currently executing dag.
|
DAGStatus |
getDAGStatus(Set<StatusGetOpts> statusOptions)
Get the status of the specified DAG
|
DAGStatus |
getDAGStatus(Set<StatusGetOpts> statusOptions,
long timeout)
Get the status of the specified DAG when it reaches a final state, or the timeout expires.
|
protected DAGStatus |
getDAGStatusViaRM()
Get the DAG status via the YARN ResourceManager
|
String |
getExecutionContext()
Gets DAG execution context for use with logging
|
DAGClientInternal |
getRealClient() |
String |
getSessionIdentifierString()
Get the session identifier for the session in which this dag is running
|
VertexStatus |
getVertexStatus(String vertexName,
Set<StatusGetOpts> statusOptions)
Get the status of a Vertex of a DAG
|
void |
tryKillDAG()
Kill a running DAG
|
DAGStatus |
waitForCompletion()
Wait forever for DAG to complete without printing any vertex statuses
|
DAGStatus |
waitForCompletion(long timeMs)
Wait for DAG to complete without printing any vertex statuses
|
DAGStatus |
waitForCompletionWithStatusUpdates(Set<StatusGetOpts> statusGetOpts)
Wait for DAG to complete and periodically print *all* vertices' status.
|
protected DAGClientInternal realClient
protected boolean isATSEnabled
public DAGClientImpl(org.apache.hadoop.yarn.api.records.ApplicationId appId,
String dagId,
TezConfiguration conf,
@Nullable
FrameworkClient frameworkClient,
org.apache.hadoop.security.UserGroupInformation ugi)
public String getExecutionContext()
DAGClientgetExecutionContext in class DAGClientprotected org.apache.hadoop.yarn.api.records.ApplicationReport getApplicationReportInternal()
getApplicationReportInternal in class DAGClientpublic DAGStatus getDAGStatus(@Nullable Set<StatusGetOpts> statusOptions, long timeout) throws TezException, IOException
DAGClientgetDAGStatus in class DAGClientstatusOptions - Optionally, retrieve additional information based on
specified options. To retrieve basic information, this can be nulltimeout - RPC call timeout. Value -1 waits for infinite and returns when
DAG reaches final stateTezExceptionIOExceptionpublic DAGStatus getDAGStatus(@Nullable Set<StatusGetOpts> statusOptions) throws TezException, IOException
DAGClientgetDAGStatus in class DAGClientstatusOptions - Optionally, retrieve additional information based on
specified options. To retrieve basic information, this can be nullTezExceptionIOExceptionpublic VertexStatus getVertexStatus(String vertexName, Set<StatusGetOpts> statusOptions) throws IOException, TezException
DAGClientgetVertexStatus in class DAGClientstatusOptions - Optionally, retrieve additional information based on
specified optionsIOExceptionTezExceptionpublic String getDagIdentifierString()
DAGClientgetDagIdentifierString in class DAGClientpublic String getSessionIdentifierString()
DAGClientgetSessionIdentifierString in class DAGClientpublic void tryKillDAG()
throws IOException,
TezException
DAGClienttryKillDAG in class DAGClientIOExceptionTezExceptionpublic DAGStatus waitForCompletion(long timeMs) throws IOException, TezException, InterruptedException
DAGClientwaitForCompletion in class DAGClienttimeMs - Maximum wait durationIOExceptionTezExceptionInterruptedExceptionpublic DAGStatus waitForCompletion() throws IOException, TezException, InterruptedException
DAGClientwaitForCompletion in class DAGClientIOExceptionTezExceptionInterruptedExceptionpublic DAGStatus waitForCompletionWithStatusUpdates(@Nullable Set<StatusGetOpts> statusGetOpts) throws IOException, TezException, InterruptedException
DAGClientwaitForCompletionWithStatusUpdates in class DAGClientstatusGetOpts - : status get options. For example, to get counter pass
EnumSet.of(StatusGetOpts.GET_COUNTERS)IOExceptionTezExceptionInterruptedExceptionpublic void close()
throws IOException
IOExceptionprotected DAGStatus getDAGStatusViaRM() throws TezException, IOException
TezExceptionIOExceptionpublic DAGClientInternal getRealClient()
Copyright © 2020 Apache Software Foundation. All rights reserved.