MCPcopy Create free account
hub / github.com/apache/pig / resetStateForExecModeSwitch

Method resetStateForExecModeSwitch

test/org/apache/pig/test/Util.java:1443–1455  ·  view source on GitHub ↗

Called to reset ThreadLocal or static states that PigServer depends on when a test suite has testcases switching between LOCAL and MAPREDUCE/TEZ execution modes

()

Source from the content-addressed store, hash-verified

1441 * execution modes
1442 */
1443 public static void resetStateForExecModeSwitch() {
1444 FileLocalizer.setInitialized(false);
1445
1446 // For tez testing, we want to avoid TezResourceManager/LocalResource reuse
1447 // (when switching between local and mapreduce/tez)
1448 TezResourceManager.dropInstance();
1449
1450 // TODO: once we have Tez local mode, we can get rid of this. For now,
1451 // if we run this test suite in Tez mode and there are some tests
1452 // in LOCAL mode, we need to set ScriptState to
1453 // null to force ScriptState gets initialized every time.
1454 ScriptState.start(null);
1455 }
1456
1457 public static boolean isMapredExecType(ExecType execType) {
1458 return execType == ExecType.MAPREDUCE;

Callers 15

setUpMethod · 0.95
setUpMethod · 0.95
setupMethod · 0.95
setUpMethod · 0.95
tearDownMethod · 0.95
setUpMethod · 0.95
testImportListMethod · 0.95
setUpMethod · 0.95
testSFPigMethod · 0.95
testUniqueIDMethod · 0.95
testRANDOMWithJobMethod · 0.95
setUpMethod · 0.95

Calls 3

setInitializedMethod · 0.95
dropInstanceMethod · 0.95
startMethod · 0.95

Tested by

no test coverage detected