Class: PartitionGardener::DateRangeMaintenance
- Inherits:
-
Object
- Object
- PartitionGardener::DateRangeMaintenance
show all
- Includes:
- Naming
- Defined in:
- lib/partition_gardener/date_range_maintenance.rb
Instance Method Summary
collapse
Methods included from Naming
current_partition_name, default_partition_name, future_partition_name, open_partition_name, rebalance_staging_partition_name
Constructor Details
#initialize(config, job_class_name: "PartitionGardener", executor: nil) ⇒ DateRangeMaintenance
Returns a new instance of DateRangeMaintenance.
5
6
7
8
9
|
# File 'lib/partition_gardener/date_range_maintenance.rb', line 5
def initialize(config, job_class_name: "PartitionGardener", executor: nil)
@config = config
@job_class_name = job_class_name
@executor = executor || Executor.for_config(config)
end
|
Instance Method Details
#collapse_low_volume_future_month_partitions ⇒ Object
30
31
32
|
# File 'lib/partition_gardener/date_range_maintenance.rb', line 30
def collapse_low_volume_future_month_partitions
rebalance_tail!
end
|
#run! ⇒ Object
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/partition_gardener/date_range_maintenance.rb', line 11
def run!
report_audit_warnings
ensure_default_partition
unless MaintenanceBackend.hybrid?(@config)
finalize_archive_partitions
apply_archive_retention!
end
rebalance_tail!
drain_default_partition
end
|
#split_future_month_from_current!(_identifier = nil) ⇒ Object
22
23
24
|
# File 'lib/partition_gardener/date_range_maintenance.rb', line 22
def split_future_month_from_current!(_identifier = nil)
rebalance_tail!
end
|
#split_pressured_future_month_partitions ⇒ Object
26
27
28
|
# File 'lib/partition_gardener/date_range_maintenance.rb', line 26
def split_pressured_future_month_partitions
rebalance_tail!
end
|