From e3853e97bdc292b7b34ba67feb49592efc64e91d Mon Sep 17 00:00:00 2001 From: lsaikrishna Date: Wed, 20 Mar 2024 16:03:19 +0530 Subject: [PATCH] [BACKLOG-40288] Revert Back - Pentaho PDI Observability development changes --- .../src/main/java/org/pentaho/di/job/Job.java | 27 +------------ .../pentaho/di/pan/PanCommandExecutor.java | 2 - .../main/java/org/pentaho/di/trans/Trans.java | 15 ------- .../di/job/messages/messages_en_US.properties | 11 +---- .../di/pan/messages/messages_en_US.properties | 2 - .../trans/messages/messages_en_US.properties | 9 +---- .../pentaho/di/ui/spoon/trans/TransGraph.java | 40 +------------------ .../spoon/messages/messages_en_US.properties | 7 +--- 8 files changed, 6 insertions(+), 107 deletions(-) diff --git a/engine/src/main/java/org/pentaho/di/job/Job.java b/engine/src/main/java/org/pentaho/di/job/Job.java index 2fe27ae3c3c8..e2fe9b7618c9 100644 --- a/engine/src/main/java/org/pentaho/di/job/Job.java +++ b/engine/src/main/java/org/pentaho/di/job/Job.java @@ -110,8 +110,6 @@ import org.pentaho.di.www.StartJobServlet; import org.pentaho.di.www.WebResult; import org.pentaho.metastore.api.IMetaStore; -import java.time.LocalDateTime; -import org.springframework.util.ObjectUtils; /** * This class executes a job as defined by a JobMeta object. @@ -484,12 +482,6 @@ private Result execute() throws KettleException { KettleEnvironment.setExecutionInformation( this, rep ); log.logMinimal( BaseMessages.getString( PKG, "Job.Comment.JobStarted" ) ); - log.logMinimal( BaseMessages.getString( PKG, "Job.Comment.StartTime", LocalDateTime.now()) + ","+ - BaseMessages.getString( PKG, "Job.Comment.RunName", jobMeta.getName()) + ","+ - BaseMessages.getString( PKG, "Job.Comment.UserContext", System.getProperty("user.name")) + ","+ - BaseMessages.getString( PKG, "Job.Comment.NoOfSteps", jobMeta.nrJobEntries()) + ","+ - BaseMessages.getString( PKG, "Job.Comment.NoOfHops", jobMeta.nrJobHops()) + ","+ - BaseMessages.getString( PKG, "Job.Comment.RunId", this.getLogChannelId()) ); ExtensionPointHandler.callExtensionPoint( log, KettleExtensionPoint.JobStart.id, this ); // Start the tracking... @@ -557,24 +549,7 @@ private Result execute() throws KettleException { } // Save this result... jobTracker.addJobTracker( new JobTracker( jobMeta, jerEnd ) ); - if( !ObjectUtils.isEmpty( jerEnd ) && !ObjectUtils.isEmpty( jerEnd.getResult() ) && jerEnd.getResult().getResult() ){ - log.logMinimal( BaseMessages.getString( PKG, "Job.Comment.JobFinished" ) ); - log.logMinimal( BaseMessages.getString( PKG, "Job.Comment.RunId",this.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "Job.Comment.EndTime",LocalDateTime.now() ) ); - log.logMinimal( BaseMessages.getString( PKG, "Job.Comment.RunId",this.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "Job.Comment.UserContext",System.getProperty("user.name") ) ); - log.logMinimal( BaseMessages.getString( PKG, "Job.Comment.RunId",this.getLogChannelId()) + ","+ - BaseMessages.getString( PKG, "Job.Comment.SuccessStatus") ); - } else { - log.logMinimal( BaseMessages.getString( PKG, "Job.Comment.JobFinished" ) ); - log.logMinimal( BaseMessages.getString( PKG, "Job.Comment.RunId",this.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "Job.Comment.EndTime",LocalDateTime.now() ) ); - log.logMinimal( BaseMessages.getString( PKG, "Job.Comment.RunId",this.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "Job.Comment.UserContext",System.getProperty("user.name") ) ); - log.logMinimal( BaseMessages.getString( PKG, "Job.Comment.RunId",this.getLogChannelId()) + ","+ - BaseMessages.getString( PKG, "Job.Comment.SuccessFailure") ); - } - + log.logMinimal( BaseMessages.getString( PKG, "Job.Comment.JobFinished" ) ); setActive( false ); if ( !isStopped() ) { setFinished( true ); diff --git a/engine/src/main/java/org/pentaho/di/pan/PanCommandExecutor.java b/engine/src/main/java/org/pentaho/di/pan/PanCommandExecutor.java index ba3e7b5b2fc3..956ec00912c0 100644 --- a/engine/src/main/java/org/pentaho/di/pan/PanCommandExecutor.java +++ b/engine/src/main/java/org/pentaho/di/pan/PanCommandExecutor.java @@ -239,8 +239,6 @@ public void rowWrittenEvent( RowMetaInterface rowMeta, Object[] data ) throws Ke int completionTimeSeconds = calculateAndPrintElapsedTime( start, stop, "Pan.Log.StartStop", "Pan.Log.ProcessingEndAfter", "Pan.Log.ProcessingEndAfterLong", "Pan.Log.ProcessingEndAfterLonger", "Pan.Log.ProcessingEndAfterLongest" ); getResult().setElapsedTimeMillis( stop.getTime() - start.getTime() ); - getLog().logBasic( "Transformation stopped." ); - getLog().logBasic(BaseMessages.getString( getPkgClazz(), "Pan.Comment.UserContext",System.getProperty("user.name") ) ); if ( getResult().getNrErrors() == 0 ) { trans.printStats( completionTimeSeconds ); diff --git a/engine/src/main/java/org/pentaho/di/trans/Trans.java b/engine/src/main/java/org/pentaho/di/trans/Trans.java index 96c8cedc02ef..4d1806c71261 100644 --- a/engine/src/main/java/org/pentaho/di/trans/Trans.java +++ b/engine/src/main/java/org/pentaho/di/trans/Trans.java @@ -150,8 +150,6 @@ import org.pentaho.di.www.StartExecutionTransServlet; import org.pentaho.di.www.WebResult; import org.pentaho.metastore.api.IMetaStore; -import java.time.LocalDateTime; -import org.springframework.util.ObjectUtils; import static com.google.common.base.Preconditions.checkNotNull; import static org.pentaho.di.trans.Trans.BitMaskStatus.FINISHED; import static org.pentaho.di.trans.Trans.BitMaskStatus.RUNNING; @@ -782,10 +780,6 @@ public void execute( String[] arguments ) throws KettleException { setInitialLogBufferStartLine(); prepareExecution( arguments ); startThreads(); - log.logMinimal( BaseMessages.getString( PKG, "Trans.Comment.RunId",this.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "Trans.Comment.EndTime",LocalDateTime.now() ) ); - log.logMinimal( BaseMessages.getString( PKG, "Trans.Comment.RunId",this.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "Trans.Comment.UserContext",System.getProperty("user.name") ) ); } /** @@ -802,15 +796,6 @@ public void prepareExecution( String[] arguments ) throws KettleException { log.snap( Metrics.METRIC_TRANSFORMATION_EXECUTION_START ); log.snap( Metrics.METRIC_TRANSFORMATION_INIT_START ); - log.logBasic( "Transformation started." ); - if( !ObjectUtils.isEmpty(transMeta)) { - log.logBasic( BaseMessages.getString( PKG, "Trans.Comment.StartTime", LocalDateTime.now()) + ","+ - BaseMessages.getString( PKG, "Trans.Comment.RunName", transMeta.getName()) + ","+ - BaseMessages.getString( PKG, "Trans.Comment.UserContext", System.getProperty("user.name")) + ","+ - BaseMessages.getString( PKG, "Trans.Comment.NoOfSteps", transMeta.nrSteps()) + ","+ - BaseMessages.getString( PKG, "Trans.Comment.NoOfHops", transMeta.nrTransHops()) + ","+ - BaseMessages.getString( PKG, "Trans.Comment.RunId", this.getLogChannelId()) ); - } ExtensionPointHandler.callExtensionPoint( log, KettleExtensionPoint.TransformationPrepareExecution.id, this ); checkCompatibility(); diff --git a/engine/src/main/resources/org/pentaho/di/job/messages/messages_en_US.properties b/engine/src/main/resources/org/pentaho/di/job/messages/messages_en_US.properties index 610c8f405b43..329576900e75 100644 --- a/engine/src/main/resources/org/pentaho/di/job/messages/messages_en_US.properties +++ b/engine/src/main/resources/org/pentaho/di/job/messages/messages_en_US.properties @@ -133,13 +133,4 @@ Job.Comment.FollowedFailure=Followed link after failure JobMeta.SearchMetadata.DatabaseHostName=Database hostname JobCategory.Category.Deprecated=Deprecated Job.Reason.LogTableEror=Error write to log table -JobCategory.Category.Catalog=Catalog -Job.Comment.StartTime=startTime\= {0} -Job.Comment.RunName=runName\= {0} -Job.Comment.UserContext=userContext\= {0} -Job.Comment.NoOfSteps=noOfSteps\= {0} -Job.Comment.NoOfHops=noOfHOps\= {0} -Job.Comment.RunId=runId\= {0} -Job.Comment.EndTime=endTime\= {0} -Job.Comment.SuccessStatus=jobStatus=success -Job.Comment.SuccessFailure=jobStatus=failure \ No newline at end of file +JobCategory.Category.Catalog=Catalog \ No newline at end of file diff --git a/engine/src/main/resources/org/pentaho/di/pan/messages/messages_en_US.properties b/engine/src/main/resources/org/pentaho/di/pan/messages/messages_en_US.properties index c81e22b0fe48..acce6dec0cd5 100644 --- a/engine/src/main/resources/org/pentaho/di/pan/messages/messages_en_US.properties +++ b/engine/src/main/resources/org/pentaho/di/pan/messages/messages_en_US.properties @@ -69,5 +69,3 @@ Pan.ComdLine.JarFile=specifies the jar filename Pan.Log.LoadingTransXML=Loading transformation from XML file [{0}] Pan.Error.TransJVMExitCodeInvalid=The transformation variable {0} is not an integer. It is set to "{1}". Pan.Log.JVMExitCode=Exiting the JVM with exit code {0}. -Pan.ComdLine.Metrics=Gather metrics during execution -Pan.Comment.UserContext=userContext\= {0} \ No newline at end of file diff --git a/engine/src/main/resources/org/pentaho/di/trans/messages/messages_en_US.properties b/engine/src/main/resources/org/pentaho/di/trans/messages/messages_en_US.properties index f640b1fc1054..9630b842eb68 100644 --- a/engine/src/main/resources/org/pentaho/di/trans/messages/messages_en_US.properties +++ b/engine/src/main/resources/org/pentaho/di/trans/messages/messages_en_US.properties @@ -296,11 +296,4 @@ TransMeta.MissingPluginsFoundWhileLoadingTransformation.Exception=Missing plugin Trans.FinishListeners.Exception=Error running finish transformation listners TransSplitter.Clustering.CopyNumberStep=The number of step copies on the master has to be 1 or equal to the number of slaves ({0}) to work. Note that you can insert a dummy step between {1} and {2} steps to make the transformation work as desired. StepWithMappingMeta.Exception.UnableToLoadTrans=Unable to load transformation [{0}] \: can''t find directory -TransSupplier.SelectedEngine.Kettle=Running transformation using the Kettle execution engine -Trans.Comment.StartTime=startTime\= {0} -Trans.Comment.RunName=runName\= {0} -Trans.Comment.UserContext=userContext\= {0} -Trans.Comment.NoOfSteps=noOfSteps\= {0} -Trans.Comment.NoOfHops=noOfHOps\= {0} -Trans.Comment.RunId=runId\= {0} -Trans.Comment.EndTime=endTime\= {0} \ No newline at end of file +TransSupplier.SelectedEngine.Kettle=Running transformation using the Kettle execution engine \ No newline at end of file diff --git a/ui/src/main/java/org/pentaho/di/ui/spoon/trans/TransGraph.java b/ui/src/main/java/org/pentaho/di/ui/spoon/trans/TransGraph.java index a59d833396af..068f0ff28d58 100644 --- a/ui/src/main/java/org/pentaho/di/ui/spoon/trans/TransGraph.java +++ b/ui/src/main/java/org/pentaho/di/ui/spoon/trans/TransGraph.java @@ -202,8 +202,6 @@ import java.util.TimerTask; import java.util.UUID; import java.util.concurrent.Callable; -import org.springframework.util.ObjectUtils; -import java.time.LocalDateTime; /** * This class handles the display of the transformations in a graphical way using icons, arrows, etc. One transformation @@ -4147,24 +4145,7 @@ public void stop() { if ( ( running && !halting ) ) { halting = true; trans.stopAll(); - if ( !ObjectUtils.isEmpty( trans.getResult() ) && trans.getResult().getResult()) { - log.logMinimal( BaseMessages.getString( PKG, "TransLog.Log.ProcessingOfTransformationStopped" ) ); - log.logMinimal( BaseMessages.getString( PKG, "TransGraph.Comment.RunId",transMeta.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "TransGraph.Comment.EndTime",LocalDateTime.now() ) ); - log.logMinimal( BaseMessages.getString( PKG, "TransGraph.Comment.RunId",transMeta.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "TransGraph.Comment.UserContext",System.getProperty("user.name") ) ); - log.logMinimal( BaseMessages.getString( PKG, "TransGraph.Comment.RunId",transMeta.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "TransGraph.Comment.SuccessStatus") ); - } else{ - log.logMinimal( BaseMessages.getString( PKG, "TransLog.Log.ProcessingOfTransformationStopped" ) ); - log.logMinimal( BaseMessages.getString( PKG, "TransGraph.Comment.RunId",transMeta.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "TransGraph.Comment.EndTime",LocalDateTime.now() ) ); - log.logMinimal( BaseMessages.getString( PKG, "TransGraph.Comment.RunId",transMeta.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "TransGraph.Comment.UserContext",System.getProperty("user.name") ) ); - log.logMinimal( BaseMessages.getString( PKG, "TransGraph.Comment.RunId",transMeta.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "TransGraph.Comment.SuccessFailure") ); - } - + log.logMinimal( BaseMessages.getString( PKG, "TransLog.Log.ProcessingOfTransformationStopped" ) ); running = false; initialized = false; halted = false; @@ -4409,24 +4390,7 @@ protected void stopRedrawTimer() { private void checkTransEnded() { if ( trans != null ) { if ( trans.isFinished() && ( running || halted ) ) { - if ( !ObjectUtils.isEmpty( trans.getResult() ) && trans.getResult().getResult()) { - log.logMinimal( BaseMessages.getString( PKG, "TransLog.Log.TransformationHasFinished" ) ); - log.logMinimal( BaseMessages.getString( PKG, "TransGraph.Comment.RunId",transMeta.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "TransGraph.Comment.EndTime",LocalDateTime.now() ) ); - log.logMinimal( BaseMessages.getString( PKG, "TransGraph.Comment.RunId",transMeta.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "TransGraph.Comment.UserContext",System.getProperty("user.name") ) ); - log.logMinimal( BaseMessages.getString( PKG, "TransGraph.Comment.RunId",transMeta.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "TransGraph.Comment.SuccessStatus") ); - } else{ - log.logMinimal( BaseMessages.getString( PKG, "TransLog.Log.TransformationHasFinished" ) ); - log.logMinimal( BaseMessages.getString( PKG, "TransGraph.Comment.RunId",transMeta.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "TransGraph.Comment.EndTime",LocalDateTime.now() ) ); - log.logMinimal( BaseMessages.getString( PKG, "TransGraph.Comment.RunId",transMeta.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "TransGraph.Comment.UserContext",System.getProperty("user.name") ) ); - log.logMinimal( BaseMessages.getString( PKG, "TransGraph.Comment.RunId",transMeta.getLogChannelId() ) + ","+ - BaseMessages.getString( PKG, "TransGraph.Comment.SuccessFailure") ); - } - + log.logMinimal( BaseMessages.getString( PKG, "TransLog.Log.TransformationHasFinished" ) ); running = false; initialized = false; halted = false; diff --git a/ui/src/main/resources/org/pentaho/di/ui/spoon/messages/messages_en_US.properties b/ui/src/main/resources/org/pentaho/di/ui/spoon/messages/messages_en_US.properties index f008b3fefe49..6e4bac4cd9a2 100644 --- a/ui/src/main/resources/org/pentaho/di/ui/spoon/messages/messages_en_US.properties +++ b/ui/src/main/resources/org/pentaho/di/ui/spoon/messages/messages_en_US.properties @@ -1022,9 +1022,4 @@ TransGraph.VersionBrowser.CantFindInRepo=Can''t find this transformation in the TransGraph.DeprecatedStep.Tooltip.Title=This is a deprecated step and will be removed. TransGraph.DeprecatedStep.Tooltip.Message1={0} will be removed in an upcoming TransGraph.DeprecatedStep.Tooltip.Message2=release or may not be working at this time. -TransGraph.DeprecatedStep.Tooltip.Message3=We suggest\nusing {0} instead to ensure compatibility\nmoving forward. -TransGraph.Comment.UserContext=userContext\= {0} -TransGraph.Comment.RunId=runId\= {0} -TransGraph.Comment.EndTime=endTime\= {0} -TransGraph.Comment.SuccessStatus=transformationStatus=success -TransGraph.Comment.SuccessFailure=transformationStatus=failure \ No newline at end of file +TransGraph.DeprecatedStep.Tooltip.Message3=We suggest\nusing {0} instead to ensure compatibility\nmoving forward. \ No newline at end of file