Java 类org.apache.hadoop.yarn.proto.YarnProtos.StringLocalResourceMapProto 实例源码

项目:hadoop    文件:ContainerLaunchContextPBImpl.java   
private void initLocalResources() {
  if (this.localResources != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<StringLocalResourceMapProto> list = p.getLocalResourcesList();
  this.localResources = new HashMap<String, LocalResource>();

  for (StringLocalResourceMapProto c : list) {
    this.localResources.put(c.getKey(), convertFromProtoFormat(c.getValue()));
  }
}
项目:hadoop    文件:ContainerLaunchContextPBImpl.java   
private void addLocalResourcesToProto() {
  maybeInitBuilder();
  builder.clearLocalResources();
  if (localResources == null)
    return;
  Iterable<StringLocalResourceMapProto> iterable = 
      new Iterable<StringLocalResourceMapProto>() {

    @Override
    public Iterator<StringLocalResourceMapProto> iterator() {
      return new Iterator<StringLocalResourceMapProto>() {

        Iterator<String> keyIter = localResources.keySet().iterator();

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }

        @Override
        public StringLocalResourceMapProto next() {
          String key = keyIter.next();
          return StringLocalResourceMapProto.newBuilder().setKey(key).
              setValue(convertToProtoFormat(localResources.get(key))).build();
        }

        @Override
        public boolean hasNext() {
          return keyIter.hasNext();
        }
      };
    }
  };
  builder.addAllLocalResources(iterable);
}
项目:aliyun-oss-hadoop-fs    文件:ContainerLaunchContextPBImpl.java   
private void initLocalResources() {
  if (this.localResources != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<StringLocalResourceMapProto> list = p.getLocalResourcesList();
  this.localResources = new HashMap<String, LocalResource>();

  for (StringLocalResourceMapProto c : list) {
    this.localResources.put(c.getKey(), convertFromProtoFormat(c.getValue()));
  }
}
项目:aliyun-oss-hadoop-fs    文件:ContainerLaunchContextPBImpl.java   
private void addLocalResourcesToProto() {
  maybeInitBuilder();
  builder.clearLocalResources();
  if (localResources == null)
    return;
  Iterable<StringLocalResourceMapProto> iterable = 
      new Iterable<StringLocalResourceMapProto>() {

    @Override
    public Iterator<StringLocalResourceMapProto> iterator() {
      return new Iterator<StringLocalResourceMapProto>() {

        Iterator<String> keyIter = localResources.keySet().iterator();

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }

        @Override
        public StringLocalResourceMapProto next() {
          String key = keyIter.next();
          return StringLocalResourceMapProto.newBuilder().setKey(key).
              setValue(convertToProtoFormat(localResources.get(key))).build();
        }

        @Override
        public boolean hasNext() {
          return keyIter.hasNext();
        }
      };
    }
  };
  builder.addAllLocalResources(iterable);
}
项目:big-c    文件:ContainerLaunchContextPBImpl.java   
private void initLocalResources() {
  if (this.localResources != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<StringLocalResourceMapProto> list = p.getLocalResourcesList();
  this.localResources = new HashMap<String, LocalResource>();

  for (StringLocalResourceMapProto c : list) {
    this.localResources.put(c.getKey(), convertFromProtoFormat(c.getValue()));
  }
}
项目:big-c    文件:ContainerLaunchContextPBImpl.java   
private void addLocalResourcesToProto() {
  maybeInitBuilder();
  builder.clearLocalResources();
  if (localResources == null)
    return;
  Iterable<StringLocalResourceMapProto> iterable = 
      new Iterable<StringLocalResourceMapProto>() {

    @Override
    public Iterator<StringLocalResourceMapProto> iterator() {
      return new Iterator<StringLocalResourceMapProto>() {

        Iterator<String> keyIter = localResources.keySet().iterator();

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }

        @Override
        public StringLocalResourceMapProto next() {
          String key = keyIter.next();
          return StringLocalResourceMapProto.newBuilder().setKey(key).
              setValue(convertToProtoFormat(localResources.get(key))).build();
        }

        @Override
        public boolean hasNext() {
          return keyIter.hasNext();
        }
      };
    }
  };
  builder.addAllLocalResources(iterable);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ContainerLaunchContextPBImpl.java   
private void initLocalResources() {
  if (this.localResources != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<StringLocalResourceMapProto> list = p.getLocalResourcesList();
  this.localResources = new HashMap<String, LocalResource>();

  for (StringLocalResourceMapProto c : list) {
    this.localResources.put(c.getKey(), convertFromProtoFormat(c.getValue()));
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ContainerLaunchContextPBImpl.java   
private void addLocalResourcesToProto() {
  maybeInitBuilder();
  builder.clearLocalResources();
  if (localResources == null)
    return;
  Iterable<StringLocalResourceMapProto> iterable = 
      new Iterable<StringLocalResourceMapProto>() {

    @Override
    public Iterator<StringLocalResourceMapProto> iterator() {
      return new Iterator<StringLocalResourceMapProto>() {

        Iterator<String> keyIter = localResources.keySet().iterator();

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }

        @Override
        public StringLocalResourceMapProto next() {
          String key = keyIter.next();
          return StringLocalResourceMapProto.newBuilder().setKey(key).
              setValue(convertToProtoFormat(localResources.get(key))).build();
        }

        @Override
        public boolean hasNext() {
          return keyIter.hasNext();
        }
      };
    }
  };
  builder.addAllLocalResources(iterable);
}
项目:hadoop-plus    文件:ContainerLaunchContextPBImpl.java   
private void initLocalResources() {
  if (this.localResources != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<StringLocalResourceMapProto> list = p.getLocalResourcesList();
  this.localResources = new HashMap<String, LocalResource>();

  for (StringLocalResourceMapProto c : list) {
    this.localResources.put(c.getKey(), convertFromProtoFormat(c.getValue()));
  }
}
项目:hadoop-plus    文件:ContainerLaunchContextPBImpl.java   
private void addLocalResourcesToProto() {
  maybeInitBuilder();
  builder.clearLocalResources();
  if (localResources == null)
    return;
  Iterable<StringLocalResourceMapProto> iterable = 
      new Iterable<StringLocalResourceMapProto>() {

    @Override
    public Iterator<StringLocalResourceMapProto> iterator() {
      return new Iterator<StringLocalResourceMapProto>() {

        Iterator<String> keyIter = localResources.keySet().iterator();

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }

        @Override
        public StringLocalResourceMapProto next() {
          String key = keyIter.next();
          return StringLocalResourceMapProto.newBuilder().setKey(key).
              setValue(convertToProtoFormat(localResources.get(key))).build();
        }

        @Override
        public boolean hasNext() {
          return keyIter.hasNext();
        }
      };
    }
  };
  builder.addAllLocalResources(iterable);
}
项目:hops    文件:ContainerLaunchContextPBImpl.java   
private void initLocalResources() {
  if (this.localResources != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<StringLocalResourceMapProto> list = p.getLocalResourcesList();
  this.localResources = new HashMap<String, LocalResource>();

  for (StringLocalResourceMapProto c : list) {
    this.localResources.put(c.getKey(), convertFromProtoFormat(c.getValue()));
  }
}
项目:hops    文件:ContainerLaunchContextPBImpl.java   
private void addLocalResourcesToProto() {
  maybeInitBuilder();
  builder.clearLocalResources();
  if (localResources == null)
    return;
  Iterable<StringLocalResourceMapProto> iterable = 
      new Iterable<StringLocalResourceMapProto>() {

    @Override
    public Iterator<StringLocalResourceMapProto> iterator() {
      return new Iterator<StringLocalResourceMapProto>() {

        Iterator<String> keyIter = localResources.keySet().iterator();

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }

        @Override
        public StringLocalResourceMapProto next() {
          String key = keyIter.next();
          return StringLocalResourceMapProto.newBuilder().setKey(key).
              setValue(convertToProtoFormat(localResources.get(key))).build();
        }

        @Override
        public boolean hasNext() {
          return keyIter.hasNext();
        }
      };
    }
  };
  builder.addAllLocalResources(iterable);
}
项目:hadoop-TCP    文件:ContainerLaunchContextPBImpl.java   
private void initLocalResources() {
  if (this.localResources != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<StringLocalResourceMapProto> list = p.getLocalResourcesList();
  this.localResources = new HashMap<String, LocalResource>();

  for (StringLocalResourceMapProto c : list) {
    this.localResources.put(c.getKey(), convertFromProtoFormat(c.getValue()));
  }
}
项目:hadoop-TCP    文件:ContainerLaunchContextPBImpl.java   
private void addLocalResourcesToProto() {
  maybeInitBuilder();
  builder.clearLocalResources();
  if (localResources == null)
    return;
  Iterable<StringLocalResourceMapProto> iterable = 
      new Iterable<StringLocalResourceMapProto>() {

    @Override
    public Iterator<StringLocalResourceMapProto> iterator() {
      return new Iterator<StringLocalResourceMapProto>() {

        Iterator<String> keyIter = localResources.keySet().iterator();

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }

        @Override
        public StringLocalResourceMapProto next() {
          String key = keyIter.next();
          return StringLocalResourceMapProto.newBuilder().setKey(key).
              setValue(convertToProtoFormat(localResources.get(key))).build();
        }

        @Override
        public boolean hasNext() {
          return keyIter.hasNext();
        }
      };
    }
  };
  builder.addAllLocalResources(iterable);
}
项目:hardfs    文件:ContainerLaunchContextPBImpl.java   
private void initLocalResources() {
  if (this.localResources != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<StringLocalResourceMapProto> list = p.getLocalResourcesList();
  this.localResources = new HashMap<String, LocalResource>();

  for (StringLocalResourceMapProto c : list) {
    this.localResources.put(c.getKey(), convertFromProtoFormat(c.getValue()));
  }
}
项目:hardfs    文件:ContainerLaunchContextPBImpl.java   
private void addLocalResourcesToProto() {
  maybeInitBuilder();
  builder.clearLocalResources();
  if (localResources == null)
    return;
  Iterable<StringLocalResourceMapProto> iterable = 
      new Iterable<StringLocalResourceMapProto>() {

    @Override
    public Iterator<StringLocalResourceMapProto> iterator() {
      return new Iterator<StringLocalResourceMapProto>() {

        Iterator<String> keyIter = localResources.keySet().iterator();

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }

        @Override
        public StringLocalResourceMapProto next() {
          String key = keyIter.next();
          return StringLocalResourceMapProto.newBuilder().setKey(key).
              setValue(convertToProtoFormat(localResources.get(key))).build();
        }

        @Override
        public boolean hasNext() {
          return keyIter.hasNext();
        }
      };
    }
  };
  builder.addAllLocalResources(iterable);
}
项目:hadoop-on-lustre2    文件:ContainerLaunchContextPBImpl.java   
private void initLocalResources() {
  if (this.localResources != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<StringLocalResourceMapProto> list = p.getLocalResourcesList();
  this.localResources = new HashMap<String, LocalResource>();

  for (StringLocalResourceMapProto c : list) {
    this.localResources.put(c.getKey(), convertFromProtoFormat(c.getValue()));
  }
}
项目:hadoop-on-lustre2    文件:ContainerLaunchContextPBImpl.java   
private void addLocalResourcesToProto() {
  maybeInitBuilder();
  builder.clearLocalResources();
  if (localResources == null)
    return;
  Iterable<StringLocalResourceMapProto> iterable = 
      new Iterable<StringLocalResourceMapProto>() {

    @Override
    public Iterator<StringLocalResourceMapProto> iterator() {
      return new Iterator<StringLocalResourceMapProto>() {

        Iterator<String> keyIter = localResources.keySet().iterator();

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }

        @Override
        public StringLocalResourceMapProto next() {
          String key = keyIter.next();
          return StringLocalResourceMapProto.newBuilder().setKey(key).
              setValue(convertToProtoFormat(localResources.get(key))).build();
        }

        @Override
        public boolean hasNext() {
          return keyIter.hasNext();
        }
      };
    }
  };
  builder.addAllLocalResources(iterable);
}