Fixed stop-servers.sh; Added close command to shell

0 views
Skip to first unread message

Doug Judd

unread,
Sep 5, 2009, 10:48:44 PM9/5/09
to hypertable-...@googlegroups.com

Luke

unread,
Sep 6, 2009, 5:32:34 PM9/6/09
to hypertable-...@googlegroups.com
Refactor shutdown into close and exit is fine but I think it's very
surprising for shutdown to just _exit, which might as well just use
kill -9.

On Sat, Sep 5, 2009 at 7:48 PM, Doug Judd<do...@zvents.com> wrote:
> http://github.com/nuggetwheat/hypertable/commit/d06c911317cc51abb435b6a6fb10527b2c225e67
>
> - Doug
>
>
> >
>

Doug Judd

unread,
Sep 6, 2009, 5:57:11 PM9/6/09
to hypertable-...@googlegroups.com
Well, the nice thing is that people can just do the following to gracefully shutdown:

hypertable> close;
hypertable> shutdown;

Even if they're not using capistrano.

Doug Judd

unread,
Sep 6, 2009, 5:59:18 PM9/6/09
to hypertable-...@googlegroups.com
Anyway, we're going to remove close and shutdown when HDFS has a working fsync.

On Sun, Sep 6, 2009 at 2:32 PM, Luke <vic...@gmail.com> wrote:

Luke

unread,
Sep 6, 2009, 10:16:22 PM9/6/09
to hypertable-...@googlegroups.com
My point was that shutdown should do close then exit. Imagine the surprise from people who relies on shutdown to do the right thing just like the unix command.

__Luke

All the spelling errors belong to my iPhone.

Doug Judd

unread,
Sep 6, 2009, 10:40:09 PM9/6/09
to hypertable-...@googlegroups.com
The issue is that when a shutdown command gets issued, the servers exit and cause error messages to get spewed by the rsclient command interpreter and return with a non-zero exit status.  To fix this the shutdown command in the rsclient command interpreter would just send the shutdown command and return immediately.  However, this causes a problem with stop-servers.sh because the line immediately after shutdown was a stop-dfsbroker.  There was a race condition where sometimes the dfs broker would get killed before the RangeServer received the shutdown command.  To fix this, I separated out the close from the shutdown.

I suppose I could rename 'shutdown' to 'kill'.  Would that work for you?

Luke

unread,
Sep 6, 2009, 11:55:23 PM9/6/09
to hypertable-...@googlegroups.com
Why can't shutdown (in the interpreter) do close then wait for all to
close and then exit?

Doug Judd

unread,
Sep 7, 2009, 12:41:57 AM9/7/09
to hypertable-...@googlegroups.com
If you want to code this up tomorrow, feel free.  I'm about to push a commit that changes the shutdown command to a kill command.  Feel free to drop it or change it or whatever you feel is appropriate.  I've spent that last 48 hours of my Labor day weekend coding in preparation for the Twitter meeting on Wednesday.  I'm going to bundle up the current 'pu' on Tuesday morning (or whatever you commit) so that we have working packages for Twitter.

- Doug

Doug Judd

unread,
Sep 7, 2009, 12:45:47 AM9/7/09
to hypertable-...@googlegroups.com
Alright, I'll do it...
Reply all
Reply to author
Forward
0 new messages