Skip to content

Commit 2f42d8c

Browse files
committed
5.0 formatting
1 parent 8891565 commit 2f42d8c

22 files changed

Lines changed: 135 additions & 241 deletions

.circleci/config.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ jobs:
220220
resource_class: medium
221221
working_directory: ~/
222222
shell: /bin/bash -eo pipefail -l
223-
parallelism: 1
223+
parallelism: 4
224224
steps:
225225
- attach_workspace:
226226
at: /home/cassandra
@@ -338,7 +338,7 @@ jobs:
338338
resource_class: medium
339339
working_directory: ~/
340340
shell: /bin/bash -eo pipefail -l
341-
parallelism: 1
341+
parallelism: 4
342342
steps:
343343
- attach_workspace:
344344
at: /home/cassandra
@@ -625,7 +625,7 @@ jobs:
625625
resource_class: medium
626626
working_directory: ~/
627627
shell: /bin/bash -eo pipefail -l
628-
parallelism: 1
628+
parallelism: 4
629629
steps:
630630
- attach_workspace:
631631
at: /home/cassandra
@@ -3788,7 +3788,7 @@ jobs:
37883788
resource_class: medium
37893789
working_directory: ~/
37903790
shell: /bin/bash -eo pipefail -l
3791-
parallelism: 1
3791+
parallelism: 4
37923792
steps:
37933793
- attach_workspace:
37943794
at: /home/cassandra
@@ -4100,7 +4100,7 @@ jobs:
41004100
resource_class: medium
41014101
working_directory: ~/
41024102
shell: /bin/bash -eo pipefail -l
4103-
parallelism: 1
4103+
parallelism: 4
41044104
steps:
41054105
- run:
41064106
name: Log Environment Information
@@ -4413,7 +4413,7 @@ jobs:
44134413
resource_class: medium
44144414
working_directory: ~/
44154415
shell: /bin/bash -eo pipefail -l
4416-
parallelism: 1
4416+
parallelism: 4
44174417
steps:
44184418
- attach_workspace:
44194419
at: /home/cassandra
@@ -4530,7 +4530,7 @@ jobs:
45304530
resource_class: medium
45314531
working_directory: ~/
45324532
shell: /bin/bash -eo pipefail -l
4533-
parallelism: 1
4533+
parallelism: 4
45344534
steps:
45354535
- attach_workspace:
45364536
at: /home/cassandra
@@ -4781,7 +4781,7 @@ jobs:
47814781
resource_class: medium
47824782
working_directory: ~/
47834783
shell: /bin/bash -eo pipefail -l
4784-
parallelism: 1
4784+
parallelism: 4
47854785
steps:
47864786
- attach_workspace:
47874787
at: /home/cassandra
@@ -4885,7 +4885,7 @@ jobs:
48854885
resource_class: medium
48864886
working_directory: ~/
48874887
shell: /bin/bash -eo pipefail -l
4888-
parallelism: 1
4888+
parallelism: 4
48894889
steps:
48904890
- attach_workspace:
48914891
at: /home/cassandra
@@ -5046,7 +5046,7 @@ jobs:
50465046
resource_class: medium
50475047
working_directory: ~/
50485048
shell: /bin/bash -eo pipefail -l
5049-
parallelism: 1
5049+
parallelism: 4
50505050
steps:
50515051
- attach_workspace:
50525052
at: /home/cassandra
@@ -5278,7 +5278,7 @@ jobs:
52785278
resource_class: medium
52795279
working_directory: ~/
52805280
shell: /bin/bash -eo pipefail -l
5281-
parallelism: 1
5281+
parallelism: 4
52825282
steps:
52835283
- attach_workspace:
52845284
at: /home/cassandra
@@ -6444,7 +6444,7 @@ jobs:
64446444
resource_class: medium
64456445
working_directory: ~/
64466446
shell: /bin/bash -eo pipefail -l
6447-
parallelism: 1
6447+
parallelism: 4
64486448
steps:
64496449
- attach_workspace:
64506450
at: /home/cassandra
@@ -6997,7 +6997,7 @@ jobs:
69976997
resource_class: medium
69986998
working_directory: ~/
69996999
shell: /bin/bash -eo pipefail -l
7000-
parallelism: 1
7000+
parallelism: 4
70017001
steps:
70027002
- attach_workspace:
70037003
at: /home/cassandra
@@ -7502,7 +7502,7 @@ jobs:
75027502
resource_class: medium
75037503
working_directory: ~/
75047504
shell: /bin/bash -eo pipefail -l
7505-
parallelism: 1
7505+
parallelism: 4
75067506
steps:
75077507
- attach_workspace:
75087508
at: /home/cassandra
@@ -7843,7 +7843,7 @@ jobs:
78437843
resource_class: medium
78447844
working_directory: ~/
78457845
shell: /bin/bash -eo pipefail -l
7846-
parallelism: 1
7846+
parallelism: 4
78477847
steps:
78487848
- attach_workspace:
78497849
at: /home/cassandra
@@ -7914,7 +7914,7 @@ jobs:
79147914
resource_class: medium
79157915
working_directory: ~/
79167916
shell: /bin/bash -eo pipefail -l
7917-
parallelism: 1
7917+
parallelism: 4
79187918
steps:
79197919
- run:
79207920
name: Log Environment Information
@@ -8196,7 +8196,7 @@ jobs:
81968196
resource_class: medium
81978197
working_directory: ~/
81988198
shell: /bin/bash -eo pipefail -l
8199-
parallelism: 1
8199+
parallelism: 4
82008200
steps:
82018201
- attach_workspace:
82028202
at: /home/cassandra
@@ -8833,7 +8833,7 @@ jobs:
88338833
resource_class: medium
88348834
working_directory: ~/
88358835
shell: /bin/bash -eo pipefail -l
8836-
parallelism: 1
8836+
parallelism: 4
88378837
steps:
88388838
- attach_workspace:
88398839
at: /home/cassandra

src/java/org/apache/cassandra/config/Config.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,10 @@ public MemtableOptions()
353353

354354
// The number of executors to use for building secondary indexes
355355
public volatile int concurrent_index_builders = 2;
356-
public volatile double incremental_repair_disk_headroom_reject_ratio = 0.2; // at least 20% of disk must be unused to run incremental repair
356+
357+
// at least 20% of disk must be unused to run incremental repair
358+
// if you want to disable this feature (the recommendation is not to, but if you want to disable it for whatever reason) then set the ratio to 0.0
359+
public volatile double incremental_repair_disk_headroom_reject_ratio = 0.2;
357360

358361
/**
359362
* @deprecated retry support removed on CASSANDRA-10992

src/java/org/apache/cassandra/config/YamlConfigurationLoader.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,4 +455,3 @@ public static LoaderOptions getDefaultLoaderOptions()
455455
return loaderOptions;
456456
}
457457
}
458-

src/java/org/apache/cassandra/cql3/statements/schema/TableAttributes.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import org.apache.cassandra.cql3.statements.PropertyDefinitions;
2727
import org.apache.cassandra.exceptions.ConfigurationException;
28-
import org.apache.cassandra.exceptions.SyntaxException;
2928
import org.apache.cassandra.repair.autorepair.AutoRepairConfig;
3029
import org.apache.cassandra.schema.AutoRepairParams;
3130
import org.apache.cassandra.schema.CachingParams;

src/java/org/apache/cassandra/db/streaming/CassandraStreamReceiver.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
import java.util.List;
2424
import java.util.Set;
2525

26+
import com.google.common.annotations.VisibleForTesting;
2627
import com.google.common.base.Preconditions;
2728
import com.google.common.collect.Iterables;
2829

29-
import org.apache.cassandra.config.CassandraRelevantProperties;
3030
import org.apache.cassandra.db.lifecycle.LifecycleNewTracker;
3131
import org.apache.cassandra.io.sstable.SSTable;
3232

@@ -39,7 +39,6 @@
3939
import org.apache.cassandra.db.Mutation;
4040
import org.apache.cassandra.db.compaction.OperationType;
4141
import org.apache.cassandra.db.filter.ColumnFilter;
42-
import org.apache.cassandra.db.lifecycle.LifecycleNewTracker;
4342
import org.apache.cassandra.db.lifecycle.LifecycleTransaction;
4443
import org.apache.cassandra.db.partitions.PartitionUpdate;
4544
import org.apache.cassandra.db.rows.ThrottledUnfilteredIterator;
@@ -48,7 +47,6 @@
4847
import org.apache.cassandra.dht.Bounds;
4948
import org.apache.cassandra.dht.Token;
5049
import org.apache.cassandra.io.sstable.ISSTableScanner;
51-
import org.apache.cassandra.io.sstable.SSTable;
5250
import org.apache.cassandra.io.sstable.SSTableMultiWriter;
5351
import org.apache.cassandra.io.sstable.format.SSTableReader;
5452
import org.apache.cassandra.streaming.IncomingStream;
@@ -195,6 +193,7 @@ private boolean cdcRequiresWriteCommitLog(ColumnFamilyStore cfs)
195193
* For CDC-enabled tables and write path for CDC is enabled, we want to ensure that the mutations are
196194
* run through the CommitLog, so they can be archived by the CDC process on discard.
197195
*/
196+
@VisibleForTesting
198197
public boolean requiresWritePath(ColumnFamilyStore cfs)
199198
{
200199
return cdcRequiresWriteCommitLog(cfs)

src/java/org/apache/cassandra/repair/autorepair/AutoRepairKeyspace.java

Lines changed: 0 additions & 84 deletions
This file was deleted.

src/java/org/apache/cassandra/repair/autorepair/AutoRepairUtils.java

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import org.apache.cassandra.locator.NetworkTopologyStrategy;
5454
import org.apache.cassandra.schema.Schema;
5555
import org.apache.cassandra.schema.SchemaConstants;
56+
import org.apache.cassandra.schema.SystemDistributedKeyspace;
5657
import org.apache.cassandra.schema.TableMetadata;
5758
import org.apache.cassandra.schema.ViewMetadata;
5859
import org.apache.cassandra.serializers.SetSerializer;
@@ -96,56 +97,56 @@ public class AutoRepairUtils
9697

9798
final static String SELECT_REPAIR_HISTORY = String.format(
9899
"SELECT * FROM %s.%s WHERE %s = ?", SchemaConstants.DISTRIBUTED_KEYSPACE_NAME,
99-
AutoRepairKeyspace.AUTO_REPAIR_HISTORY, COL_REPAIR_TYPE);
100+
SystemDistributedKeyspace.AUTO_REPAIR_HISTORY, COL_REPAIR_TYPE);
100101
final static String SELECT_REPAIR_PRIORITY = String.format(
101102
"SELECT * FROM %s.%s WHERE %s = ?", SchemaConstants.DISTRIBUTED_KEYSPACE_NAME,
102-
AutoRepairKeyspace.AUTO_REPAIR_PRIORITY, COL_REPAIR_TYPE);
103+
SystemDistributedKeyspace.AUTO_REPAIR_PRIORITY, COL_REPAIR_TYPE);
103104
final static String DEL_REPAIR_PRIORITY = String.format(
104105
"DELETE %s[?] FROM %s.%s WHERE %s = ?", COL_REPAIR_PRIORITY, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME,
105-
AutoRepairKeyspace.AUTO_REPAIR_PRIORITY, COL_REPAIR_TYPE);
106+
SystemDistributedKeyspace.AUTO_REPAIR_PRIORITY, COL_REPAIR_TYPE);
106107
final static String ADD_PRIORITY_HOST = String.format(
107108
"UPDATE %s.%s SET %s = %s + ? WHERE %s = ?", SchemaConstants.DISTRIBUTED_KEYSPACE_NAME,
108-
AutoRepairKeyspace.AUTO_REPAIR_PRIORITY, COL_REPAIR_PRIORITY, COL_REPAIR_PRIORITY, COL_REPAIR_TYPE);
109+
SystemDistributedKeyspace.AUTO_REPAIR_PRIORITY, COL_REPAIR_PRIORITY, COL_REPAIR_PRIORITY, COL_REPAIR_TYPE);
109110

110111
final static String INSERT_NEW_REPAIR_HISTORY = String.format(
111112
"INSERT INTO %s.%s (%s, %s, %s, %s, %s, %s) values (?, ? ,?, ?, {}, ?) IF NOT EXISTS",
112-
SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, AutoRepairKeyspace.AUTO_REPAIR_HISTORY, COL_REPAIR_TYPE,
113+
SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, SystemDistributedKeyspace.AUTO_REPAIR_HISTORY, COL_REPAIR_TYPE,
113114
COL_HOST_ID, COL_REPAIR_START_TS, COL_REPAIR_FINISH_TS, COL_DELETE_HOSTS, COL_DELETE_HOSTS_UPDATE_TIME);
114115

115116
final static String ADD_HOST_ID_TO_DELETE_HOSTS = String.format(
116117
"UPDATE %s.%s SET %s = %s + ?, %s = ? WHERE %s = ? AND %s = ? IF EXISTS"
117-
, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, AutoRepairKeyspace.AUTO_REPAIR_HISTORY, COL_DELETE_HOSTS,
118+
, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, SystemDistributedKeyspace.AUTO_REPAIR_HISTORY, COL_DELETE_HOSTS,
118119
COL_DELETE_HOSTS, COL_DELETE_HOSTS_UPDATE_TIME, COL_REPAIR_TYPE, COL_HOST_ID);
119120

120121
final static String DEL_AUTO_REPAIR_HISTORY = String.format(
121122
"DELETE FROM %s.%s WHERE %s = ? AND %s = ?"
122-
, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, AutoRepairKeyspace.AUTO_REPAIR_HISTORY, COL_REPAIR_TYPE,
123+
, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, SystemDistributedKeyspace.AUTO_REPAIR_HISTORY, COL_REPAIR_TYPE,
123124
COL_HOST_ID);
124125

125126
final static String RECORD_START_REPAIR_HISTORY = String.format(
126127
"UPDATE %s.%s SET %s= ?, repair_turn = ? WHERE %s = ? AND %s = ?"
127-
, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, AutoRepairKeyspace.AUTO_REPAIR_HISTORY, COL_REPAIR_START_TS,
128+
, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, SystemDistributedKeyspace.AUTO_REPAIR_HISTORY, COL_REPAIR_START_TS,
128129
COL_REPAIR_TYPE, COL_HOST_ID);
129130

130131
final static String RECORD_FINISH_REPAIR_HISTORY = String.format(
131132

132133
"UPDATE %s.%s SET %s= ?, %s=false WHERE %s = ? AND %s = ?"
133-
, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, AutoRepairKeyspace.AUTO_REPAIR_HISTORY, COL_REPAIR_FINISH_TS,
134+
, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, SystemDistributedKeyspace.AUTO_REPAIR_HISTORY, COL_REPAIR_FINISH_TS,
134135
COL_FORCE_REPAIR, COL_REPAIR_TYPE, COL_HOST_ID);
135136

136137
final static String CLEAR_DELETE_HOSTS = String.format(
137138
"UPDATE %s.%s SET %s= {} WHERE %s = ? AND %s = ?"
138-
, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, AutoRepairKeyspace.AUTO_REPAIR_HISTORY, COL_DELETE_HOSTS,
139+
, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, SystemDistributedKeyspace.AUTO_REPAIR_HISTORY, COL_DELETE_HOSTS,
139140
COL_REPAIR_TYPE, COL_HOST_ID);
140141

141142
final static String SET_FORCE_REPAIR = String.format(
142143
"UPDATE %s.%s SET %s=true WHERE %s = ? AND %s = ?"
143-
, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, AutoRepairKeyspace.AUTO_REPAIR_HISTORY, COL_FORCE_REPAIR,
144+
, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, SystemDistributedKeyspace.AUTO_REPAIR_HISTORY, COL_FORCE_REPAIR,
144145
COL_REPAIR_TYPE, COL_HOST_ID);
145146

146147
final static String SELECT_LAST_REPAIR_TIME_FOR_NODE = String.format(
147148
"SELECT %s FROM %s.%s WHERE %s = ? AND %s = ?", COL_REPAIR_FINISH_TS, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME,
148-
AutoRepairKeyspace.AUTO_REPAIR_HISTORY, COL_REPAIR_TYPE, COL_HOST_ID);
149+
SystemDistributedKeyspace.AUTO_REPAIR_HISTORY, COL_REPAIR_TYPE, COL_HOST_ID);
149150

150151
static ModificationStatement delStatementRepairHistory;
151152
static SelectStatement selectStatementRepairHistory;

0 commit comments

Comments
 (0)