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

项目:hadoop    文件:AllocateRequestPBImpl.java   
private void initAsks() {
  if (this.ask != null) {
    return;
  }
  AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ResourceRequestProto> list = p.getAskList();
  this.ask = new ArrayList<ResourceRequest>();

  for (ResourceRequestProto c : list) {
    this.ask.add(convertFromProtoFormat(c));
  }
}
项目:hadoop    文件:AllocateRequestPBImpl.java   
private void addAsksToProto() {
  maybeInitBuilder();
  builder.clearAsk();
  if (ask == null)
    return;
  Iterable<ResourceRequestProto> iterable = new Iterable<ResourceRequestProto>() {
    @Override
    public Iterator<ResourceRequestProto> iterator() {
      return new Iterator<ResourceRequestProto>() {

        Iterator<ResourceRequest> iter = ask.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllAsk(iterable);
}
项目:aliyun-oss-hadoop-fs    文件:AllocateRequestPBImpl.java   
private void initAsks() {
  if (this.ask != null) {
    return;
  }
  AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ResourceRequestProto> list = p.getAskList();
  this.ask = new ArrayList<ResourceRequest>();

  for (ResourceRequestProto c : list) {
    this.ask.add(convertFromProtoFormat(c));
  }
}
项目:aliyun-oss-hadoop-fs    文件:AllocateRequestPBImpl.java   
private void addAsksToProto() {
  maybeInitBuilder();
  builder.clearAsk();
  if (ask == null)
    return;
  Iterable<ResourceRequestProto> iterable = new Iterable<ResourceRequestProto>() {
    @Override
    public Iterator<ResourceRequestProto> iterator() {
      return new Iterator<ResourceRequestProto>() {

        Iterator<ResourceRequest> iter = ask.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllAsk(iterable);
}
项目:big-c    文件:AllocateRequestPBImpl.java   
private void initAsks() {
  if (this.ask != null) {
    return;
  }
  AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ResourceRequestProto> list = p.getAskList();
  this.ask = new ArrayList<ResourceRequest>();

  for (ResourceRequestProto c : list) {
    this.ask.add(convertFromProtoFormat(c));
  }
}
项目:big-c    文件:AllocateRequestPBImpl.java   
private void addAsksToProto() {
  maybeInitBuilder();
  builder.clearAsk();
  if (ask == null)
    return;
  Iterable<ResourceRequestProto> iterable = new Iterable<ResourceRequestProto>() {
    @Override
    public Iterator<ResourceRequestProto> iterator() {
      return new Iterator<ResourceRequestProto>() {

        Iterator<ResourceRequest> iter = ask.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllAsk(iterable);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:AllocateRequestPBImpl.java   
private void initAsks() {
  if (this.ask != null) {
    return;
  }
  AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ResourceRequestProto> list = p.getAskList();
  this.ask = new ArrayList<ResourceRequest>();

  for (ResourceRequestProto c : list) {
    this.ask.add(convertFromProtoFormat(c));
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:AllocateRequestPBImpl.java   
private void addAsksToProto() {
  maybeInitBuilder();
  builder.clearAsk();
  if (ask == null)
    return;
  Iterable<ResourceRequestProto> iterable = new Iterable<ResourceRequestProto>() {
    @Override
    public Iterator<ResourceRequestProto> iterator() {
      return new Iterator<ResourceRequestProto>() {

        Iterator<ResourceRequest> iter = ask.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllAsk(iterable);
}
项目:hadoop-plus    文件:AllocateRequestPBImpl.java   
private void initAsks() {
  if (this.ask != null) {
    return;
  }
  AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ResourceRequestProto> list = p.getAskList();
  this.ask = new ArrayList<ResourceRequest>();

  for (ResourceRequestProto c : list) {
    this.ask.add(convertFromProtoFormat(c));
  }
}
项目:hadoop-plus    文件:AllocateRequestPBImpl.java   
private void addAsksToProto() {
  maybeInitBuilder();
  builder.clearAsk();
  if (ask == null)
    return;
  Iterable<ResourceRequestProto> iterable = new Iterable<ResourceRequestProto>() {
    @Override
    public Iterator<ResourceRequestProto> iterator() {
      return new Iterator<ResourceRequestProto>() {

        Iterator<ResourceRequest> iter = ask.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllAsk(iterable);
}
项目:hops    文件:AllocateRequestPBImpl.java   
private void initAsks() {
  if (this.ask != null) {
    return;
  }
  AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ResourceRequestProto> list = p.getAskList();
  this.ask = new ArrayList<ResourceRequest>();

  for (ResourceRequestProto c : list) {
    this.ask.add(convertFromProtoFormat(c));
  }
}
项目:hops    文件:AllocateRequestPBImpl.java   
private void addAsksToProto() {
  maybeInitBuilder();
  builder.clearAsk();
  if (ask == null)
    return;
  Iterable<ResourceRequestProto> iterable =
      new Iterable<ResourceRequestProto>() {
    @Override
    public Iterator<ResourceRequestProto> iterator() {
      return new Iterator<ResourceRequestProto>() {

        Iterator<ResourceRequest> iter = ask.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllAsk(iterable);
}
项目:hadoop-TCP    文件:AllocateRequestPBImpl.java   
private void initAsks() {
  if (this.ask != null) {
    return;
  }
  AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ResourceRequestProto> list = p.getAskList();
  this.ask = new ArrayList<ResourceRequest>();

  for (ResourceRequestProto c : list) {
    this.ask.add(convertFromProtoFormat(c));
  }
}
项目:hadoop-TCP    文件:AllocateRequestPBImpl.java   
private void addAsksToProto() {
  maybeInitBuilder();
  builder.clearAsk();
  if (ask == null)
    return;
  Iterable<ResourceRequestProto> iterable = new Iterable<ResourceRequestProto>() {
    @Override
    public Iterator<ResourceRequestProto> iterator() {
      return new Iterator<ResourceRequestProto>() {

        Iterator<ResourceRequest> iter = ask.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllAsk(iterable);
}
项目:hardfs    文件:AllocateRequestPBImpl.java   
private void initAsks() {
  if (this.ask != null) {
    return;
  }
  AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ResourceRequestProto> list = p.getAskList();
  this.ask = new ArrayList<ResourceRequest>();

  for (ResourceRequestProto c : list) {
    this.ask.add(convertFromProtoFormat(c));
  }
}
项目:hardfs    文件:AllocateRequestPBImpl.java   
private void addAsksToProto() {
  maybeInitBuilder();
  builder.clearAsk();
  if (ask == null)
    return;
  Iterable<ResourceRequestProto> iterable = new Iterable<ResourceRequestProto>() {
    @Override
    public Iterator<ResourceRequestProto> iterator() {
      return new Iterator<ResourceRequestProto>() {

        Iterator<ResourceRequest> iter = ask.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllAsk(iterable);
}
项目:hadoop-on-lustre2    文件:AllocateRequestPBImpl.java   
private void initAsks() {
  if (this.ask != null) {
    return;
  }
  AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ResourceRequestProto> list = p.getAskList();
  this.ask = new ArrayList<ResourceRequest>();

  for (ResourceRequestProto c : list) {
    this.ask.add(convertFromProtoFormat(c));
  }
}
项目:hadoop-on-lustre2    文件:AllocateRequestPBImpl.java   
private void addAsksToProto() {
  maybeInitBuilder();
  builder.clearAsk();
  if (ask == null)
    return;
  Iterable<ResourceRequestProto> iterable = new Iterable<ResourceRequestProto>() {
    @Override
    public Iterator<ResourceRequestProto> iterator() {
      return new Iterator<ResourceRequestProto>() {

        Iterator<ResourceRequest> iter = ask.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllAsk(iterable);
}
项目:hadoop    文件:AllocateRequestPBImpl.java   
private ResourceRequestPBImpl convertFromProtoFormat(ResourceRequestProto p) {
  return new ResourceRequestPBImpl(p);
}
项目:hadoop    文件:AllocateRequestPBImpl.java   
private ResourceRequestProto convertToProtoFormat(ResourceRequest t) {
  return ((ResourceRequestPBImpl)t).getProto();
}
项目:hadoop    文件:PreemptionResourceRequestPBImpl.java   
private ResourceRequestPBImpl convertFromProtoFormat(ResourceRequestProto p) {
  return new ResourceRequestPBImpl(p);
}
项目:hadoop    文件:PreemptionResourceRequestPBImpl.java   
private ResourceRequestProto convertToProtoFormat(ResourceRequest t) {
  return ((ResourceRequestPBImpl)t).getProto();
}
项目:hadoop    文件:ResourceRequestPBImpl.java   
public ResourceRequestPBImpl() {
  builder = ResourceRequestProto.newBuilder();
}
项目:hadoop    文件:ResourceRequestPBImpl.java   
public ResourceRequestPBImpl(ResourceRequestProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:hadoop    文件:ResourceRequestPBImpl.java   
public ResourceRequestProto getProto() {
    mergeLocalToProto();
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
项目:hadoop    文件:ResourceRequestPBImpl.java   
private void maybeInitBuilder() {
  if (viaProto || builder == null) {
    builder = ResourceRequestProto.newBuilder(proto);
  }
  viaProto = false;
}
项目:hadoop    文件:ApplicationSubmissionContextPBImpl.java   
private ResourceRequestPBImpl convertFromProtoFormat(ResourceRequestProto p) {
  return new ResourceRequestPBImpl(p);
}
项目:hadoop    文件:ApplicationSubmissionContextPBImpl.java   
private ResourceRequestProto convertToProtoFormat(ResourceRequest t) {
  return ((ResourceRequestPBImpl)t).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:AllocateRequestPBImpl.java   
private ResourceRequestPBImpl convertFromProtoFormat(ResourceRequestProto p) {
  return new ResourceRequestPBImpl(p);
}
项目:aliyun-oss-hadoop-fs    文件:AllocateRequestPBImpl.java   
private ResourceRequestProto convertToProtoFormat(ResourceRequest t) {
  return ((ResourceRequestPBImpl)t).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:PreemptionResourceRequestPBImpl.java   
private ResourceRequestPBImpl convertFromProtoFormat(ResourceRequestProto p) {
  return new ResourceRequestPBImpl(p);
}
项目:aliyun-oss-hadoop-fs    文件:PreemptionResourceRequestPBImpl.java   
private ResourceRequestProto convertToProtoFormat(ResourceRequest t) {
  return ((ResourceRequestPBImpl)t).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:ResourceRequestPBImpl.java   
public ResourceRequestPBImpl() {
  builder = ResourceRequestProto.newBuilder();
}
项目:aliyun-oss-hadoop-fs    文件:ResourceRequestPBImpl.java   
public ResourceRequestPBImpl(ResourceRequestProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:aliyun-oss-hadoop-fs    文件:ResourceRequestPBImpl.java   
public ResourceRequestProto getProto() {
    mergeLocalToProto();
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
项目:aliyun-oss-hadoop-fs    文件:ResourceRequestPBImpl.java   
private void maybeInitBuilder() {
  if (viaProto || builder == null) {
    builder = ResourceRequestProto.newBuilder(proto);
  }
  viaProto = false;
}
项目:aliyun-oss-hadoop-fs    文件:ApplicationSubmissionContextPBImpl.java   
private ResourceRequestPBImpl convertFromProtoFormat(ResourceRequestProto p) {
  return new ResourceRequestPBImpl(p);
}
项目:aliyun-oss-hadoop-fs    文件:ApplicationSubmissionContextPBImpl.java   
private ResourceRequestProto convertToProtoFormat(ResourceRequest t) {
  return ((ResourceRequestPBImpl)t).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:TestPBImplRecords.java   
@Test
public void testResourceRequestPBImpl() throws Exception {
  validatePBImplRecord(ResourceRequestPBImpl.class, ResourceRequestProto.class);
}
项目:big-c    文件:AllocateRequestPBImpl.java   
private ResourceRequestPBImpl convertFromProtoFormat(ResourceRequestProto p) {
  return new ResourceRequestPBImpl(p);
}