cdap icon indicating copy to clipboard operation
cdap copied to clipboard

[CDAP-21061] wrap all plugin methods to throw WrappedStageException

Open itsankit-google opened this issue 6 months ago • 0 comments

JIRA: CDAP-21061

Refactoring so that any known plugin type instantiated by the pipeline is wrapped so that it throws wrapped stage exception which will be later on used by LogAppender to add MDC tags.

Tested in CDAP Sandbox:

Caused by: io.cdap.cdap.api.exception.WrappedStageException: Stage 'NYT Best Sellers Raw Data' encountered : java.lang.IllegalArgumentException: Invalid bucket name in path 'top_rated_$inexpensive'. Bucket name should only contain lower case alphanumeric, '-'. '_' and '.'. Please follow GCS naming convention: https://cloud.google.com/storage/docs/naming-buckets
	at io.cdap.cdap.etl.common.plugin.WrappedBatchSource.lambda$prepareRun$0(WrappedBatchSource.java:58)
	at io.cdap.cdap.etl.common.plugin.Caller$1.call(Caller.java:30)
	at io.cdap.cdap.etl.common.plugin.StageLoggingCaller.call(StageLoggingCaller.java:40)
	at io.cdap.cdap.etl.common.plugin.WrappedBatchSource.prepareRun(WrappedBatchSource.java:53)
	at io.cdap.cdap.etl.common.plugin.WrappedBatchSource.prepareRun(WrappedBatchSource.java:36)
	at io.cdap.cdap.etl.common.submit.SubmitterPlugin.lambda$prepareRun$2(SubmitterPlugin.java:74)
	at io.cdap.cdap.internal.app.runtime.AbstractContext.lambda$execute$5(AbstractContext.java:558)
	at io.cdap.cdap.data2.transaction.Transactions$CacheBasedTransactional.finishExecute(Transactions.java:234)

itsankit-google avatar Aug 27 '24 15:08 itsankit-google