@Override
    public void setData(String path, Object data) {
        byte[] zkDataBytes;
        if (data instanceof Serializable) {
            zkDataBytes = zkSerializer.serialize(data);
        } else {
            zkDataBytes = (byte[]) data;
        }
        try {
            client.setData().forPath(path, zkDataBytes);
        } catch (Exception e) {
            throw new IllegalStateException(e.getMessage(), e);
        }
    }
@author Robert HG (254963746@qq.com) on 5/16/15.
lts-core/src/main/java/com/github/ltsopensource/zookeeper/curator/CuratorZkClient.java