diff --git a/src/main/java/org/elasticsearch/cluster/metadata/MetaDataMappingService.java b/src/main/java/org/elasticsearch/cluster/metadata/MetaDataMappingService.java index 6dbb042ddab..a0ad9d3b039 100644 --- a/src/main/java/org/elasticsearch/cluster/metadata/MetaDataMappingService.java +++ b/src/main/java/org/elasticsearch/cluster/metadata/MetaDataMappingService.java @@ -23,7 +23,10 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import org.elasticsearch.action.support.master.MasterNodeOperationRequest; -import org.elasticsearch.cluster.*; +import org.elasticsearch.cluster.ClusterService; +import org.elasticsearch.cluster.ClusterState; +import org.elasticsearch.cluster.ClusterStateUpdateTask; +import org.elasticsearch.cluster.TimeoutClusterStateUpdateTask; import org.elasticsearch.cluster.action.index.NodeMappingCreatedAction; import org.elasticsearch.cluster.routing.IndexRoutingTable; import org.elasticsearch.common.Priority; @@ -276,7 +279,7 @@ public class MetaDataMappingService extends AbstractComponent { public void updateMapping(final String index, final String type, final CompressedString mappingSource, final Listener listener) { refreshOrUpdateQueue.add(new UpdateTask(index, type, mappingSource, listener)); - clusterService.submitStateUpdateTask("update-mapping [" + index + "][" + type + "]", Priority.HIGH, new ProcessedClusterStateUpdateTask() { + clusterService.submitStateUpdateTask("update-mapping [" + index + "][" + type + "]", Priority.HIGH, new ClusterStateUpdateTask() { @Override public void onFailure(String source, Throwable t) { listener.onFailure(t); @@ -286,11 +289,6 @@ public class MetaDataMappingService extends AbstractComponent { public ClusterState execute(final ClusterState currentState) throws Exception { return executeRefreshOrUpdate(currentState); } - - @Override - public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) { - listener.onResponse(new Response(true)); - } }); }