org.apache.hadoop.yarn.proto.YarnProtos.ApplicationIdProto Java Examples

The following examples show how to use org.apache.hadoop.yarn.proto.YarnProtos.ApplicationIdProto. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NodeStatusPBImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private synchronized void initKeepAliveApplications() {
  if (this.keepAliveApplications != null) {
    return;
  }
  NodeStatusProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationIdProto> list = p.getKeepAliveApplicationsList();
  this.keepAliveApplications = new ArrayList<ApplicationId>();

  for (ApplicationIdProto c : list) {
    this.keepAliveApplications.add(convertFromProtoFormat(c));
  }
  
}
 
Example #2
Source File: NodeHeartbeatResponsePBImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private void addApplicationsToCleanupToProto() {
  maybeInitBuilder();
  builder.clearApplicationsToCleanup();
  if (applicationsToCleanup == null)
    return;
  Iterable<ApplicationIdProto> iterable = new Iterable<ApplicationIdProto>() {

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

        Iterator<ApplicationId> iter = applicationsToCleanup.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllApplicationsToCleanup(iterable);
}
 
Example #3
Source File: NodeHeartbeatResponsePBImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private void initApplicationsToCleanup() {
  if (this.applicationsToCleanup != null) {
    return;
  }
  NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationIdProto> list = p.getApplicationsToCleanupList();
  this.applicationsToCleanup = new ArrayList<ApplicationId>();

  for (ApplicationIdProto c : list) {
    this.applicationsToCleanup.add(convertFromProtoFormat(c));
  }
}
 
Example #4
Source File: RegisterNodeManagerRequestPBImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private void initRunningApplications() {
  if (this.runningApplications != null) {
    return;
  }
  RegisterNodeManagerRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationIdProto> list = p.getRunningApplicationsList();
  this.runningApplications = new ArrayList<ApplicationId>();
  for (ApplicationIdProto c : list) {
    this.runningApplications.add(convertFromProtoFormat(c));
  }
}
 
Example #5
Source File: RegisterNodeManagerRequestPBImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private void addRunningApplicationsToProto() {
  maybeInitBuilder();
  builder.clearRunningApplications();
  if (runningApplications == null) {
    return;
  }
  Iterable<ApplicationIdProto> it = new Iterable<ApplicationIdProto>() {
    
    @Override
    public Iterator<ApplicationIdProto> iterator() {
      return new Iterator<ApplicationIdProto>() {
        Iterator<ApplicationId> iter = runningApplications.iterator();
        
        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }
        
        @Override
        public ApplicationIdProto next() {
          return convertToProtoFormat(iter.next());  
        }
        
        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  builder.addAllRunningApplications(it);
}
 
Example #6
Source File: NodeStatusPBImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private synchronized void addKeepAliveApplicationsToProto() {
  maybeInitBuilder();
  builder.clearKeepAliveApplications();
  if (keepAliveApplications == null)
    return;
  Iterable<ApplicationIdProto> iterable = new Iterable<ApplicationIdProto>() {
    @Override
    public Iterator<ApplicationIdProto> iterator() {
      return new Iterator<ApplicationIdProto>() {

        Iterator<ApplicationId> iter = keepAliveApplications.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllKeepAliveApplications(iterable);
}
 
Example #7
Source File: NodeHeartbeatResponsePBImpl.java    From big-c with Apache License 2.0 5 votes vote down vote up
private void initApplicationsToCleanup() {
  if (this.applicationsToCleanup != null) {
    return;
  }
  NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationIdProto> list = p.getApplicationsToCleanupList();
  this.applicationsToCleanup = new ArrayList<ApplicationId>();

  for (ApplicationIdProto c : list) {
    this.applicationsToCleanup.add(convertFromProtoFormat(c));
  }
}
 
Example #8
Source File: NodeHeartbeatResponsePBImpl.java    From big-c with Apache License 2.0 5 votes vote down vote up
private void addApplicationsToCleanupToProto() {
  maybeInitBuilder();
  builder.clearApplicationsToCleanup();
  if (applicationsToCleanup == null)
    return;
  Iterable<ApplicationIdProto> iterable = new Iterable<ApplicationIdProto>() {

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

        Iterator<ApplicationId> iter = applicationsToCleanup.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllApplicationsToCleanup(iterable);
}
 
Example #9
Source File: RegisterNodeManagerRequestPBImpl.java    From big-c with Apache License 2.0 5 votes vote down vote up
private void initRunningApplications() {
  if (this.runningApplications != null) {
    return;
  }
  RegisterNodeManagerRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ApplicationIdProto> list = p.getRunningApplicationsList();
  this.runningApplications = new ArrayList<ApplicationId>();
  for (ApplicationIdProto c : list) {
    this.runningApplications.add(convertFromProtoFormat(c));
  }
}
 
Example #10
Source File: RegisterNodeManagerRequestPBImpl.java    From big-c with Apache License 2.0 5 votes vote down vote up
private void addRunningApplicationsToProto() {
  maybeInitBuilder();
  builder.clearRunningApplications();
  if (runningApplications == null) {
    return;
  }
  Iterable<ApplicationIdProto> it = new Iterable<ApplicationIdProto>() {
    
    @Override
    public Iterator<ApplicationIdProto> iterator() {
      return new Iterator<ApplicationIdProto>() {
        Iterator<ApplicationId> iter = runningApplications.iterator();
        
        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }
        
        @Override
        public ApplicationIdProto next() {
          return convertToProtoFormat(iter.next());  
        }
        
        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  builder.addAllRunningApplications(it);
}
 
Example #11
Source File: NodeStatusPBImpl.java    From big-c with Apache License 2.0 5 votes vote down vote up
private synchronized void addKeepAliveApplicationsToProto() {
  maybeInitBuilder();
  builder.clearKeepAliveApplications();
  if (keepAliveApplications == null)
    return;
  Iterable<ApplicationIdProto> iterable = new Iterable<ApplicationIdProto>() {
    @Override
    public Iterator<ApplicationIdProto> iterator() {
      return new Iterator<ApplicationIdProto>() {

        Iterator<ApplicationId> iter = keepAliveApplications.iterator();

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

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

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

        }
      };

    }
  };
  builder.addAllKeepAliveApplications(iterable);
}
 
Example #12
Source File: RegisterNodeManagerRequestPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdPBImpl convertFromProtoFormat(ApplicationIdProto p) {
  return new ApplicationIdPBImpl(p);
}
 
Example #13
Source File: ReleaseSharedCacheResourceRequestPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdPBImpl convertFromProtoFormat(ApplicationIdProto p) {
  return new ApplicationIdPBImpl(p);
}
 
Example #14
Source File: ApplicationStartDataPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdPBImpl convertFromProtoFormat(
    ApplicationIdProto applicationId) {
  return new ApplicationIdPBImpl(applicationId);
}
 
Example #15
Source File: ApplicationStartDataPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdProto convertToProtoFormat(ApplicationId applicationId) {
  return ((ApplicationIdPBImpl) applicationId).getProto();
}
 
Example #16
Source File: KillApplicationRequestPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdPBImpl convertFromProtoFormat(ApplicationIdProto p) {
  return new ApplicationIdPBImpl(p);
}
 
Example #17
Source File: UseSharedCacheResourceRequestPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdProto convertToProtoFormat(ApplicationId t) {
  return ((ApplicationIdPBImpl) t).getProto();
}
 
Example #18
Source File: NodeHeartbeatResponsePBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdPBImpl convertFromProtoFormat(ApplicationIdProto p) {
  return new ApplicationIdPBImpl(p);
}
 
Example #19
Source File: NodeHeartbeatResponsePBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdProto convertToProtoFormat(ApplicationId t) {
  return ((ApplicationIdPBImpl) t).getProto();
}
 
Example #20
Source File: JobIdPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdProto convertToProtoFormat(ApplicationId t) {
  return ((ApplicationIdPBImpl) t).getProto();
}
 
Example #21
Source File: UseSharedCacheResourceRequestPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdPBImpl convertFromProtoFormat(ApplicationIdProto p) {
  return new ApplicationIdPBImpl(p);
}
 
Example #22
Source File: ReleaseSharedCacheResourceRequestPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdProto convertToProtoFormat(ApplicationId t) {
  return ((ApplicationIdPBImpl) t).getProto();
}
 
Example #23
Source File: ApplicationIdPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
public ApplicationIdPBImpl() {
  builder = ApplicationIdProto.newBuilder();
}
 
Example #24
Source File: GetNewApplicationResponsePBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdProto convertToProtoFormat(ApplicationId t) {
  return ((ApplicationIdPBImpl)t).getProto();
}
 
Example #25
Source File: GetNewApplicationResponsePBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdPBImpl convertFromProtoFormat(ApplicationIdProto p) {
  return new ApplicationIdPBImpl(p);
}
 
Example #26
Source File: MoveApplicationAcrossQueuesRequestPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdProto convertToProtoFormat(ApplicationId t) {
  return ((ApplicationIdPBImpl)t).getProto();
}
 
Example #27
Source File: MoveApplicationAcrossQueuesRequestPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdPBImpl convertFromProtoFormat(ApplicationIdProto p) {
  return new ApplicationIdPBImpl(p);
}
 
Example #28
Source File: GetApplicationReportRequestPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdProto convertToProtoFormat(ApplicationId t) {
  return ((ApplicationIdPBImpl)t).getProto();
}
 
Example #29
Source File: GetApplicationReportRequestPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ApplicationIdPBImpl convertFromProtoFormat(ApplicationIdProto p) {
  return new ApplicationIdPBImpl(p);
}
 
Example #30
Source File: JobIdPBImpl.java    From hadoop with Apache License 2.0 4 votes vote down vote up
private ApplicationIdProto convertToProtoFormat(ApplicationId t) {
  return ((ApplicationIdPBImpl) t).getProto();
}