Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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 org.apache.tez.dag.api;
 
 import java.util.List;
 import java.util.Set;
 
 public class VertexLocationHint  {
 
   private final List<TaskLocationHinttaskLocationHints;
 
   
   public VertexLocationHint(List<TaskLocationHinttaskLocationHints) {
     if (taskLocationHints != null) {
       this. = Collections.unmodifiableList(taskLocationHints);
     } else {
       this. = null;
     }
   }
 
     return ;
   }
 
   @Override
   public int hashCode() {
     final int prime = 7883;
     int result = 1;
     if ( != null) {
       result = prime * result + .hashCode();
     }
     return result;
   }
 
   @Override
   public boolean equals(Object obj) {
     if (this == obj) {
       return true;
     }
     if (obj == null) {
       return false;
     }
     if (getClass() != obj.getClass()) {
       return false;
     }
     VertexLocationHint other = (VertexLocationHintobj;
     if ( != null) {
       if (!.equals(other.taskLocationHints)) {
         return false;
       }
     } else if (other.taskLocationHints != null) {
       return false;
     }
     return true;
   }
 
   public static class TaskLocationHint {
 
     // Host names if any to be used
     private final Set<Stringhosts;
     // Rack names if any to be used
     private final Set<Stringracks;
 
     public TaskLocationHint(Set<StringhostsSet<Stringracks) {
       if (hosts != null) {
         this. = Collections.unmodifiableSet(hosts);
       } else {
         this. = null;
       }
       if (racks != null) {
         this. = Collections.unmodifiableSet(racks);
       } else {
         this. = null;
       }
     }
 
     public Set<StringgetDataLocalHosts() {
       return ;
     }
 
     public Set<StringgetRacks() {
       return ;
    }
    @Override
    public int hashCode() {
      final int prime = 9397;
      int result = 1;
      result = (  != null) ?
          prime * result + .hashCode() :
          result + prime;
      result = (  != null) ?
          prime * result + .hashCode() :
          result + prime;
      return result;
    }
    @Override
    public boolean equals(Object obj) {
      if (this == obj) {
        return true;
      }
      if (obj == null) {
        return false;
      }
      if (getClass() != obj.getClass()) {
        return false;
      }
      TaskLocationHint other = (TaskLocationHintobj;
      if ( != null) {
        if (!.equals(other.hosts)) {
          return false;
        }
      } else if (other.hosts != null) {
        return false;
      }
      if ( != null) {
        if (!.equals(other.racks)) {
          return false;
        }
      } else if (other.racks != null) {
        return false;
      }
      return true;
    }
  }
New to GrepCode? Check out our FAQ X