Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public abstract class BaseQueryWithRegionMovesIT extends ParallelStatsDisabledWi
@BeforeParam
public static synchronized void initTables(String idxDdl, boolean columnEncoded,
boolean keepDeletedCells) throws Exception {
// Parameter setup runs before the per-test hook, and a subclass can replace the class setup.
// Thus turn the balancer off here too, before the tables are created.
getUtility().getAdmin().balancerSwitch(false, true);
StringBuilder optionBuilder = new StringBuilder();
if (!columnEncoded) {
optionBuilder.append("COLUMN_ENCODED_BYTES=0");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import org.apache.phoenix.util.QueryBuilder;
import org.apache.phoenix.util.ReadOnlyProps;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -117,6 +118,19 @@ public static synchronized void doSetup() throws Exception {
TestScanningResultPostDummyResultCaller.class.getName());
props.put(PHOENIX_INDEX_CDC_CONSUMER_ENABLED, Boolean.toString(false));
setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
// Turn the balancer off before any parameter setup creates tables.
getUtility().getAdmin().balancerSwitch(false, true);
}

/**
* The tests move regions on their own schedule. Balancer moves can drop admin compaction requests
* and can move SYSTEM.CATALOG during DDL. Thus the balancer stays off. The class setup turns it
* off first. This method is not static and has a distinct name, so subclasses that hide doSetup
* also use it.
*/
@Before
public void disableBalancer() throws Exception {
getUtility().getAdmin().balancerSwitch(false, true);
}

@AfterClass
Expand Down
Loading