results;
// If we did not ask for a specific name, then we return all templates
diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/TransportPutIndexTemplateAction.java b/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/TransportPutIndexTemplateAction.java
index 34eccbf9d8a40..ae3a799453d67 100644
--- a/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/TransportPutIndexTemplateAction.java
+++ b/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/TransportPutIndexTemplateAction.java
@@ -47,8 +47,10 @@ public class TransportPutIndexTemplateAction extends TransportMasterNodeAction listener) {
+ protected void masterOperation(final PutIndexTemplateRequest request, final ClusterState state,
+ final ActionListener listener) {
String cause = request.cause();
if (cause.length() == 0) {
cause = "api";
diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/IndexUpgradeStatus.java b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/IndexUpgradeStatus.java
index cae0fd6bfa6fe..68054595701ad 100644
--- a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/IndexUpgradeStatus.java
+++ b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/IndexUpgradeStatus.java
@@ -45,7 +45,8 @@ public class IndexUpgradeStatus implements Iterable {
}
indexShards = new HashMap<>();
for (Map.Entry> entry : tmpIndexShards.entrySet()) {
- indexShards.put(entry.getKey(), new IndexShardUpgradeStatus(entry.getValue().get(0).getShardRouting().shardId(), entry.getValue().toArray(new ShardUpgradeStatus[entry.getValue().size()])));
+ indexShards.put(entry.getKey(), new IndexShardUpgradeStatus(entry.getValue().get(0).getShardRouting().shardId(),
+ entry.getValue().toArray(new ShardUpgradeStatus[entry.getValue().size()])));
}
}
@@ -91,4 +92,4 @@ public long getToUpgradeBytesAncient() {
}
-}
\ No newline at end of file
+}
diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/TransportUpgradeStatusAction.java b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/TransportUpgradeStatusAction.java
index 603b25f6ab414..2958538f83bc9 100644
--- a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/TransportUpgradeStatusAction.java
+++ b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/TransportUpgradeStatusAction.java
@@ -43,13 +43,15 @@
import java.io.IOException;
import java.util.List;
-public class TransportUpgradeStatusAction extends TransportBroadcastByNodeAction {
+public class TransportUpgradeStatusAction
+ extends TransportBroadcastByNodeAction {
private final IndicesService indicesService;
@Inject
public TransportUpgradeStatusAction(Settings settings, ClusterService clusterService, TransportService transportService,
- IndicesService indicesService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
+ IndicesService indicesService, ActionFilters actionFilters,
+ IndexNameExpressionResolver indexNameExpressionResolver) {
super(settings, UpgradeStatusAction.NAME, clusterService, transportService, actionFilters, indexNameExpressionResolver,
UpgradeStatusRequest::new, ThreadPool.Names.MANAGEMENT);
this.indicesService = indicesService;
@@ -79,8 +81,11 @@ protected ShardUpgradeStatus readShardResult(StreamInput in) throws IOException
}
@Override
- protected UpgradeStatusResponse newResponse(UpgradeStatusRequest request, int totalShards, int successfulShards, int failedShards, List responses, List shardFailures, ClusterState clusterState) {
- return new UpgradeStatusResponse(responses.toArray(new ShardUpgradeStatus[responses.size()]), totalShards, successfulShards, failedShards, shardFailures);
+ protected UpgradeStatusResponse newResponse(UpgradeStatusRequest request, int totalShards, int successfulShards, int failedShards,
+ List responses,
+ List shardFailures, ClusterState clusterState) {
+ return new UpgradeStatusResponse(responses.toArray(new ShardUpgradeStatus[responses.size()]), totalShards, successfulShards,
+ failedShards, shardFailures);
}
@Override
diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/UpgradeStatusRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/UpgradeStatusRequestBuilder.java
index cee5bdcabe59d..e359b191ffdba 100644
--- a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/UpgradeStatusRequestBuilder.java
+++ b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/UpgradeStatusRequestBuilder.java
@@ -22,7 +22,8 @@
import org.elasticsearch.action.support.broadcast.BroadcastOperationRequestBuilder;
import org.elasticsearch.client.ElasticsearchClient;
-public class UpgradeStatusRequestBuilder extends BroadcastOperationRequestBuilder {
+public class UpgradeStatusRequestBuilder
+ extends BroadcastOperationRequestBuilder {
public UpgradeStatusRequestBuilder(ElasticsearchClient client, UpgradeStatusAction action) {
super(client, action, new UpgradeStatusRequest());
diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/TransportUpgradeAction.java b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/TransportUpgradeAction.java
index 918b8a06056d2..c44ad9e70bae7 100644
--- a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/TransportUpgradeAction.java
+++ b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/TransportUpgradeAction.java
@@ -66,13 +66,16 @@ public class TransportUpgradeAction extends TransportBroadcastByNodeAction shardUpgradeResults, List shardFailures, ClusterState clusterState) {
+ protected UpgradeResponse newResponse(UpgradeRequest request, int totalShards, int successfulShards, int failedShards,
+ List shardUpgradeResults,
+ List shardFailures, ClusterState clusterState) {
Map