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

Create 'fluo remove' command #991

Closed
mikewalch opened this issue Dec 27, 2017 · 5 comments
Closed

Create 'fluo remove' command #991

mikewalch opened this issue Dec 27, 2017 · 5 comments
Milestone

Comments

@mikewalch
Copy link
Member

After a Fluo application is initialized using fluo init, metadata exists for the application in Zookeeper. Currently, there is no way to remove this metadata without using the Zookeeper CLI It would be good to have a fluo remove command that removes this metadata.

@blueshift-brasil
Copy link
Contributor

blueshift-brasil commented Dec 30, 2017

I started to implement this doing the same thing the init -f does but without the init part.
But I was wondering what happen if I remove the tables and the zookeeper data without stop the oracle and the workers before. Maybe apply the same validation of the init command:

if (admin.applicationRunning()) {
    System.err.println("Error - The Fluo '" + config.getApplicationName() + "' application"
        + " is already running and must be stopped before running 'fluo init'. "
        + " Aborted initialization.");
    System.exit(-1);
}

OR we could store the PID of the workers and oracle in a file like .[APP_NAME]woker01.pid, .[APP_NAME]worker02.pid, APP_NAME]_oracle01.pid.... and when a remove command it is called if a --force flag we could find and kill this processes too.

And... If we have the PID files we could implement commands like:

fluo worker -a myapp -k
fluo oracle -a myapp -k

AND

fluo worker -a myapp --kill
fluo oracle -a myapp --kill

@mikewalch
Copy link
Member Author

I think the first option is the best. You should check to see if the application is running and abort if it is. I was thinking the remove command was only run once from one node (like the init command). It just cleans up metadata in Zookeeper and drops the Accumulo table. Stopping processes is tricky as they could be running locally, in YARN, Marathon, or Kubernetes.

@kennethmcfarland
Copy link
Contributor

This issue is the same as #529 from what I can tell.

blueshift-brasil added a commit to blueshift-brasil/fluo that referenced this issue Jan 10, 2018
keith-turner added a commit that referenced this issue Jan 17, 2018
@kennethmcfarland
Copy link
Contributor

Can we close this? Can we close #529?

@mikewalch
Copy link
Member Author

Closed by #999

@keith-turner keith-turner added this to the 1.2.0 milestone Feb 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants