@Test public void testLogFileToStartTime() { for (Object[] inputOuput : testLogFileNames) { String input = (String)inputOuput[0]; long expected = (Long)inputOuput[1]; long found = PigJobDescFactory.getScriptStartTimeFromLogfileName(input); assertEquals("Unexpected result found when parsing logFileName=" + input, expected, found); } }
public static long getScriptStartTimeFromLogfileName(String pigLogfile) { long pigSubmitTimeMillis = 0; if (pigLogfile == null) { return pigSubmitTimeMillis; } Matcher matcher = pigLogfilePattern.matcher(pigLogfile); if (matcher.matches()) { String submitTimeMillisString = matcher.group(1); pigSubmitTimeMillis = Long.parseLong(submitTimeMillisString); } return pigSubmitTimeMillis; }
PigJobDescFactory extends JobDescFactoryBase { public static long getScriptStartTimeFromLogfileName(String pigLogfile) { long pigSubmitTimeMillis = 0; if (pigLogfile == null) { return pigSubmitTimeMillis; } Matcher matcher = pigLogfilePattern.matcher(pigLogfile); if (matcher.matches()) { String submitTimeMillisString = matcher.group(1); pigSubmitTimeMillis = Long.parseLong(submitTimeMillisString); } return pigSubmitTimeMillis; } }
PigJobDescFactory extends JobDescFactoryBase { public static long getScriptStartTimeFromLogfileName(String pigLogfile) { long pigSubmitTimeMillis = 0; if (pigLogfile == null) { return pigSubmitTimeMillis; } Matcher matcher = pigLogfilePattern.matcher(pigLogfile); if (matcher.matches()) { String submitTimeMillisString = matcher.group(1); pigSubmitTimeMillis = Long.parseLong(submitTimeMillisString); } return pigSubmitTimeMillis; }  }
PigJobDescFactory extends JobDescFactoryBase { public static long getScriptStartTimeFromLogfileName(String pigLogfile) { long pigSubmitTimeMillis = 0; if (pigLogfile == null) { return pigSubmitTimeMillis; } Matcher matcher = pigLogfilePattern.matcher(pigLogfile); if (matcher.matches()) { String submitTimeMillisString = matcher.group(1); pigSubmitTimeMillis = Long.parseLong(submitTimeMillisString); } return pigSubmitTimeMillis; }  @Override JobDesc create(QualifiedJobId qualifiedJobId, long submitTimeMillis,
      Configuration jobConf); static long getScriptStartTimeFromLogfileName(String pigLogfile); }
PigJobDescFactory extends JobDescFactoryBase { public static long getScriptStartTimeFromLogfileName(String pigLogfile) { long pigSubmitTimeMillis = 0; if (pigLogfile == null) { return pigSubmitTimeMillis; } Matcher matcher = pigLogfilePattern.matcher(pigLogfile); if (matcher.matches()) { String submitTimeMillisString = matcher.group(1); pigSubmitTimeMillis = Long.parseLong(submitTimeMillisString); } return pigSubmitTimeMillis; }  @Override JobDesc create(QualifiedJobId qualifiedJobId, long submitTimeMillis,
      Configuration jobConf); static long getScriptStartTimeFromLogfileName(String pigLogfile); static final String SCHEDULED_PREFIX; }