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
Add concept of global resources which can be shared across applications #80
Conversation
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.
Thanks, @lceleban-dd, this is an awesome update 👍 A few minor comments and let's ship it.
|
||
lazy val globalResources: Seq[AkkeeperResource] = { | ||
if (akkeeperConfig.hasPath("globalResources")) { | ||
akkeeperConfig.getConfigList("globalResources").asScala.map(akkeeperResourceFromConfig) |
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.
Can we please name this global-resources
to be consistent with other property names.
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.
Yes, done
private[config] def akkeeperResourceFromConfig(config: Config): AkkeeperResource = { | ||
AkkeeperResource( | ||
new URI(config.getString("uri")), | ||
config.getString("localPath"), |
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.
Same as above: local-path
.
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.
Done
val dst = copyResourceToStagingDir(dstFs, srcStream, dstPath) | ||
val dstStatus = dstFs.getFileStatus(dst) | ||
create(dstFs, dstStatus) | ||
val dst = copyResourceToStagingDir(srcStream, dstPath) |
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.
[Thought|Optional] Perhaps it makes sense to rename all createLocalResource
methods to uploadLocalResource
to draw a clear line between the case when we copy the resource and when we use the original source instead.
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.
Renamed
@@ -19,6 +19,7 @@ private[akkeeper] object LocalResourceNames { | |||
val AkkeeperJarName = "akkeeper.jar" | |||
val UserJarName = "user.jar" | |||
val UserConfigName = "user_config.conf" | |||
val LauncherConfigName = "launcher_config.conf" |
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.
I wouldn't say it's a launcher config per se. More like application
or akkeeper
config.
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.
Renamed to application.conf
@@ -19,6 +19,7 @@ private[akkeeper] object LocalResourceNames { | |||
val AkkeeperJarName = "akkeeper.jar" | |||
val UserJarName = "user.jar" | |||
val UserConfigName = "user_config.conf" | |||
val LauncherConfigName = "application.conf" |
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.
Shall we rename the constant as well?
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.
🤦♂️ 😉
done
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.
Thanks, Lukasz, great job 👍
No description provided.