Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 package com.facebook.presto.operator;
 
 
 
 import java.util.List;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
 import static io.airlift.units.DataSize.Unit.BYTE;
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
 
 public class TaskStats
 {
     private final DateTime createTime;
     private final DateTime firstStartTime;
     private final DateTime lastStartTime;
     private final DateTime endTime;
 
     private final Duration elapsedTime;
     private final Duration queuedTime;
 
     private final int totalDrivers;
     private final int queuedDrivers;
     private final int queuedPartitionedDrivers;
     private final int runningDrivers;
     private final int runningPartitionedDrivers;
     private final int completedDrivers;
 
     private final DataSize memoryReservation;
 
     private final Duration totalScheduledTime;
     private final Duration totalCpuTime;
     private final Duration totalUserTime;
     private final Duration totalBlockedTime;
 
     private final DataSize rawInputDataSize;
     private final long rawInputPositions;
 
     private final DataSize processedInputDataSize;
     private final long processedInputPositions;
 
     private final DataSize outputDataSize;
     private final long outputPositions;
 
     private final List<PipelineStatspipelines;
 
     public TaskStats(DateTime createTimeDateTime endTime)
     {
         this(createTime,
                 null,
                 null,
                 endTime,
                 new Duration(0, ),
                 new Duration(0, ),
                 0,
                 0,
                 0,
                 0,
                 0,
                 0,
                 new DataSize(0, ),
                 new Duration(0, ),
                 new Duration(0, ),
                 new Duration(0, ),
                 new Duration(0, ),
                 new DataSize(0, ),
                 0,
                 new DataSize(0, ),
                 0,
                 new DataSize(0, ),
                 0,
                 ImmutableList.<PipelineStats>of());
     }
 
     @JsonCreator
     public TaskStats(
             @JsonProperty("createTime"DateTime createTime,
             @JsonProperty("firstStartTime"DateTime firstStartTime,
             @JsonProperty("lastStartTime"DateTime lastStartTime,
            @JsonProperty("endTime"DateTime endTime,
            @JsonProperty("elapsedTime"Duration elapsedTime,
            @JsonProperty("queuedTime"Duration queuedTime,
            @JsonProperty("totalDrivers"int totalDrivers,
            @JsonProperty("queuedDrivers"int queuedDrivers,
            @JsonProperty("queuedPartitionedDrivers"int queuedPartitionedDrivers,
            @JsonProperty("runningDrivers"int runningDrivers,
            @JsonProperty("runningPartitionedDrivers"int runningPartitionedDrivers,
            @JsonProperty("completedDrivers"int completedDrivers,
            @JsonProperty("memoryReservation"DataSize memoryReservation,
            @JsonProperty("totalScheduledTime"Duration totalScheduledTime,
            @JsonProperty("totalCpuTime"Duration totalCpuTime,
            @JsonProperty("totalUserTime"Duration totalUserTime,
            @JsonProperty("totalBlockedTime"Duration totalBlockedTime,
            @JsonProperty("rawInputDataSize"DataSize rawInputDataSize,
            @JsonProperty("rawInputPositions"long rawInputPositions,
            @JsonProperty("processedInputDataSize"DataSize processedInputDataSize,
            @JsonProperty("processedInputPositions"long processedInputPositions,
            @JsonProperty("outputDataSize"DataSize outputDataSize,
            @JsonProperty("outputPositions"long outputPositions,
            @JsonProperty("pipelines"List<PipelineStatspipelines)
    {
        this. = checkNotNull(createTime"createTime is null");
        this. = firstStartTime;
        this. = lastStartTime;
        this. = endTime;
        this. = checkNotNull(elapsedTime"elapsedTime is null");
        this. = checkNotNull(queuedTime"queuedTime is null");
        checkArgument(totalDrivers >= 0, "totalDrivers is negative");
        this. = totalDrivers;
        checkArgument(queuedDrivers >= 0, "queuedDrivers is negative");
        this. = queuedDrivers;
        checkArgument(queuedPartitionedDrivers >= 0, "queuedPartitionedDrivers is negative");
        this. = queuedPartitionedDrivers;
        checkArgument(runningDrivers >= 0, "runningDrivers is negative");
        this. = runningDrivers;
        checkArgument(runningPartitionedDrivers >= 0, "runningPartitionedDrivers is negative");
        this. = runningPartitionedDrivers;
        checkArgument(completedDrivers >= 0, "completedDrivers is negative");
        this. = completedDrivers;
        this. = checkNotNull(memoryReservation"memoryReservation is null");
        this. = checkNotNull(totalScheduledTime"totalScheduledTime is null");
        this. = checkNotNull(totalCpuTime"totalCpuTime is null");
        this. = checkNotNull(totalUserTime"totalUserTime is null");
        this. = checkNotNull(totalBlockedTime"totalBlockedTime is null");
        this. = checkNotNull(rawInputDataSize"rawInputDataSize is null");
        checkArgument(rawInputPositions >= 0, "rawInputPositions is negative");
        this. = rawInputPositions;
        this. = checkNotNull(processedInputDataSize"processedInputDataSize is null");
        checkArgument(processedInputPositions >= 0, "processedInputPositions is negative");
        this. = processedInputPositions;
        this. = checkNotNull(outputDataSize"outputDataSize is null");
        checkArgument(outputPositions >= 0, "outputPositions is negative");
        this. = outputPositions;
        this. = ImmutableList.copyOf(checkNotNull(pipelines"pipelines is null"));
    }
    public DateTime getCreateTime()
    {
        return ;
    }
    @Nullable
    public DateTime getFirstStartTime()
    {
        return ;
    }
    @Nullable
    public DateTime getLastStartTime()
    {
        return ;
    }
    @Nullable
    public DateTime getEndTime()
    {
        return ;
    }
    public Duration getElapsedTime()
    {
        return ;
    }
    public Duration getQueuedTime()
    {
        return ;
    }
    public int getTotalDrivers()
    {
        return ;
    }
    public int getQueuedDrivers()
    {
        return ;
    }
    public int getRunningDrivers()
    {
        return ;
    }
    public int getCompletedDrivers()
    {
        return ;
    }
    {
        return ;
    }
    {
        return ;
    }
    public Duration getTotalCpuTime()
    {
        return ;
    }
    public Duration getTotalUserTime()
    {
        return ;
    }
    public Duration getTotalBlockedTime()
    {
        return ;
    }
    public DataSize getRawInputDataSize()
    {
        return ;
    }
    public long getRawInputPositions()
    {
        return ;
    }
    {
        return ;
    }
    public long getProcessedInputPositions()
    {
        return ;
    }
    public DataSize getOutputDataSize()
    {
        return ;
    }
    public long getOutputPositions()
    {
        return ;
    }
    public List<PipelineStatsgetPipelines()
    {
        return ;
    }
    public int getQueuedPartitionedDrivers()
    {
        return ;
    }
    public int getRunningPartitionedDrivers()
    {
        return ;
    }
    public TaskStats summarize()
    {
        return new TaskStats(
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ,
                ImmutableList.<PipelineStats>of());
    }
New to GrepCode? Check out our FAQ X