Returns True if the passed in value is a job id
424106
def is_jid(jid):
    '''
    
    '''
    if not isinstance(jid, six.string_types):
        return False
    if len(jid) != 20 and (len(jid) <= 21 or jid[20] != '_'):
        return False
    try:
        int(jid[:20])
        return True
    except ValueError:
        return False
955238
def job_status_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/job_statuses/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
754602
function _hasJob(id) {
    var job = _jobs[id] || _runningJobs[id] || _waitingJobs[id];
    return job ? __extend(job) : null;
  }
977756
def isRunning(self, serviceJobNode):
        
        return (not self.jobStore.fileExists(serviceJobNode.startJobStoreID)) and self.isActive(serviceJobNode)
977236
public boolean isSet() {
        if (isUsageMode()) {
            return true;
        }
        if (getJobFile() != null) {
            return true;
        }
        if (getListType() != null) {
            return true;
        }
        return false;
    }
1148933
@VisibleForTesting
	public boolean containsJob(JobID jobId) {
		Preconditions.checkState(JobLeaderService.State.STARTED == state, "The service is currently not running.");

		return jobLeaderServices.containsKey(jobId);
	}
130757
public static JobID forName(String str) throws IllegalArgumentException {
    return (JobID) org.apache.hadoop.mapreduce.JobID.forName(str);
  }
862282
def check_job(self, job_id):
        
        resp = self._call(endpoint='status', data={'job_id': job_id})
        map = {'id': 'job_id', 'status': 'status_code', 'type': 'type_code'}
        job_status_args = {map.get(k, k): v for k, v in resp.items()}
        return JobStatus(**job_status_args)
43787
int findIndex(final Job job) {
        int size = jobList.size();
        boolean found = false;

        int i = 0;
        for (; i < size; i++) {
            ScheduledJobEntry se = (ScheduledJobEntry) jobList.get(i);
            if (se.job == job) {
                found = true;
                break;
            }
        }
        if (found) {
            return i;
        } else {
            return -1;
        }
    }
90617
private boolean isNewId(String id) {

        if (id.contains("#")) {
            id = id.substring(0, id.indexOf("#"));
        }
        return !CmsUUID.isValidUUID(id);
    }
25481
function jobNameValidator(value) {
  const response = { isValid: true, notification: { type: 'success', msg: '', title: '' } };
  if (!value) {
    response.isValid = false;
    response.notification.type = 'error';
    response.notification.msg = 'Value must be inserted';
    response.notification.title = 'Requested Value';
  } else if (value.length < 10) {
    response.isValid = false;
    response.notification.type = 'error';
    response.notification.msg = 'Value must have 10+ characters';
    response.notification.title = 'Invalid Value';
  }
  return response;
}
1062552
public static String newTaskId(String jobId, int sequence) {
    return Id.Task.create(Id.parse(jobId).get(Id.Parts.INSTANCE_NAME), sequence).toString();
  }
983000
function _checkJobBean(obj) {
    if (!cType.isStringMapOpt(obj)) {
        logger.error("unproper job parameter (not a string map)");
        return false;
    }
    if (!obj.hasOwnProperty('cmd') && !obj.hasOwnProperty('script')) {
        logger.error("unproper job parameters (no script nor cmd)");
        return false;
    }
    if (obj.hasOwnProperty('cmd')) {
        if (!obj.cmd) {
            logger.error("unproper job parameters (undefined cmd)");
            return false;
        }
    }
    else {
        if (!obj.script) {
            logger.error("unproper job parameters (undefined script)");
            return false;
        }
    }
    return true;
}
150457
def _name_is_available(self, job_name):
        
        return (False
                if [job for job in self.jobs if job.name == job_name]
                else True)
978371
function isJobOptProxy(data) {
    if (!data.hasOwnProperty('script') && !data.hasOwnProperty('inputs'))
        return false;
    if (!isStream(data.script)) {
        logger.error("jobOptProxy script value is not a readable stream");
        logger.error(`${data.script}`);
        return false;
    }
    for (let k in data.inputs) {
        if (!isStream(data.inputs[k])) {
            logger.error(`jobOptProxy input value \"${k}\" is not a readable stream`);
            return false;
        }
    }
    return true;
}
790248
def check_status(self, job_id):
        """"""
        response, http_response = self._client.jobs.get_job(job_id=job_id).\
            result()
        if http_response.status_code == 404:
            raise HTTPNotFound('The given job ID was not found. Error: {}'.
                               format(http_response.data))
        return response
486840
public static boolean isJobDirValid(Path jobDirPath, FileSystem fs)
  throws IOException {
    FileStatus[] contents = fs.listStatus(jobDirPath);
    int matchCount = 0;
    if (contents != null && contents.length >=2) {
      for (FileStatus status : contents) {
        if ("job.xml".equals(status.getPath().getName())) {
          ++matchCount;
        }
        if ("job.split".equals(status.getPath().getName())) {
          ++matchCount;
        }
      }
      if (matchCount == 2) {
        return true;
      }
    }
    return false;
  }