-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Bowl for all VFS API requests #9579
base: project-profile
Are you sure you want to change the base?
Conversation
047f07b
to
c9f1e71
Compare
FileObject destFile = KettleVFS.getFileObject( dest ); | ||
IKettleVFS vfs = KettleVFS.getInstance( DefaultBowl.getInstance() ); | ||
FileObject srcFile = vfs.getFileObject( src ); | ||
FileObject destFile = vfs.getFileObject( dest ); | ||
try ( InputStream in = KettleVFS.getInputStream( srcFile ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The getOutputStream() is using the kettleVFS with Bowl and getInputStream() does not? Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getInputStream( FileObject ) is a static helper method. It doesn't do anything with the bowl, so isn't on IKettleVFS and remains on KettleVFS. There are several methods like this.
@@ -150,8 +152,8 @@ public Result execute( final Params params, String[] arguments ) throws Throwabl | |||
// Try to load the transformation from file, even if it failed to load from the repository | |||
// You could implement some fail-over mechanism this way. | |||
if ( trans == null ) { | |||
trans = loadTransFromFilesystem( params.getLocalInitialDir(), params.getLocalFile(), params.getLocalJarFile(), | |||
params.getBase64Zip() ); | |||
trans = loadTransFromFilesystem( DefaultBowl.getInstance(), params.getLocalInitialDir(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can potentially create problems. In the Pan/Kitchen.java, we are taking the project parameter to figure out the what is the ProjctBowl. This project bowl will be set in the TransMeta/JobMeta when the loadXml is called. But here, we are initializing TransMeta with the defaultBowl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, this will need to be modified by BACKLOG-42187
Note to reviewers: split into two commits, with the most interesting API changes in the first commit.