Java 类org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto 实例源码

项目:hadoop    文件:RegisterApplicationMasterResponsePBImpl.java   
private void mergeLocalToBuilder() {
  if (this.maximumResourceCapability != null) {
    builder.setMaximumCapability(
        convertToProtoFormat(this.maximumResourceCapability));
  }
  if (this.applicationACLS != null) {
    addApplicationACLs();
  }
  if (this.containersFromPreviousAttempts != null) {
    addContainersFromPreviousAttemptToProto();
  }
  if (nmTokens != null) {
    builder.clearNmTokensFromPreviousAttempts();
    Iterable<NMTokenProto> iterable = getTokenProtoIterable(nmTokens);
    builder.addAllNmTokensFromPreviousAttempts(iterable);
  }
  if(schedulerResourceTypes != null) {
    addSchedulerResourceTypes();
  }
}
项目:aliyun-oss-hadoop-fs    文件:RegisterApplicationMasterResponsePBImpl.java   
private void mergeLocalToBuilder() {
  if (this.maximumResourceCapability != null) {
    builder.setMaximumCapability(
        convertToProtoFormat(this.maximumResourceCapability));
  }
  if (this.applicationACLS != null) {
    addApplicationACLs();
  }
  if (this.containersFromPreviousAttempts != null) {
    addContainersFromPreviousAttemptToProto();
  }
  if (nmTokens != null) {
    builder.clearNmTokensFromPreviousAttempts();
    Iterable<NMTokenProto> iterable = getTokenProtoIterable(nmTokens);
    builder.addAllNmTokensFromPreviousAttempts(iterable);
  }
  if(schedulerResourceTypes != null) {
    addSchedulerResourceTypes();
  }
}
项目:big-c    文件:RegisterApplicationMasterResponsePBImpl.java   
private void mergeLocalToBuilder() {
  if (this.maximumResourceCapability != null) {
    builder.setMaximumCapability(
        convertToProtoFormat(this.maximumResourceCapability));
  }
  if (this.applicationACLS != null) {
    addApplicationACLs();
  }
  if (this.containersFromPreviousAttempts != null) {
    addContainersFromPreviousAttemptToProto();
  }
  if (nmTokens != null) {
    builder.clearNmTokensFromPreviousAttempts();
    Iterable<NMTokenProto> iterable = getTokenProtoIterable(nmTokens);
    builder.addAllNmTokensFromPreviousAttempts(iterable);
  }
  if(schedulerResourceTypes != null) {
    addSchedulerResourceTypes();
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:RegisterApplicationMasterResponsePBImpl.java   
private void mergeLocalToBuilder() {
  if (this.maximumResourceCapability != null) {
    builder.setMaximumCapability(
        convertToProtoFormat(this.maximumResourceCapability));
  }
  if (this.applicationACLS != null) {
    addApplicationACLs();
  }
  if (this.containersFromPreviousAttempts != null) {
    addContainersFromPreviousAttemptToProto();
  }
  if (nmTokens != null) {
    builder.clearNmTokensFromPreviousAttempts();
    Iterable<NMTokenProto> iterable = getTokenProtoIterable(nmTokens);
    builder.addAllNmTokensFromPreviousAttempts(iterable);
  }
  if(schedulerResourceTypes != null) {
    addSchedulerResourceTypes();
  }
}
项目:hops    文件:RegisterApplicationMasterResponsePBImpl.java   
private void mergeLocalToBuilder() {
  if (this.maximumResourceCapability != null) {
    builder.setMaximumCapability(
        convertToProtoFormat(this.maximumResourceCapability));
  }
  if (this.applicationACLS != null) {
    addApplicationACLs();
  }
  if (this.containersFromPreviousAttempts != null) {
    addContainersFromPreviousAttemptToProto();
  }
  if (nmTokens != null) {
    builder.clearNmTokensFromPreviousAttempts();
    Iterable<NMTokenProto> iterable = getTokenProtoIterable(nmTokens);
    builder.addAllNmTokensFromPreviousAttempts(iterable);
  }
  if(schedulerResourceTypes != null) {
    addSchedulerResourceTypes();
  }
}
项目:hadoop-on-lustre2    文件:RegisterApplicationMasterResponsePBImpl.java   
private void mergeLocalToBuilder() {
  if (this.maximumResourceCapability != null) {
    builder.setMaximumCapability(
        convertToProtoFormat(this.maximumResourceCapability));
  }
  if (this.applicationACLS != null) {
    addApplicationACLs();
  }
  if (this.containersFromPreviousAttempts != null) {
    addContainersFromPreviousAttemptToProto();
  }
  if (nmTokens != null) {
    builder.clearNmTokensFromPreviousAttempts();
    Iterable<NMTokenProto> iterable = getTokenProtoIterable(nmTokens);
    builder.addAllNmTokensFromPreviousAttempts(iterable);
  }
}
项目:hadoop    文件:RegisterApplicationMasterResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensFromPreviousAttemptsList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:hadoop    文件:RegisterApplicationMasterResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:hadoop    文件:AllocateResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  if (nmTokens != null) {
    return;
  }
  AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:hadoop    文件:AllocateResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:aliyun-oss-hadoop-fs    文件:RegisterApplicationMasterResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensFromPreviousAttemptsList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:aliyun-oss-hadoop-fs    文件:RegisterApplicationMasterResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:aliyun-oss-hadoop-fs    文件:AllocateResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  if (nmTokens != null) {
    return;
  }
  AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:aliyun-oss-hadoop-fs    文件:AllocateResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:big-c    文件:RegisterApplicationMasterResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensFromPreviousAttemptsList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:big-c    文件:RegisterApplicationMasterResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:big-c    文件:AllocateResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  if (nmTokens != null) {
    return;
  }
  AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:big-c    文件:AllocateResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:hadoop-2.6.0-cdh5.4.3    文件:RegisterApplicationMasterResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensFromPreviousAttemptsList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:RegisterApplicationMasterResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:hadoop-2.6.0-cdh5.4.3    文件:AllocateResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  if (nmTokens != null) {
    return;
  }
  AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:AllocateResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:hadoop-plus    文件:AllocateResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  if (nmTokens != null) {
    return;
  }
  AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:hadoop-plus    文件:AllocateResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:hops    文件:RegisterApplicationMasterResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensFromPreviousAttemptsList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:hops    文件:RegisterApplicationMasterResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:hops    文件:AllocateResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  if (nmTokens != null) {
    return;
  }
  AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:hops    文件:AllocateResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:hadoop-TCP    文件:AllocateResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  if (nmTokens != null) {
    return;
  }
  AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:hadoop-TCP    文件:AllocateResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:hardfs    文件:AllocateResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  if (nmTokens != null) {
    return;
  }
  AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:hardfs    文件:AllocateResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:hadoop-on-lustre2    文件:RegisterApplicationMasterResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensFromPreviousAttemptsList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:hadoop-on-lustre2    文件:RegisterApplicationMasterResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:hadoop-on-lustre2    文件:AllocateResponsePBImpl.java   
private synchronized void initLocalNewNMTokenList() {
  if (nmTokens != null) {
    return;
  }
  AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
项目:hadoop-on-lustre2    文件:AllocateResponsePBImpl.java   
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
项目:hadoop    文件:RegisterApplicationMasterResponsePBImpl.java   
private NMTokenProto convertToProtoFormat(NMToken token) {
  return ((NMTokenPBImpl) token).getProto();
}
项目:hadoop    文件:RegisterApplicationMasterResponsePBImpl.java   
private NMToken convertFromProtoFormat(NMTokenProto proto) {
  return new NMTokenPBImpl(proto);
}
项目:hadoop    文件:AllocateResponsePBImpl.java   
private synchronized NMTokenProto convertToProtoFormat(NMToken token) {
  return ((NMTokenPBImpl)token).getProto();
}
项目:hadoop    文件:AllocateResponsePBImpl.java   
private synchronized NMToken convertFromProtoFormat(NMTokenProto proto) {
  return new NMTokenPBImpl(proto);
}