@Test(expected=ProcessingException.class) public void testGetJobIdFromIncorrectPath() { final String JOB_HISTORY_FILE_NAME = "abcd.jhist"; File jobHistoryfile = new File(JOB_HISTORY_FILE_NAME); Path srcPath = new Path(jobHistoryfile.toURI()); FileLister.getJobIdFromPath(srcPath); }
static String getJobIdFromPath(Path aPath) { String fileName = aPath.getName(); JobFile jf = new JobFile(fileName); String jobId = jf.getJobid(); if(jobId == null) { throw new ProcessingException("job id is null for " + aPath.toUri()); } return jobId; }
FileLister { static String getJobIdFromPath(Path aPath) { String fileName = aPath.getName(); JobFile jf = new JobFile(fileName); String jobId = jf.getJobid(); if(jobId == null) { throw new ProcessingException("job id is null for " + aPath.toUri()); } return jobId; } }
FileLister { static String getJobIdFromPath(Path aPath) { String fileName = aPath.getName(); JobFile jf = new JobFile(fileName); String jobId = jf.getJobid(); if(jobId == null) { throw new ProcessingException("job id is null for " + aPath.toUri()); } return jobId; } FileLister(); }
FileLister { static String getJobIdFromPath(Path aPath) { String fileName = aPath.getName(); JobFile jf = new JobFile(fileName); String jobId = jf.getJobid(); if(jobId == null) { throw new ProcessingException("job id is null for " + aPath.toUri()); } return jobId; } FileLister(); static FileStatus[] listFiles(boolean recurse, FileSystem hdfs, Path inputPath,
      JobFileModifiedRangePathFilter jobFileModifiedRangePathFilter); static FileStatus[] getListFilesToProcess(long maxFileSize, boolean recurse,
      FileSystem hdfs, Path inputPath, JobFileModifiedRangePathFilter pathFilter); }
FileLister { static String getJobIdFromPath(Path aPath) { String fileName = aPath.getName(); JobFile jf = new JobFile(fileName); String jobId = jf.getJobid(); if(jobId == null) { throw new ProcessingException("job id is null for " + aPath.toUri()); } return jobId; } FileLister(); static FileStatus[] listFiles(boolean recurse, FileSystem hdfs, Path inputPath,
      JobFileModifiedRangePathFilter jobFileModifiedRangePathFilter); static FileStatus[] getListFilesToProcess(long maxFileSize, boolean recurse,
      FileSystem hdfs, Path inputPath, JobFileModifiedRangePathFilter pathFilter);  }