tools/bdconfig/lib/google_hadoop/bdconfig_lib/xml_configuration.py
def Update(self, properties_to_update, optional_properties_to_add):
    """Updates properties in the configuration.

    Args:
      properties_to_update: Dict of properties to update.
        where,
        key = name of a property,
        value = property is set to this value.
      optional_properties_to_add: Map of properties to add
        only if it doesn't already exist in the file.

    Raises:
      LookupError: if a property lookup in optional_properties_to_add is None.
    """

    # Iterate through the properties and update their values.
    # If value == None, we remove that property from the file.
    for name, value in sorted(properties_to_update.iteritems()):
      if value is None:
        self.RemoveProperty(name)
      else:
        self.SetProperty(name, value)

    # For optional properties, we only insert values if there is no existing
    # value already; as such there is no such thing as optional removal
    # of an existing property.
    for name, value in sorted(optional_properties_to_add.iteritems()):
      if value is None:
        raise LookupError('Unexpected None for name: ' + name)
      else:
        self.SetProperty(name, value, clobber=False)
Updates properties in the configuration.

    Args:
      properties_to_update: Dict of properties to update.
        where,
        key = name of a property,
        value = property is set to this value.
      optional_properties_to_add: Map of properties to add
        only if it doesn't already exist in the file.

    Raises:
      LookupError: if a property lookup in optional_properties_to_add is None.
    
Updates properties in the configuration.
Updates properties in the configuration .
def Update(self, properties_to_update, optional_properties_to_add):
    for name, value in sorted(properties_to_update.iteritems()):
      if value is None:
        self.RemoveProperty(name)
      else:
        self.SetProperty(name, value)
    for name, value in sorted(optional_properties_to_add.iteritems()):
      if value is None:
        raise LookupError('Unexpected None for name: ' + name)
      else:
        self.SetProperty(name, value, clobber=False)
def Update ( self , properties_to_update , optional_properties_to_add ) : for name , value in sorted ( properties_to_update . iteritems ( ) ) : if value is None : self . RemoveProperty ( name ) else : self . SetProperty ( name , value ) for name , value in sorted ( optional_properties_to_add . iteritems ( ) ) : if value is None : raise LookupError ( 'Unexpected None for name: ' + name ) else : self . SetProperty ( name , value , clobber = False )
Updates properties in the configuration.
Updates properties in the configuration .
"""Updates properties in the configuration.

    Args:
      properties_to_update: Dict of properties to update.
        where,
        key = name of a property,
        value = property is set to this value.
      optional_properties_to_add: Map of properties to add
        only if it doesn't already exist in the file.

    Raises:
      LookupError: if a property lookup in optional_properties_to_add is None.
    """ # Iterate through the properties and update their values. # If value == None, we remove that property from the file. # For optional properties, we only insert values if there is no existing # value already; as such there is no such thing as optional removal # of an existing property.
if a property lookup in optional_properties_to_add is None.
if a property lookup in optional_properties_to_add is None .
LookupError
self
properties_to_update
Dict of properties to update.
where,
key = name of a property,
value = property is set to this value.
Dict of properties to update . where key = name of a property value = property is set to this value .
optional_properties_to_add
Map of properties to add
only if it doesn't already exist in the file.
Map of properties to add only if it doesn ' t already exist in the file .