@@ -145,12 +145,12 @@ private static void prepareData() throws Exception {
145145 schemaPartitionTable = schemaPartitionTableResp .getSchemaPartitionTable ();
146146 for (int i = 0 ; i < 2 ; i ++) {
147147 Assert .assertTrue (schemaPartitionTable .containsKey (db + i ));
148- Assert .assertEquals (2 , schemaPartitionTable .get (sg + i ).size ());
148+ Assert .assertEquals (2 , schemaPartitionTable .get (db + i ).size ());
149149 }
150150
151151 /* Create DataPartitions */
152152 for (int i = 0 ; i < databaseNum ; i ++) {
153- String database = sg + i ;
153+ String database = db + i ;
154154 for (int j = 0 ; j < testSeriesPartitionSlotNum ; j += seriesPartitionBatchSize ) {
155155 for (long k = 0 ; k < testTimePartitionSlotsNum ; k += timePartitionBatchSize ) {
156156 Map <String , Map <TSeriesPartitionSlot , TTimeSlotList >> partitionSlotsMap =
@@ -202,11 +202,11 @@ private static void prepareData() throws Exception {
202202
203203 @ Test
204204 public void testGetSchemaPartition () throws Exception {
205- final String sg = "root.db" ;
206- final String sg0 = "root.db0" ;
207- final String sg1 = "root.db1" ;
205+ final String db = "root.db" ;
206+ final String db0 = "root.db0" ;
207+ final String db1 = "root.db1" ;
208208
209- final String d11 = sg1 + ".d1.s" ;
209+ final String d11 = db1 + ".d1.s" ;
210210
211211 final String allPaths = "root.db*" ;
212212 final String allSg0 = "root.db0.**" ;
@@ -240,8 +240,8 @@ public void testGetSchemaPartition() throws Exception {
240240 Assert .assertEquals (2 , schemaPartitionTableResp .getSchemaPartitionTableSize ());
241241 schemaPartitionTable = schemaPartitionTableResp .getSchemaPartitionTable ();
242242 for (int i = 0 ; i < 2 ; i ++) {
243- Assert .assertTrue (schemaPartitionTable .containsKey (sg + i ));
244- Assert .assertEquals (2 , schemaPartitionTable .get (sg + i ).size ());
243+ Assert .assertTrue (schemaPartitionTable .containsKey (db + i ));
244+ Assert .assertEquals (2 , schemaPartitionTable .get (db + i ).size ());
245245 }
246246
247247 // Test getSchemaPartition, when a device path matches with a Database and end with "*",
@@ -255,11 +255,11 @@ public void testGetSchemaPartition() throws Exception {
255255 Assert .assertEquals (2 , schemaPartitionTableResp .getSchemaPartitionTableSize ());
256256 schemaPartitionTable = schemaPartitionTableResp .getSchemaPartitionTable ();
257257 // Check "root.db0"
258- Assert .assertTrue (schemaPartitionTable .containsKey (sg0 ));
259- Assert .assertEquals (2 , schemaPartitionTable .get (sg0 ).size ());
258+ Assert .assertTrue (schemaPartitionTable .containsKey (db0 ));
259+ Assert .assertEquals (2 , schemaPartitionTable .get (db0 ).size ());
260260 // Check "root.db1"
261- Assert .assertTrue (schemaPartitionTable .containsKey (sg1 ));
262- Assert .assertEquals (1 , schemaPartitionTable .get (sg1 ).size ());
261+ Assert .assertTrue (schemaPartitionTable .containsKey (db1 ));
262+ Assert .assertEquals (1 , schemaPartitionTable .get (db1 ).size ());
263263 }
264264 }
265265
@@ -276,7 +276,7 @@ public void testGetDataPartition() throws Exception {
276276 // Prepare partitionSlotsMap
277277 Map <String , Map <TSeriesPartitionSlot , TTimeSlotList >> partitionSlotsMap =
278278 ConfigNodeTestUtils .constructPartitionSlotsMap (
279- sg + 10 , 0 , 10 , 0 , 10 , testTimePartitionInterval );
279+ db + 10 , 0 , 10 , 0 , 10 , testTimePartitionInterval );
280280
281281 // Test getDataPartitionTable, the result should be empty
282282 dataPartitionReq = new TDataPartitionReq (partitionSlotsMap );
@@ -299,7 +299,7 @@ public void testGetDataPartition() throws Exception {
299299 leastDataRegionGroupNum = Math .min (leastDataRegionGroupNum , testDataRegionGroupPerDatabase );
300300
301301 for (int i = 0 ; i < databaseNum ; i ++) {
302- String database = sg + i ;
302+ String database = db + i ;
303303 for (int j = 0 ; j < testSeriesPartitionSlotNum ; j += seriesPartitionBatchSize ) {
304304 for (long k = 0 ; k < testTimePartitionSlotsNum ; k += timePartitionBatchSize ) {
305305 partitionSlotsMap =
@@ -344,13 +344,13 @@ public void testGetDataPartition() throws Exception {
344344
345345 @ Test
346346 public void testGetSlots () throws Exception {
347- final String sg0 = "root.db0" ;
348- final String sg1 = "root.db1" ;
347+ final String db0 = "root.db0" ;
348+ final String db1 = "root.db1" ;
349349
350- final IDeviceID d00 = Factory .DEFAULT_FACTORY .create (sg0 + ".d0.s" );
351- final IDeviceID d01 = Factory .DEFAULT_FACTORY .create (sg0 + ".d1.s" );
352- final IDeviceID d10 = Factory .DEFAULT_FACTORY .create (sg1 + ".d0.s" );
353- final IDeviceID d11 = Factory .DEFAULT_FACTORY .create (sg1 + ".d1.s" );
350+ final IDeviceID d00 = Factory .DEFAULT_FACTORY .create (db0 + ".d0.s" );
351+ final IDeviceID d01 = Factory .DEFAULT_FACTORY .create (db0 + ".d1.s" );
352+ final IDeviceID d10 = Factory .DEFAULT_FACTORY .create (db1 + ".d0.s" );
353+ final IDeviceID d11 = Factory .DEFAULT_FACTORY .create (db1 + ".d1.s" );
354354
355355 IDeviceID [] devices = new IDeviceID [] {d00 , d01 , d10 , d11 };
356356
@@ -363,7 +363,7 @@ public void testGetSlots() throws Exception {
363363
364364 // Get RegionIds of specified database and timestamp
365365 getRegionIdReq = new TGetRegionIdReq (TConsensusGroupType .DataRegion );
366- getRegionIdReq .setDatabase (sg0 );
366+ getRegionIdReq .setDatabase (db0 );
367367 getRegionIdReq .setStartTimeSlot (new TTimePartitionSlot (0 ));
368368 getRegionIdReq .setEndTimeSlot (new TTimePartitionSlot (0 ));
369369 getRegionIdResp = client .getRegionId (getRegionIdReq );
@@ -394,7 +394,7 @@ public void testGetSlots() throws Exception {
394394
395395 // Get all RegionIds within database
396396 for (int i = 0 ; i < databaseNum ; i ++) {
397- String curSg = sg + i ;
397+ String curSg = db + i ;
398398 getRegionIdReq = new TGetRegionIdReq (TConsensusGroupType .DataRegion );
399399 getRegionIdReq .setDatabase (curSg );
400400 getRegionIdResp = client .getRegionId (getRegionIdReq );
@@ -443,7 +443,7 @@ public void testGetSlots() throws Exception {
443443 }
444444
445445 // Get RegionId of SchemaPartition
446- getRegionIdReq .setDatabase (sg0 );
446+ getRegionIdReq .setDatabase (db0 );
447447 getRegionIdReq .setType (TConsensusGroupType .SchemaRegion );
448448 getRegionIdResp = client .getRegionId (getRegionIdReq );
449449 Assert .assertEquals (
@@ -453,7 +453,7 @@ public void testGetSlots() throws Exception {
453453 TGetTimeSlotListReq getTimeSlotListReq ;
454454 TGetTimeSlotListResp getTimeSlotListResp ;
455455 getTimeSlotListReq = new TGetTimeSlotListReq ();
456- getTimeSlotListReq .setDatabase (sg0 );
456+ getTimeSlotListReq .setDatabase (db0 );
457457 getTimeSlotListResp = client .getTimeSlotList (getTimeSlotListReq );
458458 Assert .assertEquals (
459459 TSStatusCode .SUCCESS_STATUS .getStatusCode (), getTimeSlotListResp .status .getCode ());
@@ -480,7 +480,7 @@ public void testGetSlots() throws Exception {
480480 TCountTimeSlotListReq countTimeSlotListReq ;
481481 TCountTimeSlotListResp countTimeSlotListResp ;
482482 countTimeSlotListReq = new TCountTimeSlotListReq ();
483- countTimeSlotListReq .setDatabase (sg0 );
483+ countTimeSlotListReq .setDatabase (db0 );
484484 countTimeSlotListResp = client .countTimeSlotList (countTimeSlotListReq );
485485 Assert .assertEquals (
486486 TSStatusCode .SUCCESS_STATUS .getStatusCode (), countTimeSlotListResp .status .getCode ());
@@ -504,7 +504,7 @@ public void testGetSlots() throws Exception {
504504 TGetSeriesSlotListReq getSeriesSlotListReq ;
505505 TGetSeriesSlotListResp getSeriesSlotListResp ;
506506
507- getSeriesSlotListReq = new TGetSeriesSlotListReq (sg0 , TConsensusGroupType .DataRegion );
507+ getSeriesSlotListReq = new TGetSeriesSlotListReq (db0 , TConsensusGroupType .DataRegion );
508508 getSeriesSlotListResp = client .getSeriesSlotList (getSeriesSlotListReq );
509509 Assert .assertEquals (
510510 TSStatusCode .SUCCESS_STATUS .getStatusCode (), getSeriesSlotListResp .status .getCode ());
0 commit comments