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

项目:hadoop    文件:PreemptionContractPBImpl.java   
private void initPreemptionResourceRequests() {
  if (resources != null) {
    return;
  }
  PreemptionContractProtoOrBuilder p = viaProto ? proto : builder;
  List<PreemptionResourceRequestProto> list = p.getResourceList();
  resources = new ArrayList<PreemptionResourceRequest>();

  for (PreemptionResourceRequestProto rr : list) {
    resources.add(convertFromProtoFormat(rr));
  }
}
项目:hadoop    文件:PreemptionContractPBImpl.java   
private void addResourcesToProto() {
  maybeInitBuilder();
  builder.clearResource();
  if (null == resources) {
    return;
  }
  Iterable<PreemptionResourceRequestProto> iterable =
    new Iterable<PreemptionResourceRequestProto>() {
    @Override
    public Iterator<PreemptionResourceRequestProto> iterator() {
      return new Iterator<PreemptionResourceRequestProto>() {

        Iterator<PreemptionResourceRequest> iter = resources.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllResource(iterable);
}
项目:aliyun-oss-hadoop-fs    文件:PreemptionContractPBImpl.java   
private void initPreemptionResourceRequests() {
  if (resources != null) {
    return;
  }
  PreemptionContractProtoOrBuilder p = viaProto ? proto : builder;
  List<PreemptionResourceRequestProto> list = p.getResourceList();
  resources = new ArrayList<PreemptionResourceRequest>();

  for (PreemptionResourceRequestProto rr : list) {
    resources.add(convertFromProtoFormat(rr));
  }
}
项目:aliyun-oss-hadoop-fs    文件:PreemptionContractPBImpl.java   
private void addResourcesToProto() {
  maybeInitBuilder();
  builder.clearResource();
  if (null == resources) {
    return;
  }
  Iterable<PreemptionResourceRequestProto> iterable =
    new Iterable<PreemptionResourceRequestProto>() {
    @Override
    public Iterator<PreemptionResourceRequestProto> iterator() {
      return new Iterator<PreemptionResourceRequestProto>() {

        Iterator<PreemptionResourceRequest> iter = resources.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllResource(iterable);
}
项目:big-c    文件:PreemptionContractPBImpl.java   
private void initPreemptionResourceRequests() {
  if (resources != null) {
    return;
  }
  PreemptionContractProtoOrBuilder p = viaProto ? proto : builder;
  List<PreemptionResourceRequestProto> list = p.getResourceList();
  resources = new ArrayList<PreemptionResourceRequest>();

  for (PreemptionResourceRequestProto rr : list) {
    resources.add(convertFromProtoFormat(rr));
  }
}
项目:big-c    文件:PreemptionContractPBImpl.java   
private void addResourcesToProto() {
  maybeInitBuilder();
  builder.clearResource();
  if (null == resources) {
    return;
  }
  Iterable<PreemptionResourceRequestProto> iterable =
    new Iterable<PreemptionResourceRequestProto>() {
    @Override
    public Iterator<PreemptionResourceRequestProto> iterator() {
      return new Iterator<PreemptionResourceRequestProto>() {

        Iterator<PreemptionResourceRequest> iter = resources.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllResource(iterable);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PreemptionContractPBImpl.java   
private void initPreemptionResourceRequests() {
  if (resources != null) {
    return;
  }
  PreemptionContractProtoOrBuilder p = viaProto ? proto : builder;
  List<PreemptionResourceRequestProto> list = p.getResourceList();
  resources = new ArrayList<PreemptionResourceRequest>();

  for (PreemptionResourceRequestProto rr : list) {
    resources.add(convertFromProtoFormat(rr));
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PreemptionContractPBImpl.java   
private void addResourcesToProto() {
  maybeInitBuilder();
  builder.clearResource();
  if (null == resources) {
    return;
  }
  Iterable<PreemptionResourceRequestProto> iterable =
    new Iterable<PreemptionResourceRequestProto>() {
    @Override
    public Iterator<PreemptionResourceRequestProto> iterator() {
      return new Iterator<PreemptionResourceRequestProto>() {

        Iterator<PreemptionResourceRequest> iter = resources.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllResource(iterable);
}
项目:hadoop-plus    文件:PreemptionContractPBImpl.java   
private void initPreemptionResourceRequests() {
  if (resources != null) {
    return;
  }
  PreemptionContractProtoOrBuilder p = viaProto ? proto : builder;
  List<PreemptionResourceRequestProto> list = p.getResourceList();
  resources = new ArrayList<PreemptionResourceRequest>();

  for (PreemptionResourceRequestProto rr : list) {
    resources.add(convertFromProtoFormat(rr));
  }
}
项目:hadoop-plus    文件:PreemptionContractPBImpl.java   
private void addResourcesToProto() {
  maybeInitBuilder();
  builder.clearResource();
  if (null == resources) {
    return;
  }
  Iterable<PreemptionResourceRequestProto> iterable =
    new Iterable<PreemptionResourceRequestProto>() {
    @Override
    public Iterator<PreemptionResourceRequestProto> iterator() {
      return new Iterator<PreemptionResourceRequestProto>() {

        Iterator<PreemptionResourceRequest> iter = resources.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllResource(iterable);
}
项目:hops    文件:PreemptionContractPBImpl.java   
private void initPreemptionResourceRequests() {
  if (resources != null) {
    return;
  }
  PreemptionContractProtoOrBuilder p = viaProto ? proto : builder;
  List<PreemptionResourceRequestProto> list = p.getResourceList();
  resources = new ArrayList<PreemptionResourceRequest>();

  for (PreemptionResourceRequestProto rr : list) {
    resources.add(convertFromProtoFormat(rr));
  }
}
项目:hops    文件:PreemptionContractPBImpl.java   
private void addResourcesToProto() {
  maybeInitBuilder();
  builder.clearResource();
  if (null == resources) {
    return;
  }
  Iterable<PreemptionResourceRequestProto> iterable =
    new Iterable<PreemptionResourceRequestProto>() {
    @Override
    public Iterator<PreemptionResourceRequestProto> iterator() {
      return new Iterator<PreemptionResourceRequestProto>() {

        Iterator<PreemptionResourceRequest> iter = resources.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllResource(iterable);
}
项目:hadoop-TCP    文件:PreemptionContractPBImpl.java   
private void initPreemptionResourceRequests() {
  if (resources != null) {
    return;
  }
  PreemptionContractProtoOrBuilder p = viaProto ? proto : builder;
  List<PreemptionResourceRequestProto> list = p.getResourceList();
  resources = new ArrayList<PreemptionResourceRequest>();

  for (PreemptionResourceRequestProto rr : list) {
    resources.add(convertFromProtoFormat(rr));
  }
}
项目:hadoop-TCP    文件:PreemptionContractPBImpl.java   
private void addResourcesToProto() {
  maybeInitBuilder();
  builder.clearResource();
  if (null == resources) {
    return;
  }
  Iterable<PreemptionResourceRequestProto> iterable =
    new Iterable<PreemptionResourceRequestProto>() {
    @Override
    public Iterator<PreemptionResourceRequestProto> iterator() {
      return new Iterator<PreemptionResourceRequestProto>() {

        Iterator<PreemptionResourceRequest> iter = resources.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllResource(iterable);
}
项目:hardfs    文件:PreemptionContractPBImpl.java   
private void initPreemptionResourceRequests() {
  if (resources != null) {
    return;
  }
  PreemptionContractProtoOrBuilder p = viaProto ? proto : builder;
  List<PreemptionResourceRequestProto> list = p.getResourceList();
  resources = new ArrayList<PreemptionResourceRequest>();

  for (PreemptionResourceRequestProto rr : list) {
    resources.add(convertFromProtoFormat(rr));
  }
}
项目:hardfs    文件:PreemptionContractPBImpl.java   
private void addResourcesToProto() {
  maybeInitBuilder();
  builder.clearResource();
  if (null == resources) {
    return;
  }
  Iterable<PreemptionResourceRequestProto> iterable =
    new Iterable<PreemptionResourceRequestProto>() {
    @Override
    public Iterator<PreemptionResourceRequestProto> iterator() {
      return new Iterator<PreemptionResourceRequestProto>() {

        Iterator<PreemptionResourceRequest> iter = resources.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllResource(iterable);
}
项目:hadoop-on-lustre2    文件:PreemptionContractPBImpl.java   
private void initPreemptionResourceRequests() {
  if (resources != null) {
    return;
  }
  PreemptionContractProtoOrBuilder p = viaProto ? proto : builder;
  List<PreemptionResourceRequestProto> list = p.getResourceList();
  resources = new ArrayList<PreemptionResourceRequest>();

  for (PreemptionResourceRequestProto rr : list) {
    resources.add(convertFromProtoFormat(rr));
  }
}
项目:hadoop-on-lustre2    文件:PreemptionContractPBImpl.java   
private void addResourcesToProto() {
  maybeInitBuilder();
  builder.clearResource();
  if (null == resources) {
    return;
  }
  Iterable<PreemptionResourceRequestProto> iterable =
    new Iterable<PreemptionResourceRequestProto>() {
    @Override
    public Iterator<PreemptionResourceRequestProto> iterator() {
      return new Iterator<PreemptionResourceRequestProto>() {

        Iterator<PreemptionResourceRequest> iter = resources.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllResource(iterable);
}
项目:hadoop    文件:PreemptionResourceRequestPBImpl.java   
public PreemptionResourceRequestPBImpl() {
  builder = PreemptionResourceRequestProto.newBuilder();
}
项目:hadoop    文件:PreemptionResourceRequestPBImpl.java   
public PreemptionResourceRequestPBImpl(PreemptionResourceRequestProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:hadoop    文件:PreemptionResourceRequestPBImpl.java   
public synchronized PreemptionResourceRequestProto getProto() {
  mergeLocalToProto();
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
项目:hadoop    文件:PreemptionResourceRequestPBImpl.java   
private void maybeInitBuilder() {
  if (viaProto || builder == null) {
    builder = PreemptionResourceRequestProto.newBuilder(proto);
  }
  viaProto = false;
}
项目:hadoop    文件:PreemptionContractPBImpl.java   
private PreemptionResourceRequestPBImpl convertFromProtoFormat(PreemptionResourceRequestProto p) {
  return new PreemptionResourceRequestPBImpl(p);
}
项目:hadoop    文件:PreemptionContractPBImpl.java   
private PreemptionResourceRequestProto convertToProtoFormat(PreemptionResourceRequest t) {
  return ((PreemptionResourceRequestPBImpl)t).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:PreemptionResourceRequestPBImpl.java   
public PreemptionResourceRequestPBImpl() {
  builder = PreemptionResourceRequestProto.newBuilder();
}
项目:aliyun-oss-hadoop-fs    文件:PreemptionResourceRequestPBImpl.java   
public PreemptionResourceRequestPBImpl(PreemptionResourceRequestProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:aliyun-oss-hadoop-fs    文件:PreemptionResourceRequestPBImpl.java   
public synchronized PreemptionResourceRequestProto getProto() {
  mergeLocalToProto();
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
项目:aliyun-oss-hadoop-fs    文件:PreemptionResourceRequestPBImpl.java   
private void maybeInitBuilder() {
  if (viaProto || builder == null) {
    builder = PreemptionResourceRequestProto.newBuilder(proto);
  }
  viaProto = false;
}
项目:aliyun-oss-hadoop-fs    文件:PreemptionContractPBImpl.java   
private PreemptionResourceRequestPBImpl convertFromProtoFormat(PreemptionResourceRequestProto p) {
  return new PreemptionResourceRequestPBImpl(p);
}
项目:aliyun-oss-hadoop-fs    文件:PreemptionContractPBImpl.java   
private PreemptionResourceRequestProto convertToProtoFormat(PreemptionResourceRequest t) {
  return ((PreemptionResourceRequestPBImpl)t).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:TestPBImplRecords.java   
@Test
public void testPreemptionResourceRequestPBImpl() throws Exception {
  validatePBImplRecord(PreemptionResourceRequestPBImpl.class,
      PreemptionResourceRequestProto.class);
}
项目:big-c    文件:PreemptionResourceRequestPBImpl.java   
public PreemptionResourceRequestPBImpl() {
  builder = PreemptionResourceRequestProto.newBuilder();
}
项目:big-c    文件:PreemptionResourceRequestPBImpl.java   
public PreemptionResourceRequestPBImpl(PreemptionResourceRequestProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:big-c    文件:PreemptionResourceRequestPBImpl.java   
public synchronized PreemptionResourceRequestProto getProto() {
  mergeLocalToProto();
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
项目:big-c    文件:PreemptionResourceRequestPBImpl.java   
private void maybeInitBuilder() {
  if (viaProto || builder == null) {
    builder = PreemptionResourceRequestProto.newBuilder(proto);
  }
  viaProto = false;
}
项目:big-c    文件:PreemptionContractPBImpl.java   
private PreemptionResourceRequestPBImpl convertFromProtoFormat(PreemptionResourceRequestProto p) {
  return new PreemptionResourceRequestPBImpl(p);
}
项目:big-c    文件:PreemptionContractPBImpl.java   
private PreemptionResourceRequestProto convertToProtoFormat(PreemptionResourceRequest t) {
  return ((PreemptionResourceRequestPBImpl)t).getProto();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PreemptionResourceRequestPBImpl.java   
public PreemptionResourceRequestPBImpl() {
  builder = PreemptionResourceRequestProto.newBuilder();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PreemptionResourceRequestPBImpl.java   
public PreemptionResourceRequestPBImpl(PreemptionResourceRequestProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PreemptionResourceRequestPBImpl.java   
public synchronized PreemptionResourceRequestProto getProto() {
  mergeLocalToProto();
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}