FAQ
Hello,

I think I am running into a race condition with the API. This usually comes
up when a command forks out multiple chid commands. For instance, consider
the zookeeper init command. It forks out n more commands depending on the
number of zk servers. Though inconsistently, but I am seeing a case where
the original command would return even though the child commands are still
running hence failing the subsequent commands that are run (zookeeper-start
in this case).

Is this an expected behavior? A workaround I did was to have ensure that
the child commands finished as well before declaring a command as complete.
But I feel that if this is happening, this should probably be a bug.

Thanks,

Swarnim

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

Search Discussions

  • Darren Lo at Jan 18, 2014 at 11:02 pm
    Hi Swarnim,

    How are you determining that the parent command is complete? The api call
    to invoke the command returns before the command is complete, and normally
    you check the status of the command (or use the .wait() function in the
    python bindings) to see when it is finished.

    See tutorial here, including how to check command completion:
    http://cloudera.github.io/cm_api/docs/python-client/

    Thanks,
    Darren

    On Fri, Jan 17, 2014 at 3:12 PM, Swarnim Kulkarni wrote:

    Hello,

    I think I am running into a race condition with the API. This usually
    comes up when a command forks out multiple chid commands. For instance,
    consider the zookeeper init command. It forks out n more commands depending
    on the number of zk servers. Though inconsistently, but I am seeing a case
    where the original command would return even though the child commands are
    still running hence failing the subsequent commands that are run
    (zookeeper-start in this case).

    Is this an expected behavior? A workaround I did was to have ensure that
    the child commands finished as well before declaring a command as complete.
    But I feel that if this is happening, this should probably be a bug.

    Thanks,

    Swarnim

    To unsubscribe from this group and stop receiving emails from it, send an
    email to [email protected].


    --
    Thanks,
    Darren

    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupscm-users @
categorieshadoop
postedJan 17, '14 at 11:12p
activeJan 18, '14 at 11:02p
posts2
users2
websitecloudera.com
irc#hadoop

2 users in discussion

Darren Lo: 1 post Swarnim Kulkarni: 1 post

People

Translate

site design / logo © 2023 Grokbase