Skip to content

Commit 13e50a9

Browse files
committed
Reverted cassandra-topology.properties and GuardrailAllowUncompressedTablesTest
1 parent 40d37a2 commit 13e50a9

File tree

2 files changed

+48
-5
lines changed

2 files changed

+48
-5
lines changed
Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,45 @@
1-
127.0.0.1\:7012=DC1:RAC1
2-
127.0.0.99\:7012=OTHER_DC1:OTHER_RAC1
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Cassandra Node IP=Data Center:Rack
18+
192.168.1.100=DC1:RAC1
19+
192.168.2.200=DC2:RAC2
20+
21+
10.0.0.10=DC1:RAC1
22+
10.0.0.11=DC1:RAC1
23+
10.0.0.12=DC1:RAC2
24+
25+
10.20.114.10=DC2:RAC1
26+
10.20.114.11=DC2:RAC1
27+
28+
10.21.119.13=DC3:RAC1
29+
10.21.119.10=DC3:RAC1
30+
31+
10.0.0.13=DC1:RAC2
32+
10.21.119.14=DC3:RAC2
33+
10.20.114.15=DC2:RAC2
34+
35+
127.0.0.1=DC1:RAC1
36+
127.0.0.2=DC1:RAC2
37+
127.0.0.3=DC1:RAC3
38+
127.0.0.4=DC2:RAC4
39+
127.0.0.5=DC2:RAC5
40+
127.0.0.6=DC3:RAC6
41+
127.0.0.7=DC3:RAC7
42+
127.0.0.8=DC3:RAC8
43+
44+
# default for unknown nodes
45+
default=DC1:r1

test/unit/org/apache/cassandra/db/guardrails/GuardrailAllowUncompressedTablesTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void createFailure() throws Throwable
5252
{
5353
setGuardrail(false);
5454
String table = createTableName();
55-
assertFails(String.format("CREATE TABLE %s.%s (k int primary key, v int) WITH compression={'enabled':false}", KEYSPACE, table), "Uncompressed table is not allowed");
55+
assertFails(String.format("CREATE TABLE %s.%s (k int primary key, v int) WITH compression={'enabled': false}", KEYSPACE, table), "Uncompressed table is not allowed");
5656
}
5757

5858
@Test
@@ -61,7 +61,7 @@ public void alterSuccess()
6161
setGuardrail(true);
6262
String table = createTableName();
6363
schemaChange(String.format("CREATE TABLE %s.%s (k int primary key, v int)", KEYSPACE, table));
64-
schemaChange(String.format("ALTER TABLE %s.%s WITH compression = { 'enabled': false }", KEYSPACE, table));
64+
schemaChange(String.format("ALTER TABLE %s.%s WITH compression = {'enabled': false}", KEYSPACE, table));
6565
TableMetadata tmd = Schema.instance.getTableMetadata(KEYSPACE, table);
6666
Assert.assertFalse(tmd.params.compression.isEnabled());
6767
}
@@ -72,6 +72,6 @@ public void alterFailure() throws Throwable
7272
setGuardrail(false);
7373
String table = createTableName();
7474
schemaChange(String.format("CREATE TABLE %s.%s (k int primary key, v int)", KEYSPACE, table));
75-
assertFails(String.format("ALTER TABLE %s.%s WITH compression = { 'enabled': false }", KEYSPACE, table), "Uncompressed table is not allowed");
75+
assertFails(String.format("ALTER TABLE %s.%s WITH compression = {'enabled': false}", KEYSPACE, table), "Uncompressed table is not allowed");
7676
}
7777
}

0 commit comments

Comments
 (0)