|
20 | 20 | package org.elasticsearch.cluster.action.index;
|
21 | 21 |
|
22 | 22 | import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequestBuilder;
|
| 23 | +import org.elasticsearch.action.support.master.MasterNodeRequest; |
23 | 24 | import org.elasticsearch.client.Client;
|
24 | 25 | import org.elasticsearch.client.IndicesAdminClient;
|
25 | 26 | import org.elasticsearch.common.inject.Inject;
|
@@ -78,11 +79,12 @@ public void updateMappingOnMaster(Index index, String type, Mapping mappingUpdat
|
78 | 79 | }
|
79 | 80 |
|
80 | 81 | /**
|
81 |
| - * Update mappings synchronously on the master node, waiting for at most |
82 |
| - * {@code timeout}. When this method returns successfully mappings have |
83 |
| - * been applied to the master node and propagated to data nodes. |
| 82 | + * Update mappings on the master node, waiting for the change to be committed, |
| 83 | + * but not for the mapping update to be applied on all nodes. The timeout specified by |
| 84 | + * {@code timeout} is the master node timeout ({@link MasterNodeRequest#masterNodeTimeout()}), |
| 85 | + * potentially waiting for a master node to be available. |
84 | 86 | */
|
85 |
| - public void updateMappingOnMaster(Index index, String type, Mapping mappingUpdate, TimeValue timeout) { |
86 |
| - updateMappingRequest(index, type, mappingUpdate, timeout).get(); |
| 87 | + public void updateMappingOnMaster(Index index, String type, Mapping mappingUpdate, TimeValue masterNodeTimeout) { |
| 88 | + updateMappingRequest(index, type, mappingUpdate, masterNodeTimeout).get(); |
87 | 89 | }
|
88 | 90 | }
|
0 commit comments