Admin cluster health api - bug or am I doing something wrong?


#1

v0.15.2

Im doing the following to query the health of a particular index:

client.admin()
.cluster()
.health(
clusterHealthRequest()
.indices(new String[]{"complete-bollox"})
.waitForGreenStatus()
.timeout(timeValueMillis(10000))
)
.actionGet()

I always get GREEN status for an index that definitely does not exist.

-Nick


(Shay Banon) #2

If you check the timed out flag, then you will see its true. But, it should be RED as well, I opened an issue: https://github.com/elasticsearch/elasticsearch/issues/781.
On Tuesday, March 15, 2011 at 8:18 PM, Mooky wrote:

v0.15.2

Im doing the following to query the health of a particular index:

client.admin()
.cluster()
.health(
clusterHealthRequest()
.indices(new String[]{"complete-bollox"})
.waitForGreenStatus()
.timeout(timeValueMillis(10000))
)
.actionGet()

I always get GREEN status for an index that definitely does not exist.

-Nick


#3

Im pretty sure it wasnt timing out. Will have to check again - maybe
as I was fiddling around I left the timeout very low.

Will update the issue accordingly.

Thanks,
-Nick

On 15 March 2011 19:26, Shay Banon shay.banon@elasticsearch.com wrote:

If you check the timed out flag, then you will see its true. But, it should
be RED as well, I opened an
issue: https://github.com/elasticsearch/elasticsearch/issues/781.

On Tuesday, March 15, 2011 at 8:18 PM, Mooky wrote:

v0.15.2

Im doing the following to query the health of a particular index:

client.admin()
.cluster()
.health(
clusterHealthRequest()
.indices(new String[]{"complete-bollox"})
.waitForGreenStatus()
.timeout(timeValueMillis(10000))
)
.actionGet()

I always get GREEN status for an index that definitely does not exist.

-Nick


#4

Oh, and being picky :wink: can we make the indices method a var-args?

clusterHealthRequest()
.indices(new String[]{"complete-bollox"})

-Nick

On 15 March 2011 23:39, Nick Minutello nick.minutello@gmail.com wrote:

Im pretty sure it wasnt timing out. Will have to check again - maybe
as I was fiddling around I left the timeout very low.

Will update the issue accordingly.

Thanks,
-Nick

On 15 March 2011 19:26, Shay Banon shay.banon@elasticsearch.com wrote:

If you check the timed out flag, then you will see its true. But, it should
be RED as well, I opened an
issue: https://github.com/elasticsearch/elasticsearch/issues/781.

On Tuesday, March 15, 2011 at 8:18 PM, Mooky wrote:

v0.15.2

Im doing the following to query the health of a particular index:

client.admin()
.cluster()
.health(
clusterHealthRequest()
.indices(new String[]{"complete-bollox"})
.waitForGreenStatus()
.timeout(timeValueMillis(10000))
)
.actionGet()

I always get GREEN status for an index that definitely does not exist.

-Nick


(Shay Banon) #5

Its is "var agr'ed" in the constructor for the ClusterHealthRequest class, and in the prepareHealth(String... indices) API.
On Wednesday, March 16, 2011 at 1:40 AM, Nick Minutello wrote:

Oh, and being picky :wink: can we make the indices method a var-args?

clusterHealthRequest()
.indices(new String[]{"complete-bollox"})

-Nick

On 15 March 2011 23:39, Nick Minutello nick.minutello@gmail.com wrote:

Im pretty sure it wasnt timing out. Will have to check again - maybe
as I was fiddling around I left the timeout very low.

Will update the issue accordingly.

Thanks,
-Nick

On 15 March 2011 19:26, Shay Banon shay.banon@elasticsearch.com wrote:

If you check the timed out flag, then you will see its true. But, it should
be RED as well, I opened an
issue: https://github.com/elasticsearch/elasticsearch/issues/781.

On Tuesday, March 15, 2011 at 8:18 PM, Mooky wrote:

v0.15.2

Im doing the following to query the health of a particular index:

client.admin()
.cluster()
.health(
clusterHealthRequest()
.indices(new String[]{"complete-bollox"})
.waitForGreenStatus()
.timeout(timeValueMillis(10000))
)
.actionGet()

I always get GREEN status for an index that definitely does not exist.

-Nick


#6

Roger. Will use that instead. Chairs :slight_smile:

On 15 March 2011 23:43, Shay Banon shay.banon@elasticsearch.com wrote:

Its is "var agr'ed" in the constructor for the ClusterHealthRequest class,
and in the prepareHealth(String... indices) API.

On Wednesday, March 16, 2011 at 1:40 AM, Nick Minutello wrote:

Oh, and being picky :wink: can we make the indices method a var-args?

clusterHealthRequest()
.indices(new String[]{"complete-bollox"})

-Nick

On 15 March 2011 23:39, Nick Minutello nick.minutello@gmail.com wrote:

Im pretty sure it wasnt timing out. Will have to check again - maybe
as I was fiddling around I left the timeout very low.

Will update the issue accordingly.

Thanks,
-Nick

On 15 March 2011 19:26, Shay Banon shay.banon@elasticsearch.com wrote:

If you check the timed out flag, then you will see its true. But, it should
be RED as well, I opened an
issue: https://github.com/elasticsearch/elasticsearch/issues/781.

On Tuesday, March 15, 2011 at 8:18 PM, Mooky wrote:

v0.15.2

Im doing the following to query the health of a particular index:

client.admin()
.cluster()
.health(
clusterHealthRequest()
.indices(new String[]{"complete-bollox"})
.waitForGreenStatus()
.timeout(timeValueMillis(10000))
)
.actionGet()

I always get GREEN status for an index that definitely does not exist.

-Nick


(zohar) #7

Confirmed it does time out - just status is wrong.
-Nick


(system) #8