Skip to content
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

feat(stackable-operator): Add a utility for creating Java runtime arguments #839

Open
NickLarsenNZ opened this issue Aug 16, 2024 · 2 comments
Assignees

Comments

@NickLarsenNZ
Copy link
Member

NickLarsenNZ commented Aug 16, 2024

idea (non-blocker): we could have a utility type for making properties. It might make this a little easier for humans to parse.

Originally posted by @NickLarsenNZ in stackabletech/spark-k8s-operator#451 (comment)

Maybe we already have something available, but this helps close the comment on the linked PR so it can be merged.

I'm thinking something like:

pub struct Properties(BTreeMap);

impl Display for JreProperties {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        todo!("iterate over the properties in self.0 and make -Dproperty=value joined by space");
        // write!(f, "{}", self.0)
    }
}

impl DerefMut for Properties {
   ...
}

See: https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html#BABDJJFI

@NickLarsenNZ
Copy link
Member Author

Look into this too: stackabletech/spark-k8s-operator#451 (comment)

@NickLarsenNZ
Copy link
Member Author

Or if we see these kinds of things happening for other CLIs, we could do extensions to BTreeMap/HashMap if we have a variety of KV-pairs to list.

Eg:

  • java_cli_properties (-Dproperty=value)
  • jq_cli_args (--arg key value)
  • ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant