@@ -94,7 +94,7 @@ public void testBalance() {
94
94
List <TabletMigration > migrationsOut = new ArrayList <>();
95
95
long wait =
96
96
this .balance (new BalanceParamsImpl (Collections .unmodifiableSortedMap (createCurrent (15 )),
97
- migrations , migrationsOut , DataLevel .USER , environment .getTableIdMap ()));
97
+ migrations , migrationsOut , DataLevel .USER . name () , environment .getTableIdMap ()));
98
98
assertEquals (20000 , wait );
99
99
// should balance four tablets in one of the tables before reaching max
100
100
assertEquals (4 , migrationsOut .size ());
@@ -105,7 +105,7 @@ public void testBalance() {
105
105
}
106
106
migrationsOut .clear ();
107
107
wait = this .balance (new BalanceParamsImpl (Collections .unmodifiableSortedMap (createCurrent (15 )),
108
- migrations , migrationsOut , DataLevel .USER , environment .getTableIdMap ()));
108
+ migrations , migrationsOut , DataLevel .USER . name () , environment .getTableIdMap ()));
109
109
assertEquals (20000 , wait );
110
110
// should balance four tablets in one of the other tables before reaching max
111
111
assertEquals (4 , migrationsOut .size ());
@@ -116,7 +116,7 @@ public void testBalance() {
116
116
}
117
117
migrationsOut .clear ();
118
118
wait = this .balance (new BalanceParamsImpl (Collections .unmodifiableSortedMap (createCurrent (15 )),
119
- migrations , migrationsOut , DataLevel .USER , environment .getTableIdMap ()));
119
+ migrations , migrationsOut , DataLevel .USER . name () , environment .getTableIdMap ()));
120
120
assertEquals (20000 , wait );
121
121
// should balance four tablets in one of the other tables before reaching max
122
122
assertEquals (4 , migrationsOut .size ());
@@ -127,7 +127,7 @@ public void testBalance() {
127
127
}
128
128
migrationsOut .clear ();
129
129
wait = this .balance (new BalanceParamsImpl (Collections .unmodifiableSortedMap (createCurrent (15 )),
130
- migrations , migrationsOut , DataLevel .USER , environment .getTableIdMap ()));
130
+ migrations , migrationsOut , DataLevel .USER . name () , environment .getTableIdMap ()));
131
131
assertEquals (20000 , wait );
132
132
// no more balancing to do
133
133
assertEquals (0 , migrationsOut .size ());
@@ -144,7 +144,7 @@ public void testBalanceWithTooManyOutstandingMigrations() {
144
144
migrations .addAll (tableTablets .get (BAR .getTableName ()));
145
145
long wait =
146
146
this .balance (new BalanceParamsImpl (Collections .unmodifiableSortedMap (createCurrent (15 )),
147
- migrations , migrationsOut , DataLevel .USER , environment .getTableIdMap ()));
147
+ migrations , migrationsOut , DataLevel .USER . name () , environment .getTableIdMap ()));
148
148
assertEquals (20000 , wait );
149
149
// no migrations should have occurred as 10 is the maxOutstandingMigrations
150
150
assertEquals (0 , migrationsOut .size ());
@@ -487,12 +487,12 @@ public void testOutOfBoundsTablets() {
487
487
// in the HostRegexTableLoadBalancer. For this test we want
488
488
// to get into the out of bounds checking code, so we need to
489
489
// populate the map with an older time value
490
- this .lastOOBCheckTimes .put (DataLevel .USER , System .currentTimeMillis () / 2 );
490
+ this .lastOOBCheckTimes .put (DataLevel .USER . name () , System .currentTimeMillis () / 2 );
491
491
init (DEFAULT_TABLE_PROPERTIES );
492
492
Set <TabletId > migrations = new HashSet <>();
493
493
List <TabletMigration > migrationsOut = new ArrayList <>();
494
- this .balance (new BalanceParamsImpl (createCurrent (15 ), migrations , migrationsOut , DataLevel . USER ,
495
- environment .getTableIdMap ()));
494
+ this .balance (new BalanceParamsImpl (createCurrent (15 ), migrations , migrationsOut ,
495
+ DataLevel . USER . name (), environment .getTableIdMap ()));
496
496
assertEquals (2 , migrationsOut .size ());
497
497
}
498
498
0 commit comments