Closed kunkun-tang closed 6 years ago
What classpath? It's not obvious to me what the problem was and how the change fixed it. Yes, I have looked at the diff. Could you provide more details?
Explained more in the Description Panel. @HappyRay
Do other plugins work in the same way in terms of classpath?
Could you think of automated tests to catch this regression?
Per our earlier agreement, every time we find a bug, by default we need to add automated tests to prevent a similar issue in the future.
I just checked other plugins, like PinotBuildAndPush. Its classpath is included inside the JVM starting commands, like /export/apps/azkaban/azkaban-exec-server/azkaban-exec-server_10688/plugins/jobtypes/PinotBuildAndPushJob/lib/*
So, in the future refactors, we may place teradata jars into every individual teradata related plugins.
So, in the future refactors, we may place teradata jars into every individual teradata related plugins.
Merge state
Which approach do you think is better?
I agree that we need to invest on the automated test. However, this code will eventually be discarded in later future. The jobtype automated test should be redeisgned with the new jobtype proposal. As we see, manual calling class name in java code was not a reliable design choice, and we should replace it with new approach.
In this PR, we might not want to introduce the change. Alternatively, we may
Which approach do you think is better?
Like Reportal dependency, we'd place teradata abstract dependency under every teradata-replated plugin/lib.
Like Reportal dependency, we'd place teradata abstract dependency under every teradata-replated plugin/lib.
When do you plan to do it?
When do you plan to do it?
The bottleneck is that Teradata codebase relies on maual-check-in jars. We need to figure it out firstly.
I misunderstood your question. Yes, I believe we should be able to do it at the current stage.
What's your plan then?
Instead of root/lib path, we should add the build generated jar, az-teradata-jdbc.jar, into every plugin/lib folder. We need to make sure plugin's classpath includes it.
When do you plan to implement what you stated above? Is that tracked?
Since we separated Teradata classes with other jobtype classes in https://github.com/azkaban/azkaban/pull/1717, it resulted in two individual jars: jobtype jar and Teradata Jar. Today Azkaban adds original jobtype dependency classpath by specifying the exact class name, retrieving which jar includes this class, and appending the jar into Job JVM starting command. For example, https://github.com/azkaban/azkaban/blob/7cd51237ad9e9f1994931cbe64f6dc1a640c0ece/az-hadoop-jobtype-plugin/src/main/java/azkaban/jobtype/HadoopJavaJob.java#L132
Because we separated the teradata and jobtype jar, we need to add teradata jar to classpath explicitly.