19
19
20
20
package org .apache .iotdb .db .integration ;
21
21
22
+ import org .apache .iotdb .db .conf .IoTDBDescriptor ;
22
23
import org .apache .iotdb .db .engine .StorageEngine ;
23
24
import org .apache .iotdb .db .exception .metadata .IllegalPathException ;
24
25
import org .apache .iotdb .db .metadata .path .PartialPath ;
25
26
import org .apache .iotdb .db .utils .EnvironmentUtils ;
26
27
import org .apache .iotdb .itbase .category .LocalStandaloneTest ;
27
28
import org .apache .iotdb .jdbc .Config ;
28
29
29
- import ch .qos .logback .classic .Level ;
30
30
import org .junit .After ;
31
31
import org .junit .Before ;
32
32
import org .junit .Test ;
33
33
import org .junit .experimental .categories .Category ;
34
+ import org .slf4j .Logger ;
34
35
import org .slf4j .LoggerFactory ;
35
36
36
37
import java .sql .Connection ;
47
48
@ Category ({LocalStandaloneTest .class })
48
49
public class IoTDBRemovePartitionIT {
49
50
51
+ private static final Logger logger = LoggerFactory .getLogger (IoTDBRemovePartitionIT .class );
52
+
50
53
private static int partitionInterval = 100 ;
51
54
52
55
@ Before
53
56
public void setUp () throws Exception {
54
- ch .qos .logback .classic .Logger rootLogger =
55
- (ch .qos .logback .classic .Logger )
56
- LoggerFactory .getLogger (ch .qos .logback .classic .Logger .ROOT_LOGGER_NAME );
57
- rootLogger .setLevel (Level .toLevel ("trace" ));
58
57
EnvironmentUtils .envSetUp ();
59
58
StorageEngine .setEnablePartition (true );
60
59
StorageEngine .setTimePartitionInterval (partitionInterval );
@@ -70,6 +69,7 @@ public void tearDown() throws Exception {
70
69
71
70
@ Test
72
71
public void testRemoveNoPartition () throws IllegalPathException {
72
+ logger .warn ("running testRemoveNoPartition" );
73
73
StorageEngine .getInstance ()
74
74
.removePartitions (
75
75
new PartialPath ("root.test1" ), (storageGroupName , timePartitionId ) -> false );
@@ -94,6 +94,7 @@ public void testRemoveNoPartition() throws IllegalPathException {
94
94
95
95
@ Test
96
96
public void testRemovePartialPartition () throws IllegalPathException {
97
+ logger .warn ("running testRemovePartialPartition" );
97
98
StorageEngine .getInstance ()
98
99
.removePartitions (
99
100
new PartialPath ("root.test1" ),
@@ -133,6 +134,7 @@ public void testRemovePartialPartition() throws IllegalPathException {
133
134
134
135
@ Test
135
136
public void testRemoveAllPartition () throws IllegalPathException {
137
+ logger .warn ("running testRemoveAllPartition" );
136
138
StorageEngine .getInstance ()
137
139
.removePartitions (
138
140
new PartialPath ("root.test1" ), (storageGroupName , timePartitionId ) -> true );
@@ -151,6 +153,7 @@ public void testRemoveAllPartition() throws IllegalPathException {
151
153
152
154
@ Test
153
155
public void testSQLRemovePartition () {
156
+ logger .warn ("running testSQLRemovePartition" );
154
157
try (Connection connection =
155
158
DriverManager .getConnection (
156
159
Config .IOTDB_URL_PREFIX + "127.0.0.1:6667/" , "root" , "root" );
@@ -172,6 +175,7 @@ public void testSQLRemovePartition() {
172
175
173
176
@ Test
174
177
public void testRemoveOnePartitionAndInsertData () {
178
+ logger .warn ("running testRemoveOnePartitionAndInsertData" );
175
179
try (Connection connection =
176
180
DriverManager .getConnection (
177
181
Config .IOTDB_URL_PREFIX + "127.0.0.1:6667/" , "root" , "root" );
@@ -196,6 +200,7 @@ public void testRemoveOnePartitionAndInsertData() {
196
200
197
201
@ Test
198
202
public void testRemovePartitionAndInsertUnSeqDataAndMerge () {
203
+ logger .warn ("running testRemovePartitionAndInsertUnSeqDataAndMerge" );
199
204
try (Connection connection =
200
205
DriverManager .getConnection (
201
206
Config .IOTDB_URL_PREFIX + "127.0.0.1:6667/" , "root" , "root" );
@@ -225,6 +230,7 @@ public void testRemovePartitionAndInsertUnSeqDataAndMerge() {
225
230
226
231
@ Test
227
232
public void testRemovePartitionAndInsertUnSeqDataAndUnSeqDataMerge () {
233
+ logger .warn ("running testRemovePartitionAndInsertUnSeqDataAndUnSeqDataMerge" );
228
234
try (Connection connection =
229
235
DriverManager .getConnection (
230
236
Config .IOTDB_URL_PREFIX + "127.0.0.1:6667/" , "root" , "root" );
@@ -254,6 +260,7 @@ public void testRemovePartitionAndInsertUnSeqDataAndUnSeqDataMerge() {
254
260
255
261
@ Test
256
262
public void testFlushAndRemoveOnePartitionAndInsertData () {
263
+ logger .warn ("running testFlushAndRemoveOnePartitionAndInsertData" );
257
264
try (Connection connection =
258
265
DriverManager .getConnection (
259
266
Config .IOTDB_URL_PREFIX + "127.0.0.1:6667/" , "root" , "root" );
@@ -312,6 +319,9 @@ private static void insertData() throws ClassNotFoundException {
312
319
}
313
320
}
314
321
Class .forName (Config .JDBC_DRIVER_NAME );
322
+ IoTDBDescriptor .getInstance ().getConfig ().setEnableSeqSpaceCompaction (false );
323
+ IoTDBDescriptor .getInstance ().getConfig ().setEnableUnseqSpaceCompaction (false );
324
+ IoTDBDescriptor .getInstance ().getConfig ().setEnableCrossSpaceCompaction (false );
315
325
try (Connection connection =
316
326
DriverManager .getConnection (
317
327
Config .IOTDB_URL_PREFIX + "127.0.0.1:6667/" , "root" , "root" );
0 commit comments