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 java.util.Set;
 
 import static com.google.common.base.MoreObjects.toStringHelper;
 import static com.google.common.base.Preconditions.checkNotNull;
 
 public class TaskInfo
 {
    
The first valid version that will be returned for a remote task.
 
     public static final long STARTING_VERSION = 1;

    
A value lower than STARTING_VERSION. This value can be used to create an initial local task that is always older than any remote task.
 
     public static final long MIN_VERSION = 0;

    
A value larger than any valid value. This value can be used to create a final local task that is always newer than any remote task.
 
     public static final long MAX_VERSION = .;
 
     private final TaskId taskId;
     private final Optional<StringnodeInstanceId;
     private final long version;
     private final TaskState state;
     private final URI self;
     private final DateTime lastHeartbeat;
     private final SharedBufferInfo outputBuffers;
     private final Set<PlanNodeIdnoMoreSplits;
     private final TaskStats stats;
     private final List<ExecutionFailureInfofailures;
 
     @JsonCreator
     public TaskInfo(@JsonProperty("taskId"TaskId taskId,
             @JsonProperty("nodeInstanceId"Optional<StringnodeInstanceId,
             @JsonProperty("version"long version,
             @JsonProperty("state"TaskState state,
             @JsonProperty("self"URI self,
             @JsonProperty("lastHeartbeat"DateTime lastHeartbeat,
             @JsonProperty("outputBuffers"SharedBufferInfo outputBuffers,
             @JsonProperty("noMoreSplits"Set<PlanNodeIdnoMoreSplits,
             @JsonProperty("stats"TaskStats stats,
             @JsonProperty("failures"List<ExecutionFailureInfofailures)
     {
         this. = checkNotNull(taskId"taskId is null");
         this. = checkNotNull(nodeInstanceId"nodeInstanceId is null");
         this. = checkNotNull(version"version is null");
         this. = checkNotNull(state"state is null");
         this. = checkNotNull(self"self is null");
         this. = checkNotNull(lastHeartbeat"lastHeartbeat is null");
         this. = checkNotNull(outputBuffers"outputBuffers is null");
         this. = checkNotNull(noMoreSplits"noMoreSplits is null");
         this. = checkNotNull(stats"stats is null");
 
         if (failures != null) {
             this. = ImmutableList.copyOf(failures);
         }
         else {
             this. = ImmutableList.of();
         }
     }
 
     @JsonProperty
     public TaskId getTaskId()
     {
         return ;
     }
 
    {
        return ;
    }
    public long getVersion()
    {
        return ;
    }
    public TaskState getState()
    {
        return ;
    }
    public URI getSelf()
    {
        return ;
    }
    public DateTime getLastHeartbeat()
    {
        return ;
    }
    {
        return ;
    }
    public Set<PlanNodeIdgetNoMoreSplits()
    {
        return ;
    }
    public TaskStats getStats()
    {
        return ;
    }
    {
        return ;
    }
    public TaskInfo summarize()
    {
    }
    @Override
    public String toString()
    {
        return toStringHelper(this)
                .add("taskId")
                .add("state")
                .toString();
    }
New to GrepCode? Check out our FAQ X