You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "Will Berkeley (JIRA)" <ji...@apache.org> on 2018/09/20 17:54:00 UTC

[jira] [Commented] (KUDU-2530) Add kudu pbc replace tool

    [ https://issues.apache.org/jira/browse/KUDU-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16622417#comment-16622417 ] 

Will Berkeley commented on KUDU-2530:
-------------------------------------

Adding some more information after discussion this with Grant:

Obviously, command line staples like {{mv}} and {{cp}} allow one to edit the pbc file elsewhere and replace the original with the edited one (and also backup the original). But a {{kudu pbc replace}} tool has a couple of advantages:

# It's convenient to be able to dump the file as human-readable json, edit it, perhaps offline or remotely, and then re-marshal the json into pbc format and replace the original pbc file with the new json-originated pbc file.
# Given #1, when helping a user diagnose and fix a cluster remotely, it's more reliable to automate and simplify the process as much as possible. The current process would look like:

# Give the user the {{kudu pbc dump}} command to dump the file. {{stdout}} is provided to us to diagnose the problem and come up with a fix.
# Either we tell the user what to edit using {{kudu pbc edit}} (yikes), or they copy the pbc and send it to us and we edit our remote copy.
# If we edited the file we send it back to them and they copy the new file over the old, hopefully making a backup.

With a {{kudu pbc replace}} tool, the process could be:

# Give the user the {{kudu pbc dump}} command to dump the file as json. {{stdout}} is provided to us, which we use to construct a fixed pbc (either fixed json or a pbc file).
# We give them the fixed json or pbc file and the {{kudu pbc replace}} command to put it in the right place.

There's definitely a gain in simplicity and a decreased chance of error. It's still kinda minor, so I think we'll hold off on implementing this unless we find ourselves doing pbc fixes a lot. Ideally, we'll address the underlying issues that cause editing pbc files to be necessary in the first place.

> Add kudu pbc replace tool
> -------------------------
>
>                 Key: KUDU-2530
>                 URL: https://issues.apache.org/jira/browse/KUDU-2530
>             Project: Kudu
>          Issue Type: Improvement
>          Components: CLI
>            Reporter: Grant Henke
>            Assignee: Grant Henke
>            Priority: Minor
>
> We currently have a _kudu pbc dump_ and a _kudu pbc edit_ tool. However, it could be nice to edit the dumped file elsewhere and be able to load/replace the dumped pbc with it. Adding _kudu pbc replace_ would make this easier. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)