#NEWLINE# def update_serverset_metadata( zk_path , notification_timestamp , value ) : #NEWLINE# #INDENT# hashsum = zk_util . get_md5_hash_sum ( value ) #NEWLINE# try : #NEWLINE# #INDENT# num_endpoints = len ( value . split ( ',' ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# num_endpoints = ( - 1 ) #NEWLINE# #UNINDENT# metadata = { #NEWLINE# #INDENT# 'hashsum' : hashsum , #NEWLINE# 'num_endpoints' : num_endpoints , #NEWLINE# 'notification_timestamp' : num_endpoints , #NEWLINE# #UNINDENT# } #NEWLINE# if ( zk_path in _SERVERSET_METADATA ) : #NEWLINE# #INDENT# _SERVERSET_METADATA [ zk_path ] . update ( metadata ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# _SERVERSET_METADATA [ zk_path ] = metadata