Skip to content

Commit

Permalink
Nomenclature changes from master to cluster manager (#368)
Browse files Browse the repository at this point in the history
Signed-off-by: Naveen Tatikonda <[email protected]>
  • Loading branch information
naveentatikonda authored Apr 18, 2022
1 parent 978675f commit 81b30b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import static org.opensearch.knn.common.KNNConstants.MODEL_METADATA_FIELD;

/**
* Transport action used to update metadata of model's on the master node.
* Transport action used to update metadata of model's on the cluster manager node.
*/
public class UpdateModelMetadataTransportAction extends TransportMasterNodeAction<UpdateModelMetadataRequest, AcknowledgedResponse> {

Expand Down Expand Up @@ -87,7 +87,7 @@ protected void masterOperation(
ClusterState clusterState,
ActionListener<AcknowledgedResponse> actionListener
) {
// Master updates model metadata based on request parameters
// ClusterManager updates model metadata based on request parameters
clusterService.submitStateUpdateTask(
PLUGIN_NAME,
new UpdateModelMetaDataTask(request.getModelId(), request.getModelMetadata(), request.isRemoveRequest()),
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/org/opensearch/knn/indices/ModelDaoTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public void testPut_withId() throws InterruptedException, IOException {
ActionListener<IndexResponse> docCreationListener = ActionListener.wrap(response -> {
assertEquals(modelId, response.getId());

// We need to use executor service here so master thread does not block
// We need to use executor service here so main thread does not block
modelGetterExecutor.submit(() -> {
try {
assertEquals(model, modelDao.get(modelId));
Expand Down Expand Up @@ -232,7 +232,7 @@ public void testPut_withoutModel() throws InterruptedException, IOException {
ActionListener<IndexResponse> docCreationListener = ActionListener.wrap(response -> {
assertEquals(modelId, response.getId());

// We need to use executor service here so master thread does not block
// We need to use executor service here so main thread does not block
modelGetterExecutor.submit(() -> {
try {
assertEquals(model, modelDao.get(modelId));
Expand Down Expand Up @@ -327,7 +327,7 @@ public void testUpdate() throws IOException, InterruptedException {
ActionListener<IndexResponse> docCreationListener = ActionListener.wrap(response -> {
assertEquals(modelId, response.getId());

// We need to use executor service here so master thread does not block
// We need to use executor service here so main thread does not block
modelGetterExecutor.submit(() -> {
try {
assertEquals(model, modelDao.get(modelId));
Expand Down Expand Up @@ -363,7 +363,7 @@ public void testUpdate() throws IOException, InterruptedException {
ActionListener<IndexResponse> updateListener = ActionListener.wrap(response -> {
assertEquals(modelId, response.getId());

// We need to use executor service here so master thread does not block
// We need to use executor service here so main thread does not block
modelGetterExecutor.submit(() -> {
try {
assertEquals(updatedModel, modelDao.get(modelId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void testRead() throws IOException {
assertEquals(acknowledgedResponse, acknowledgedResponse1);
}

public void testMasterOperation() throws InterruptedException {
public void testClusterManagerOperation() throws InterruptedException {
// Setup the Model system index
createIndex(MODEL_INDEX_NAME);

Expand Down

0 comments on commit 81b30b1

Please sign in to comment.