@Test public void assertgetPidFromFile() { long pid = ScriptPidUtils.getFirstPidFromFile(executorName, jobName, "" + 1); assertThat(pid).isEqualTo(101); }
public static long getFirstPidFromFile(String executorName, String jobName, String jobItem) { List<Long> pids = getPidsFromFile(executorName, jobName, jobItem); if (pids.isEmpty()) { return UNKNOWN_PID; } return pids.get(0); }
ScriptPidUtils { public static long getFirstPidFromFile(String executorName, String jobName, String jobItem) { List<Long> pids = getPidsFromFile(executorName, jobName, jobItem); if (pids.isEmpty()) { return UNKNOWN_PID; } return pids.get(0); } }
ScriptPidUtils { public static long getFirstPidFromFile(String executorName, String jobName, String jobItem) { List<Long> pids = getPidsFromFile(executorName, jobName, jobItem); if (pids.isEmpty()) { return UNKNOWN_PID; } return pids.get(0); }  }
ScriptPidUtils { public static long getFirstPidFromFile(String executorName, String jobName, String jobItem) { List<Long> pids = getPidsFromFile(executorName, jobName, jobItem); if (pids.isEmpty()) { return UNKNOWN_PID; } return pids.get(0); }  static File getSaturnExecutingHome(); static void writePidToFile(String executorName, String jobName, int jobItem, long pid); @Deprecated static long _getPidFromFile(String executorName, String jobName, String jobItem); static long getFirstPidFromFile(String executorName, String jobName, String jobItem); static List<Long> getPidsFromFile(String executorName, String jobName, String jobItem); static String[] getItemsPaths(String executorName, String jobName); static boolean removeAllPidFile(String executorName, String jobName, String jobItem); static boolean removePidFile(String executorName, String jobName, String jobItem, long pid); static boolean removeAllPidFile(String executorName, String jobName, int jobItem); static void killAllChildrenByPid(long pid, boolean force); static String exeWholeCmd(String cmd); static String exeCmdWithoutPipe(CommandLine cmdLine, ByteArrayInputStream input, Map<String, String> env); static void checkAllExistJobs(final CoordinatorRegistryCenter regCenter); static void forceStopRunningShellJob(final String executorName, final String jobName); static void checkOneExistJob(final CoordinatorRegistryCenter regCenter, final String jobName); static boolean isPidRunning(long pid); static boolean isPidRunning(String pid); static Map<String, String> parseString2Map(String source); static Map<String, String> loadEnv(); static String filterEnvInCmdStr(Map<String, String> env, String cmd); }
ScriptPidUtils { public static long getFirstPidFromFile(String executorName, String jobName, String jobItem) { List<Long> pids = getPidsFromFile(executorName, jobName, jobItem); if (pids.isEmpty()) { return UNKNOWN_PID; } return pids.get(0); }  static File getSaturnExecutingHome(); static void writePidToFile(String executorName, String jobName, int jobItem, long pid); @Deprecated static long _getPidFromFile(String executorName, String jobName, String jobItem); static long getFirstPidFromFile(String executorName, String jobName, String jobItem); static List<Long> getPidsFromFile(String executorName, String jobName, String jobItem); static String[] getItemsPaths(String executorName, String jobName); static boolean removeAllPidFile(String executorName, String jobName, String jobItem); static boolean removePidFile(String executorName, String jobName, String jobItem, long pid); static boolean removeAllPidFile(String executorName, String jobName, int jobItem); static void killAllChildrenByPid(long pid, boolean force); static String exeWholeCmd(String cmd); static String exeCmdWithoutPipe(CommandLine cmdLine, ByteArrayInputStream input, Map<String, String> env); static void checkAllExistJobs(final CoordinatorRegistryCenter regCenter); static void forceStopRunningShellJob(final String executorName, final String jobName); static void checkOneExistJob(final CoordinatorRegistryCenter regCenter, final String jobName); static boolean isPidRunning(long pid); static boolean isPidRunning(String pid); static Map<String, String> parseString2Map(String source); static Map<String, String> loadEnv(); static String filterEnvInCmdStr(Map<String, String> env, String cmd); static final long UNKNOWN_PID; static final String EXECUTINGPATH; static final String OUTPUT_PATH; static final String EXECUTINGJOBPATH; static final String JOBITEMPIDSPATH; static final String JOBITEMPATH; static final String JOBITEMPIDPATH2; static final String JOBITEMOUTPUTPATH; }