Skip to content

Commit

Permalink
[Deprecation] Deprecate setupMaster in favor of setupClusterManager (#…
Browse files Browse the repository at this point in the history
…1752) (#1769)

As part of the meta issue opensearch-project/OpenSearch#2589 to track the plan and progress of applying inclusive naming across OpenSearch Repositories
We are deprecating setupMaster in favor of setupClusterManager

Signed-off-by: manasvinibs <[email protected]>
(cherry picked from commit 9e508e7)

Signed-off-by: Manasvini B Suryanarayana <[email protected]>

Co-authored-by: Manasvini B Suryanarayana <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and manasvinibs authored Jun 22, 2022
1 parent f163114 commit 68f1964
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/cli/cluster/cluster.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,7 @@ class MockClusterFork extends EventEmitter {

export class MockCluster extends EventEmitter {
fork = jest.fn(() => new MockClusterFork(this));
/** @deprecated use setupClusterManager */
setupMaster = jest.fn();
setupClusterManager = jest.fn();
}
2 changes: 1 addition & 1 deletion src/cli/cluster/cluster_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class ClusterManager {
});

// When receive that event from server worker
// forward a reloadLoggingConfig message to master
// forward a reloadLoggingConfig message to cluster manager
// and all workers. This is only used by LogRotator service
// when the cluster mode is enabled
this.server.on('reloadLoggingConfigFromServerWorker', () => {
Expand Down
3 changes: 2 additions & 1 deletion src/cli/cluster/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import _ from 'lodash';
import cluster from 'cluster';
import { setupMaster as setupClusterManager } from 'cluster';
import { EventEmitter } from 'events';

import { BinderFor } from './binder_for';
Expand All @@ -44,7 +45,7 @@ export type ClusterWorker = cluster.Worker & {
exitCode?: number;
};

cluster.setupMaster({
setupClusterManager({
exec: cliPath,
silent: false,
});
Expand Down

0 comments on commit 68f1964

Please sign in to comment.