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

Comments

Projects
None yet
4 participants
@mikewalch
Member

mikewalch commented Dec 27, 2017

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.

@alanblueshift

This comment has been minimized.

Contributor

alanblueshift 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

This comment has been minimized.

Member

mikewalch commented Dec 30, 2017

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.

@kpm1985

This comment has been minimized.

Contributor

kpm1985 commented Dec 30, 2017

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

alanblueshift added a commit to alanblueshift/fluo that referenced this issue Jan 10, 2018

keith-turner added a commit that referenced this issue Jan 17, 2018

Merge pull request #999 from alanblueshift/master
Create 'fluo remove' command #991
@kpm1985

This comment has been minimized.

Contributor

kpm1985 commented Jan 25, 2018

Can we close this? Can we close #529?

@mikewalch

This comment has been minimized.

Member

mikewalch commented Feb 15, 2018

Closed by #999

@mikewalch mikewalch closed this Feb 15, 2018

@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