diff --git a/pentaho-kettle/src/main/java/org/pentaho/di/cluster/ServerCache.java b/pentaho-kettle/src/main/java/org/pentaho/di/cluster/ServerCache.java index c362ab3..a0d69c0 100644 --- a/pentaho-kettle/src/main/java/org/pentaho/di/cluster/ServerCache.java +++ b/pentaho-kettle/src/main/java/org/pentaho/di/cluster/ServerCache.java @@ -21,7 +21,6 @@ import com.google.common.cache.CacheBuilder; import org.pentaho.di.base.AbstractMeta; import org.pentaho.di.core.Const; -import org.pentaho.di.core.logging.LogChannel; import org.pentaho.di.core.logging.LogChannelInterface; import org.pentaho.di.core.parameters.NamedParams; import org.pentaho.di.core.parameters.UnknownParamException; @@ -132,24 +131,26 @@ public static Map buildRequestParameters(String resourceName, } } - LogChannel.GENERAL.logError("=====> Request Parameters: " + map.toString()); - return map; } - public static void updateParametersAndCache(HttpServletRequest request, NamedParams params, String carteObjectId) { + public static void updateParametersAndCache(HttpServletRequest request, + NamedParams params, + VariableSpace vars, + String carteObjectId) { String cacheId = request == null ? null : request.getHeader(KEY_ETL_CACHE_ID); String requestId = request == null ? null : request.getHeader(KEY_ETL_REQUEST_ID); - LogChannel.GENERAL.logError( - "=====> cacheId=" + cacheId + ", requetId=" + requestId + ", carteId=" + carteObjectId); - if (!Strings.isNullOrEmpty(requestId)) { try { params.setParameterValue(KEY_ETL_REQUEST_ID, requestId); } catch (UnknownParamException e) { // this should not happen } + + if (vars != null) { + vars.setVariable(KEY_ETL_REQUEST_ID, requestId); + } } // update cache @@ -182,6 +183,10 @@ public static Map.Entry getCachedEntry( WebResult webResult = WebResult.fromXMLString(reply); if (webResult.getResult().equalsIgnoreCase(WebResult.STRING_OK)) { identity = webResult.getId(); + logBasic(server, + new StringBuilder() + .append("Found ").append(resourceName).append('=').append(identity) + .append(" on remote slave server").toString()); } } catch (Exception e) { // ignore as this is usually a network issue diff --git a/pentaho-kettle/src/main/java/org/pentaho/di/www/StartExecutionTransServlet.java b/pentaho-kettle/src/main/java/org/pentaho/di/www/StartExecutionTransServlet.java index 5542c1e..29d8636 100644 --- a/pentaho-kettle/src/main/java/org/pentaho/di/www/StartExecutionTransServlet.java +++ b/pentaho-kettle/src/main/java/org/pentaho/di/www/StartExecutionTransServlet.java @@ -196,7 +196,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) thro if (trans != null) { if (trans.isReadyToStart()) { - ServerCache.updateParametersAndCache(request, trans, id); + ServerCache.updateParametersAndCache(request, trans, trans, id); startThreads(trans); if (useXML) { diff --git a/pentaho-kettle/src/main/java/org/pentaho/di/www/StartJobServlet.java b/pentaho-kettle/src/main/java/org/pentaho/di/www/StartJobServlet.java index f2248bd..16a1179 100644 --- a/pentaho-kettle/src/main/java/org/pentaho/di/www/StartJobServlet.java +++ b/pentaho-kettle/src/main/java/org/pentaho/di/www/StartJobServlet.java @@ -244,7 +244,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) thro } } - ServerCache.updateParametersAndCache(request, job, id); + ServerCache.updateParametersAndCache(request, job, job, id); runJob(job); String message = BaseMessages.getString(PKG, "StartJobServlet.Log.JobStarted", jobName);