private void closeFile() { try { this.file.close(); } catch (IOException e) { YSLOG.warn(e, "W41002", label, path); } }
private void deleteFile() { // FIXME more safe if (path.delete() == false) { YSLOG.warn("W41003", label, path); } } }
private static void close(InputStream c) { try { c.close(); } catch (IOException e) { YSLOG.warn(e, "W99004"); } }
private static void close(OutputStream c) { try { c.close(); } catch (IOException e) { YSLOG.warn(e, "W99003"); } } }
private void releaseLock() { try { this.lock.release(); } catch (IOException e) { YSLOG.warn(e, "W41001", label, path); } }
private void checkCleanupConfigurations(ServiceProfile<?> profile) throws IOException { assert profile != null; String workingDirectory = profile.getConfiguration().get(KEY_WORKING_DIRECTORY); if (workingDirectory != null) { YSLOG.warn("W10001", profile.getPrefix(), KEY_WORKING_DIRECTORY, KEY_CLEANUP); } List<String> cleanupPrefix = extractCommand(profile, ProcessUtil.PREFIX_CLEANUP); if (cleanupPrefix.isEmpty() == false) { YSLOG.warn("W10001", profile.getPrefix(), ProcessUtil.PREFIX_CLEANUP + "*", KEY_CLEANUP); } }
pluginLocations.add(url); } catch (IOException e) { YSLOG.warn(e, "W99001", file.getAbsolutePath());
private String buildCommand(List<String> commandLineTokens, Map<String, String> environmentVariables) { assert commandLineTokens != null; assert environmentVariables != null; // FIXME for bsh only StringBuilder buf = new StringBuilder(); for (Map.Entry<String, String> entry : environmentVariables.entrySet()) { if (SH_NAME.matcher(entry.getKey()).matches() == false) { YSLOG.warn("W00001", entry.getKey(), entry.getValue()); continue; } if (buf.length() > 0) { buf.append(' '); } buf.append(entry.getKey()); buf.append('='); String replaced = toLiteral(entry.getValue()); buf.append(replaced); } for (String token : commandLineTokens) { if (buf.length() > 0) { buf.append(' '); } buf.append(toLiteral(token)); } return buf.toString(); }
waitForComplete(); } catch (IOException e) { YSLOG.warn(e, "W01002", batchId);
throw e; } catch (InterruptedException e) { YSLOG.warn(e, "W01001", batchId); throw e; } finally {
ExecutorService executor = resourceExecutors.get(resourceId); if (executor == null) { YSLOG.warn("W01001", context.getBatchId(), context.getFlowId(),
executePhase(batchId, flow, executionId, ExecutionPhase.FINALIZE); } catch (Exception e) { YSLOG.warn(e, "W02002", batchId, flow.getId(), executionId); executePhase(batchId, flow, executionId, ExecutionPhase.CLEANUP); } catch (Exception e) { YSLOG.warn(e, "W02003", batchId, flow.getId(), executionId); throw e; } catch (InterruptedException e) { YSLOG.warn(e, "W02001", batchId, flow.getId(), executionId); throw e; } finally {
throw e; } catch (InterruptedException e) { YSLOG.warn(e, "W04001", context.getBatchId(), context.getFlowId(), context.getExecutionId(), context.getPhase(), getJobLabel(), getServiceLabel(), getTrackingId(context));
throw e; } catch (InterruptedException e) { YSLOG.warn(e, "W03001", context.getBatchId(), context.getFlowId(), context.getExecutionId(), context.getPhase()); throw e;