YARN-4880. Running TestZKRMStateStorePerf with real zookeeper cluster throws NPE. Contributed by Sunil G
(cherry picked from commit 552237d4a3
)
This commit is contained in:
parent
ad08114b92
commit
eec23580b4
|
@ -91,16 +91,19 @@ public class TestZKRMStateStorePerf extends RMStateStoreTestBase
|
|||
if (appTokenMgr != null) {
|
||||
appTokenMgr.stop();
|
||||
}
|
||||
if (curatorTestingServer != null) {
|
||||
curatorTestingServer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
private void initStore(String hostPort) {
|
||||
Optional<String> optHostPort = Optional.fromNullable(hostPort);
|
||||
RMContext rmContext = mock(RMContext.class);
|
||||
|
||||
conf = new YarnConfiguration();
|
||||
conf.set(YarnConfiguration.RM_ZK_ADDRESS,
|
||||
optHostPort.or(curatorTestingServer.getConnectString()));
|
||||
conf.set(YarnConfiguration.RM_ZK_ADDRESS, optHostPort
|
||||
.or((curatorTestingServer == null) ? "" : curatorTestingServer
|
||||
.getConnectString()));
|
||||
conf.set(YarnConfiguration.ZK_RM_STATE_STORE_PARENT_PATH, workingZnode);
|
||||
|
||||
store = new ZKRMStateStore();
|
||||
|
|
Loading…
Reference in New Issue