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.execution;
 
 
 
 import java.net.URI;
 import java.util.List;
 
 import static com.google.common.base.MoreObjects.toStringHelper;
 
 public class StageInfo
 {
     private final StageId stageId;
     private final StageState state;
     private final URI self;
     private final PlanFragment plan;
     private final List<Typetypes;
     private final StageStats stageStats;
     private final List<TaskInfotasks;
     private final List<StageInfosubStages;
     private final List<ExecutionFailureInfofailures;
 
     @JsonCreator
     public StageInfo(
             @JsonProperty("stageId"StageId stageId,
             @JsonProperty("state"StageState state,
             @JsonProperty("self"URI self,
             @JsonProperty("plan") @Nullable PlanFragment plan,
             @JsonProperty("types"List<Typetypes,
             @JsonProperty("stageStats"StageStats stageStats,
             @JsonProperty("tasks"List<TaskInfotasks,
             @JsonProperty("subStages"List<StageInfosubStages,
             @JsonProperty("failures"List<ExecutionFailureInfofailures)
     {
         Preconditions.checkNotNull(stageId"stageId is null");
         Preconditions.checkNotNull(state"state is null");
         Preconditions.checkNotNull(self"self is null");
         Preconditions.checkNotNull(stageStats"stageStats is null");
         Preconditions.checkNotNull(tasks"tasks is null");
         Preconditions.checkNotNull(subStages"subStages is null");
         Preconditions.checkNotNull(failures"failures is null");
 
         this. = stageId;
         this. = state;
         this. = self;
         this. = plan;
         this. = types;
         this. = stageStats;
         this. = ImmutableList.copyOf(tasks);
         this. = subStages;
         this. = failures;
     }
 
     @JsonProperty
     public StageId getStageId()
     {
         return ;
     }
 
     @JsonProperty
     public StageState getState()
     {
         return ;
     }
 
     @JsonProperty
     public URI getSelf()
     {
         return ;
     }
 
     @JsonProperty
     @Nullable
     public PlanFragment getPlan()
     {
         return ;
     }
 
    public List<TypegetTypes()
    {
        return ;
    }
    public StageStats getStageStats()
    {
        return ;
    }
    public List<TaskInfogetTasks()
    {
        return ;
    }
    public List<StageInfogetSubStages()
    {
        return ;
    }
    {
        return ;
    }
    @Override
    public String toString()
    {
        return toStringHelper(this)
                .add("stageId")
                .add("state")
                .toString();
    }
    public static List<StageInfogetAllStages(StageInfo stageInfo)
    {
        ImmutableList.Builder<StageInfocollector = ImmutableList.builder();
        if (stageInfo != null) {
            addAllStages(stageInfocollector);
        }
        return collector.build();
    }
    private static void addAllStages(StageInfo stageInfoImmutableList.Builder<StageInfocollector)
    {
        collector.add(stageInfo);
        for (StageInfo subStage : stageInfo.getSubStages()) {
            addAllStages(subStagecollector);
        }
    }
New to GrepCode? Check out our FAQ X