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

项目:hadoop    文件:RegisterApplicationMasterResponsePBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto
      : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hadoop    文件:RegisterApplicationMasterResponsePBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:hadoop    文件:ContainerLaunchContextPBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hadoop    文件:ContainerLaunchContextPBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:hadoop    文件:ContainerManagerImpl.java   
private ContainerManagerApplicationProto buildAppProto(ApplicationId appId,
    String user, Credentials credentials,
    Map<ApplicationAccessType, String> appAcls,
    LogAggregationContext logAggregationContext) {

  ContainerManagerApplicationProto.Builder builder =
      ContainerManagerApplicationProto.newBuilder();
  builder.setId(((ApplicationIdPBImpl) appId).getProto());
  builder.setUser(user);

  if (logAggregationContext != null) {
    builder.setLogAggregationContext((
        (LogAggregationContextPBImpl)logAggregationContext).getProto());
  }

  builder.clearCredentials();
  if (credentials != null) {
    DataOutputBuffer dob = new DataOutputBuffer();
    try {
      credentials.writeTokenStorageToStream(dob);
      builder.setCredentials(ByteString.copyFrom(dob.getData()));
    } catch (IOException e) {
      // should not occur
      LOG.error("Cannot serialize credentials", e);
    }
  }

  builder.clearAcls();
  if (appAcls != null) {
    for (Map.Entry<ApplicationAccessType, String> acl : appAcls.entrySet()) {
      ApplicationACLMapProto p = ApplicationACLMapProto.newBuilder()
          .setAccessType(ProtoUtils.convertToProtoFormat(acl.getKey()))
          .setAcl(acl.getValue())
          .build();
      builder.addAcls(p);
    }
  }

  return builder.build();
}
项目:aliyun-oss-hadoop-fs    文件:RegisterApplicationMasterResponsePBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto
      : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:aliyun-oss-hadoop-fs    文件:RegisterApplicationMasterResponsePBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:aliyun-oss-hadoop-fs    文件:ContainerLaunchContextPBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:aliyun-oss-hadoop-fs    文件:ContainerLaunchContextPBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:aliyun-oss-hadoop-fs    文件:ContainerManagerImpl.java   
private ContainerManagerApplicationProto buildAppProto(ApplicationId appId,
    String user, Credentials credentials,
    Map<ApplicationAccessType, String> appAcls,
    LogAggregationContext logAggregationContext) {

  ContainerManagerApplicationProto.Builder builder =
      ContainerManagerApplicationProto.newBuilder();
  builder.setId(((ApplicationIdPBImpl) appId).getProto());
  builder.setUser(user);

  if (logAggregationContext != null) {
    builder.setLogAggregationContext((
        (LogAggregationContextPBImpl)logAggregationContext).getProto());
  }

  builder.clearCredentials();
  if (credentials != null) {
    DataOutputBuffer dob = new DataOutputBuffer();
    try {
      credentials.writeTokenStorageToStream(dob);
      builder.setCredentials(ByteString.copyFrom(dob.getData()));
    } catch (IOException e) {
      // should not occur
      LOG.error("Cannot serialize credentials", e);
    }
  }

  builder.clearAcls();
  if (appAcls != null) {
    for (Map.Entry<ApplicationAccessType, String> acl : appAcls.entrySet()) {
      ApplicationACLMapProto p = ApplicationACLMapProto.newBuilder()
          .setAccessType(ProtoUtils.convertToProtoFormat(acl.getKey()))
          .setAcl(acl.getValue())
          .build();
      builder.addAcls(p);
    }
  }

  return builder.build();
}
项目:big-c    文件:RegisterApplicationMasterResponsePBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto
      : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:big-c    文件:RegisterApplicationMasterResponsePBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:big-c    文件:ContainerLaunchContextPBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:big-c    文件:ContainerLaunchContextPBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:big-c    文件:ContainerManagerImpl.java   
private ContainerManagerApplicationProto buildAppProto(ApplicationId appId,
    String user, Credentials credentials,
    Map<ApplicationAccessType, String> appAcls,
    LogAggregationContext logAggregationContext) {

  ContainerManagerApplicationProto.Builder builder =
      ContainerManagerApplicationProto.newBuilder();
  builder.setId(((ApplicationIdPBImpl) appId).getProto());
  builder.setUser(user);

  if (logAggregationContext != null) {
    builder.setLogAggregationContext((
        (LogAggregationContextPBImpl)logAggregationContext).getProto());
  }

  builder.clearCredentials();
  if (credentials != null) {
    DataOutputBuffer dob = new DataOutputBuffer();
    try {
      credentials.writeTokenStorageToStream(dob);
      builder.setCredentials(ByteString.copyFrom(dob.getData()));
    } catch (IOException e) {
      // should not occur
      LOG.error("Cannot serialize credentials", e);
    }
  }

  builder.clearAcls();
  if (appAcls != null) {
    for (Map.Entry<ApplicationAccessType, String> acl : appAcls.entrySet()) {
      ApplicationACLMapProto p = ApplicationACLMapProto.newBuilder()
          .setAccessType(ProtoUtils.convertToProtoFormat(acl.getKey()))
          .setAcl(acl.getValue())
          .build();
      builder.addAcls(p);
    }
  }

  return builder.build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:RegisterApplicationMasterResponsePBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto
      : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:RegisterApplicationMasterResponsePBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ContainerLaunchContextPBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ContainerLaunchContextPBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ContainerManagerImpl.java   
private ContainerManagerApplicationProto buildAppProto(ApplicationId appId,
    String user, Credentials credentials,
    Map<ApplicationAccessType, String> appAcls,
    LogAggregationContext logAggregationContext) {

  ContainerManagerApplicationProto.Builder builder =
      ContainerManagerApplicationProto.newBuilder();
  builder.setId(((ApplicationIdPBImpl) appId).getProto());
  builder.setUser(user);

  if (logAggregationContext != null) {
    builder.setLogAggregationContext((
        (LogAggregationContextPBImpl)logAggregationContext).getProto());
  }

  builder.clearCredentials();
  if (credentials != null) {
    DataOutputBuffer dob = new DataOutputBuffer();
    try {
      credentials.writeTokenStorageToStream(dob);
      builder.setCredentials(ByteString.copyFrom(dob.getData()));
    } catch (IOException e) {
      // should not occur
      LOG.error("Cannot serialize credentials", e);
    }
  }

  builder.clearAcls();
  if (appAcls != null) {
    for (Map.Entry<ApplicationAccessType, String> acl : appAcls.entrySet()) {
      ApplicationACLMapProto p = ApplicationACLMapProto.newBuilder()
          .setAccessType(ProtoUtils.convertToProtoFormat(acl.getKey()))
          .setAcl(acl.getValue())
          .build();
      builder.addAcls(p);
    }
  }

  return builder.build();
}
项目:hadoop-plus    文件:RegisterApplicationMasterResponsePBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto
      : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hadoop-plus    文件:RegisterApplicationMasterResponsePBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:hadoop-plus    文件:ContainerLaunchContextPBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hadoop-plus    文件:ContainerLaunchContextPBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:hops    文件:RegisterApplicationMasterResponsePBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto
      : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hops    文件:RegisterApplicationMasterResponsePBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:hops    文件:ContainerLaunchContextPBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hops    文件:ContainerLaunchContextPBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:hadoop-TCP    文件:RegisterApplicationMasterResponsePBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto
      : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hadoop-TCP    文件:RegisterApplicationMasterResponsePBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:hadoop-TCP    文件:ContainerLaunchContextPBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hadoop-TCP    文件:ContainerLaunchContextPBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:hardfs    文件:RegisterApplicationMasterResponsePBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto
      : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hardfs    文件:RegisterApplicationMasterResponsePBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:hardfs    文件:ContainerLaunchContextPBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hardfs    文件:ContainerLaunchContextPBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:hadoop-on-lustre2    文件:RegisterApplicationMasterResponsePBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto
      : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hadoop-on-lustre2    文件:RegisterApplicationMasterResponsePBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}
项目:hadoop-on-lustre2    文件:ContainerLaunchContextPBImpl.java   
private void initApplicationACLs() {
  if (this.applicationACLS != null) {
    return;
  }
  ContainerLaunchContextProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationACLMapProto> list = p.getApplicationACLsList();
  this.applicationACLS = new HashMap<ApplicationAccessType, String>(list
      .size());

  for (ApplicationACLMapProto aclProto : list) {
    this.applicationACLS.put(ProtoUtils.convertFromProtoFormat(aclProto
        .getAccessType()), aclProto.getAcl());
  }
}
项目:hadoop-on-lustre2    文件:ContainerLaunchContextPBImpl.java   
private void addApplicationACLs() {
  maybeInitBuilder();
  builder.clearApplicationACLs();
  if (applicationACLS == null) {
    return;
  }
  Iterable<? extends ApplicationACLMapProto> values
      = new Iterable<ApplicationACLMapProto>() {

    @Override
    public Iterator<ApplicationACLMapProto> iterator() {
      return new Iterator<ApplicationACLMapProto>() {
        Iterator<ApplicationAccessType> aclsIterator = applicationACLS
            .keySet().iterator();

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

        @Override
        public ApplicationACLMapProto next() {
          ApplicationAccessType key = aclsIterator.next();
          return ApplicationACLMapProto.newBuilder().setAcl(
              applicationACLS.get(key)).setAccessType(
              ProtoUtils.convertToProtoFormat(key)).build();
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  this.builder.addAllApplicationACLs(values);
}