From a0b9d424e6d8b98ba4e7eaa6252cb645d45fa133 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Wed, 14 Oct 2015 21:05:35 -0400 Subject: [PATCH] Reflect upstream changes to o.e.c.m.IndexMetaData This commit reflects some upstream method removals from o.e.c.m.IndexMetaData. Original commit: elastic/x-pack-elasticsearch@74b25628dc970582bc20ff8913e36d6deded3b10 --- .../indicesresolver/DefaultIndicesAndAliasesResolver.java | 4 ++-- .../elasticsearch/watcher/execution/TriggeredWatchStore.java | 2 +- .../main/java/org/elasticsearch/watcher/watch/WatchStore.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shield/src/main/java/org/elasticsearch/shield/authz/indicesresolver/DefaultIndicesAndAliasesResolver.java b/shield/src/main/java/org/elasticsearch/shield/authz/indicesresolver/DefaultIndicesAndAliasesResolver.java index dddd2b3fe29..5d4ad2d80bf 100644 --- a/shield/src/main/java/org/elasticsearch/shield/authz/indicesresolver/DefaultIndicesAndAliasesResolver.java +++ b/shield/src/main/java/org/elasticsearch/shield/authz/indicesresolver/DefaultIndicesAndAliasesResolver.java @@ -239,10 +239,10 @@ public class DefaultIndicesAndAliasesResolver implements IndicesAndAliasesResolv //complicated to support those options with aliases pointing to multiple indices... return true; } - if (indexMetaData.state() == IndexMetaData.State.CLOSE && indicesOptions.expandWildcardsClosed()) { + if (indexMetaData.getState() == IndexMetaData.State.CLOSE && indicesOptions.expandWildcardsClosed()) { return true; } - if (indexMetaData.state() == IndexMetaData.State.OPEN && indicesOptions.expandWildcardsOpen()) { + if (indexMetaData.getState() == IndexMetaData.State.OPEN && indicesOptions.expandWildcardsOpen()) { return true; } } diff --git a/watcher/src/main/java/org/elasticsearch/watcher/execution/TriggeredWatchStore.java b/watcher/src/main/java/org/elasticsearch/watcher/execution/TriggeredWatchStore.java index e44abdf2bec..7677eb0a253 100644 --- a/watcher/src/main/java/org/elasticsearch/watcher/execution/TriggeredWatchStore.java +++ b/watcher/src/main/java/org/elasticsearch/watcher/execution/TriggeredWatchStore.java @@ -236,7 +236,7 @@ public class TriggeredWatchStore extends AbstractComponent { if (!state.routingTable().index(INDEX_NAME).allPrimaryShardsActive()) { throw illegalState("not all primary shards of the [{}] index are started.", INDEX_NAME); } else { - numPrimaryShards = indexMetaData.numberOfShards(); + numPrimaryShards = indexMetaData.getNumberOfShards(); } RefreshResponse refreshResponse = client.refresh(new RefreshRequest(INDEX_NAME)); if (refreshResponse.getSuccessfulShards() < numPrimaryShards) { diff --git a/watcher/src/main/java/org/elasticsearch/watcher/watch/WatchStore.java b/watcher/src/main/java/org/elasticsearch/watcher/watch/WatchStore.java index 5261817ccca..2eb9457e7a6 100644 --- a/watcher/src/main/java/org/elasticsearch/watcher/watch/WatchStore.java +++ b/watcher/src/main/java/org/elasticsearch/watcher/watch/WatchStore.java @@ -79,7 +79,7 @@ public class WatchStore extends AbstractComponent { IndexMetaData watchesIndexMetaData = state.getMetaData().index(INDEX); if (watchesIndexMetaData != null) { try { - int count = loadWatches(watchesIndexMetaData.numberOfShards()); + int count = loadWatches(watchesIndexMetaData.getNumberOfShards()); logger.debug("loaded [{}] watches from the watches index [{}]", count, INDEX); started.set(true); } catch (Exception e) {