Class AffinityPlacementConfig

    • Field Detail

      • DEFAULT_MINIMAL_FREE_DISK_GB

        public static final long DEFAULT_MINIMAL_FREE_DISK_GB
        See Also:
        Constant Field Values
      • DEFAULT_PRIORITIZED_FREE_DISK_GB

        public static final long DEFAULT_PRIORITIZED_FREE_DISK_GB
        See Also:
        Constant Field Values
      • AVAILABILITY_ZONE_SYSPROP

        public static final String AVAILABILITY_ZONE_SYSPROP
        Name of the system property on a node indicating which (public cloud) Availability Zone that node is in. The value is any string, different strings denote different availability zones.

        Nodes on which this system property is not defined are considered being in the same Availability Zone UNDEFINED_AVAILABILITY_ZONE (hopefully the value of this constant is not the name of a real Availability Zone :).

        See Also:
        Constant Field Values
      • REPLICA_TYPE_SYSPROP

        public static final String REPLICA_TYPE_SYSPROP
        Name of the system property on a node indicating the type of replicas allowed on that node. The value of that system property is a comma separated list or a single string of value names of Replica.ReplicaType (case insensitive). If that property is not defined, that node is considered accepting all replica types (i.e. undefined is equivalent to "NRT,Pull,tlog").
        See Also:
        Constant Field Values
      • NODE_TYPE_SYSPROP

        public static final String NODE_TYPE_SYSPROP
        Name of the system property on a node indicating the arbitrary "node type" (for example, a node more suitable for the indexing work load could be labeled as node_type: indexing). The value of this system property is a comma-separated list or a single label (labels must not contain commas), which represent a logical OR for the purpose of placement.
        See Also:
        Constant Field Values
      • UNDEFINED_AVAILABILITY_ZONE

        public static final String UNDEFINED_AVAILABILITY_ZONE
        This is the "AZ" name for nodes that do not define an AZ. Should not match a real AZ name (I think we're safe)
        See Also:
        Constant Field Values
      • minimalFreeDiskGB

        public long minimalFreeDiskGB
        If a node has strictly less GB of free disk than this value, the node is excluded from assignment decisions. Set to 0 or less to disable.
      • prioritizedFreeDiskGB

        public long prioritizedFreeDiskGB
        Replica allocation will assign replicas to nodes with at least this number of GB of free disk space regardless of the number of cores on these nodes rather than assigning replicas to nodes with less than this amount of free disk space if that's an option (if that's not an option, replicas can still be assigned to nodes with less than this amount of free space).
      • withCollection

        public Map<String,​String> withCollection
        This property defines an additional constraint that primary collections (keys) should be located on the same nodes as the secondary collections (values). The plugin will assume that the secondary collection replicas are already in place and ignore candidate nodes where they are not already present.
      • collectionNodeType

        public Map<String,​String> collectionNodeType
        This property defines an additional constraint that the collection must be placed only on the nodes of the correct "node type". The nodes can specify what type they are (one or several types, using a comma-separated list) by defining the NODE_TYPE_SYSPROP system property. Similarly, the plugin can be configured to specify that a collection (key in the map) must be placed on one or more node type (value in the map, using comma-separated list of acceptable node types).
    • Constructor Detail

      • AffinityPlacementConfig

        public AffinityPlacementConfig()
        Zero-arguments public constructor required for deserialization - don't use.
      • AffinityPlacementConfig

        public AffinityPlacementConfig​(long minimalFreeDiskGB,
                                       long prioritizedFreeDiskGB)
        Configuration for the AffinityPlacementFactory.
        Parameters:
        minimalFreeDiskGB - minimal free disk GB.
        prioritizedFreeDiskGB - prioritized free disk GB.
      • AffinityPlacementConfig

        public AffinityPlacementConfig​(long minimalFreeDiskGB,
                                       long prioritizedFreeDiskGB,
                                       Map<String,​String> withCollection,
                                       Map<String,​String> collectionNodeType)
        Configuration for the AffinityPlacementFactory.
        Parameters:
        minimalFreeDiskGB - minimal free disk GB.
        prioritizedFreeDiskGB - prioritized free disk GB.
        withCollection - configuration of co-located collections: keys are primary collection names and values are secondary collection names.
        collectionNodeType - configuration of reequired node types per collection. Keys are collection names and values are comma-separated lists of required node types.