Files
scylladb/locator
Vlad Zolotarov cbbdcad649 locator: gossiping_property_file_snitch
Reads the configuration from cassandra-rackdc.properties.
This file may include the following fields:
   - dc: Local Data Center name
   - rack: Local Rack name
   - prefer_local: A boolean value that defines if cluster should prefer
                   local address - relevant for AWS cloud.

Class will schedule a timer that will re-read the property file and inform a
Gossiper if there are changes in the local configuration.

Differences from the Origin C* implementation:
   - No support for a legacy property_file_snitch.
   - Class supports overriding the property file name in a constructor.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>

New in v4:
   - Fix a debug compilation: define reload_property_file_period() to be a constexpr
     method instead of a member.
   - Don't stop() the snitch when snitch_is_ready is set to an exceptional state.

New in v2:
   - Adjust to new file interface.
   - Futurize reload_propery_file().
   - Use trim() and split() from boost::algorithm.
   - Read optimization and logging:
      - Re-read the file only if it was changed since the last read.
      - Use logging facilities from log.hh.
   - Cleanups:
      - Introduce bad_property_file_error exception.
      - Remove unnecessary check after dma_read_exactly() call.
   - Styling.
   - Copyright.
   - Move most of the functions implementation into the .cc file.
   - Added stop() method.
2015-06-09 15:33:38 +03:00
..