Package com.google.cloud.bigquery
Class QueryStage
- java.lang.Object
-
- com.google.cloud.bigquery.QueryStage
-
- All Implemented Interfaces:
Serializable
public class QueryStage extends Object implements Serializable
BigQuery provides diagnostic information about a completed query's execution plan (or query plan for short). The query plan describes a query as a series of stages, with each stage comprising a number of steps that read from data sources, perform a series of transformations on the input, and emit an output to a future stage (or the final result). This class contains information on a query stage.- See Also:
- Query Plan, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQueryStage.QueryStepEach query stage is made of a number of steps.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)longgetCompletedParallelInputs()Returns the number of parallel input segments completed.longgetComputeMsAvg()Returns the time in milliseconds the average worker spent on CPU-bound tasks.longgetComputeMsMax()Returns the time in milliseconds the slowest worker spent on CPU-bound tasks.doublegetComputeRatioAvg()Returns the time the average worker spent CPU-bound, divided by the longest time spent by any worker in any segment.doublegetComputeRatioMax()Returns the time the slowest worker spent CPU-bound, divided by the longest time spent by any worker in any segment.longgetEndMs()Returns the stage end time represented as milliseconds since epoch.longgetGeneratedId()Returns a unique, server-generated ID for the stage within its plan.List<Long>getInputStages()Returns a list of the stage IDs that are inputs to this stage.StringgetName()Returns a human-readable name for the stage.longgetParallelInputs()Returns the number of parallel input segments to be processed.longgetReadMsAvg()Returns the time in milliseconds the average worker spent reading input.longgetReadMsMax()Returns the time in milliseconds the slowest worker spent reading input.doublegetReadRatioAvg()Returns the time the average worker spent reading input data, divided by the longest time spent by any worker in any segment.doublegetReadRatioMax()Returns the time the slowest worker spent reading input data, divided by the longest time spent by any worker in any segment.longgetRecordsRead()Returns the number of rows (top-level records) read by the stage.longgetRecordsWritten()Returns the number of rows (top-level records) written by the stage.longgetShuffleOutputBytes()Returns the total number of bytes written to shuffle.longgetShuffleOutputBytesSpilled()Returns the total number of bytes writtedn to shuffle and spilled to disk.longgetSlotMs()Returns the slot-milliseconds used by the stage.longgetStartMs()Returns the stage start time represented as milliseconds since epoch.StringgetStatus()Returns the current status for the stage.List<QueryStage.QueryStep>getSteps()Returns the list of steps within the stage in dependency order (approximately chronological).longgetWaitMsAvg()Returns the time in milliseconds the average worker spent waiting to be scheduled.longgetWaitMsMax()Returns the time in milliseconds the slowest worker spent waiting to be scheduled.doublegetWaitRatioAvg()Returns the time the average worker spent waiting to be scheduled, divided by the longest time spent by any worker in any segment.doublegetWaitRatioMax()Returns the time the slowest worker spent waiting to be scheduled, divided by the longest time spent by any worker in any segment.longgetWriteMsAvg()Returns the time in milliseconds the average worker spent writing output.longgetWriteMsMax()Returns the time in milliseconds the slowest worker spent writing output.doublegetWriteRatioAvg()Returns the time the average worker spent writing output data, divided by the longest time spent by any worker in any segment.doublegetWriteRatioMax()Returns the time the slowest worker spent writing output data, divided by the longest time spent by any worker in any segment.inthashCode()StringtoString()
-
-
-
Method Detail
-
getCompletedParallelInputs
public long getCompletedParallelInputs()
Returns the number of parallel input segments completed.
-
getComputeMsAvg
public long getComputeMsAvg()
Returns the time in milliseconds the average worker spent on CPU-bound tasks.
-
getComputeMsMax
public long getComputeMsMax()
Returns the time in milliseconds the slowest worker spent on CPU-bound tasks.
-
getComputeRatioAvg
public double getComputeRatioAvg()
Returns the time the average worker spent CPU-bound, divided by the longest time spent by any worker in any segment.
-
getComputeRatioMax
public double getComputeRatioMax()
Returns the time the slowest worker spent CPU-bound, divided by the longest time spent by any worker in any segment.
-
getEndMs
public long getEndMs()
Returns the stage end time represented as milliseconds since epoch.
-
getGeneratedId
public long getGeneratedId()
Returns a unique, server-generated ID for the stage within its plan.
-
getInputStages
public List<Long> getInputStages()
Returns a list of the stage IDs that are inputs to this stage.
-
getName
public String getName()
Returns a human-readable name for the stage.
-
getParallelInputs
public long getParallelInputs()
Returns the number of parallel input segments to be processed.
-
getReadMsAvg
public long getReadMsAvg()
Returns the time in milliseconds the average worker spent reading input.
-
getReadMsMax
public long getReadMsMax()
Returns the time in milliseconds the slowest worker spent reading input.
-
getReadRatioAvg
public double getReadRatioAvg()
Returns the time the average worker spent reading input data, divided by the longest time spent by any worker in any segment.
-
getReadRatioMax
public double getReadRatioMax()
Returns the time the slowest worker spent reading input data, divided by the longest time spent by any worker in any segment.
-
getRecordsRead
public long getRecordsRead()
Returns the number of rows (top-level records) read by the stage.
-
getRecordsWritten
public long getRecordsWritten()
Returns the number of rows (top-level records) written by the stage.
-
getShuffleOutputBytes
public long getShuffleOutputBytes()
Returns the total number of bytes written to shuffle.
-
getShuffleOutputBytesSpilled
public long getShuffleOutputBytesSpilled()
Returns the total number of bytes writtedn to shuffle and spilled to disk.
-
getStartMs
public long getStartMs()
Returns the stage start time represented as milliseconds since epoch.
-
getStatus
public String getStatus()
Returns the current status for the stage.
-
getSteps
public List<QueryStage.QueryStep> getSteps()
Returns the list of steps within the stage in dependency order (approximately chronological).
-
getWaitMsAvg
public long getWaitMsAvg()
Returns the time in milliseconds the average worker spent waiting to be scheduled.
-
getWaitMsMax
public long getWaitMsMax()
Returns the time in milliseconds the slowest worker spent waiting to be scheduled.
-
getWaitRatioAvg
public double getWaitRatioAvg()
Returns the time the average worker spent waiting to be scheduled, divided by the longest time spent by any worker in any segment.
-
getWaitRatioMax
public double getWaitRatioMax()
Returns the time the slowest worker spent waiting to be scheduled, divided by the longest time spent by any worker in any segment.
-
getWriteMsAvg
public long getWriteMsAvg()
Returns the time in milliseconds the average worker spent writing output.
-
getWriteMsMax
public long getWriteMsMax()
Returns the time in milliseconds the slowest worker spent writing output.
-
getWriteRatioAvg
public double getWriteRatioAvg()
Returns the time the average worker spent writing output data, divided by the longest time spent by any worker in any segment.
-
getWriteRatioMax
public double getWriteRatioMax()
Returns the time the slowest worker spent writing output data, divided by the longest time spent by any worker in any segment.
-
getSlotMs
public long getSlotMs()
Returns the slot-milliseconds used by the stage.
-
-