Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
So I found your tool while setting up an HDFS cluster on Kubernetes and I like it a lot. However, especially under Kubernetes, I got bitten by #123 -- Hadoop by default uses IP addresses for datanodes (which works well in k8s) -- in particular, the default for
dfs.client.use.datanode.hostname
inhdfs-default.xml
isfalse
. (#118 is related)So I reverted a79e6ee for my own purposes, but the correct answer is clearly to understand configurations better from inside the tool (environment variables, maybe a config file of its own). I noticed your CLI was fairly messy, and this ties into understanding configurations. So I went ahead and implemented a nice https://github.com/spf13/cobra CLI around the same underlying implementations of the subcommands, with minor changes.
My end goal is to support both modes of operation and let it be extensible for other such config options (eg, #76). Your
ClientOptions
struct is great, it just needs a way to be handled with flags and environment variables and the like. (And it needs to be piped in at the call sites ina79e6ee
)So here is my feature-parity (hopefully test neutral; we'll see what travis says) new CLI. Every action is self-contained on the file level, so new actions are also easy (making rebasing #133 easy, among others). I've omitted bash completions as a follow-up, as they're built into cobra (obviates #91).
Follow-ups:
a79e6ee
upstream with a replacement flag/env"Screenshot":