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

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

  for (StringStringMapProto c : list) {
    this.environment.put(c.getKey(), c.getValue());
  }
}
项目:hadoop    文件:ContainerLaunchContextPBImpl.java   
private void addEnvToProto() {
  maybeInitBuilder();
  builder.clearEnvironment();
  if (environment == null)
    return;
  Iterable<StringStringMapProto> iterable = 
      new Iterable<StringStringMapProto>() {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        @Override
        public boolean hasNext() {
          return keyIter.hasNext();
        }
      };
    }
  };
  builder.addAllEnvironment(iterable);
}
项目:hops    文件:ContainerLaunchContextPBImpl.java   
private void initEnv() {
  if (this.environment != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<StringStringMapProto> list = p.getEnvironmentList();
  this.environment = new HashMap<String, String>();

  for (StringStringMapProto c : list) {
    this.environment.put(c.getKey(), c.getValue());
  }
}
项目:hops    文件:ContainerLaunchContextPBImpl.java   
private void addEnvToProto() {
  maybeInitBuilder();
  builder.clearEnvironment();
  if (environment == null)
    return;
  Iterable<StringStringMapProto> iterable = 
      new Iterable<StringStringMapProto>() {

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

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

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

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

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

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

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

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

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

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

        @Override
        public boolean hasNext() {
          return keyIter.hasNext();
        }
      };
    }
  };
  builder.addAllEnvironment(iterable);
}
项目:hardfs    文件:ContainerLaunchContextPBImpl.java   
private void initEnv() {
  if (this.environment != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<StringStringMapProto> list = p.getEnvironmentList();
  this.environment = new HashMap<String, String>();

  for (StringStringMapProto c : list) {
    this.environment.put(c.getKey(), c.getValue());
  }
}
项目:hardfs    文件:ContainerLaunchContextPBImpl.java   
private void addEnvToProto() {
  maybeInitBuilder();
  builder.clearEnvironment();
  if (environment == null)
    return;
  Iterable<StringStringMapProto> iterable = 
      new Iterable<StringStringMapProto>() {

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

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

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

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

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

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

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

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

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

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

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