Ideally, the DataNodeRegistration object could keep track of the value in Zookeeper, and its expected value. In the event that the value in Zookeeper is different, then when set_data() is called, it will update Zookeeper. However, if the two values match, set_data() should be a noop. I should be able to write really terrible code that says:

    for x in range(0,10000): obj.set_data("wee")

This code should set the value once, and thats it...