Cluster.routing.allocation.awareness.attributes not working as documented

Hi,

I was experimenting with the
"cluster.routing.allocation.awareness.attributes" setting. I started with
one data node in the cluster, with allocation awareness attribute set to
"value1". I expect that all the shards will be allocated to this node.
Instead, only primary shards are allocated to this node. All the replicas
are unassigned. Note that I have not set the
"cluster.routing.allocation.awareness.force.zone.values" at all.

I'm using ES 1.1.1. Can anyone confirm? Or did I do something stupid. :frowning:

Thanks.
Yongtao

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Take a look at the example here

Basically a shard and it's replica will never be allocated to the same
instance, which is what you are seeing.

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com

On 26 July 2014 03:44, Yongtao You yongtao.you@gmail.com wrote:

Hi,

I was experimenting with the
"cluster.routing.allocation.awareness.attributes" setting. I started with
one data node in the cluster, with allocation awareness attribute set to
"value1". I expect that all the shards will be allocated to this node.
Instead, only primary shards are allocated to this node. All the replicas
are unassigned. Note that I have not set the
"cluster.routing.allocation.awareness.force.zone.values" at all.

I'm using ES 1.1.1. Can anyone confirm? Or did I do something stupid. :frowning:

Thanks.
Yongtao

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAEM624b22uEJ%3DkLLd%3D2XKVqrd1X53esAaHC-647u56O7muUcXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hmm... I'm reading the same document and came to the opposite conclusion.
:frowning: My understanding is that if all the nodes have the same attribute, then
all shards will be deployed among them. As soon as a node with different
attribute arrives, that's when the "replica will not be deployed to nodes
with the same attribute as that of primary" apply. In my case, I only have
one node, hence one attribute available. So all shards should be deployed.

Thanks.
-Yongtao

On Friday, July 25, 2014 3:56:10 PM UTC-7, Mark Walkom wrote:

Take a look at the example here
Elasticsearch Platform — Find real-time answers at scale | Elastic

Basically a shard and it's replica will never be allocated to the same
instance, which is what you are seeing.

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: ma...@campaignmonitor.com <javascript:>
web: www.campaignmonitor.com

On 26 July 2014 03:44, Yongtao You <yongt...@gmail.com <javascript:>>
wrote:

Hi,

I was experimenting with the
"cluster.routing.allocation.awareness.attributes" setting. I started with
one data node in the cluster, with allocation awareness attribute set to
"value1". I expect that all the shards will be allocated to this node.
Instead, only primary shards are allocated to this node. All the replicas
are unassigned. Note that I have not set the
"cluster.routing.allocation.awareness.force.zone.values" at all.

I'm using ES 1.1.1. Can anyone confirm? Or did I do something stupid. :frowning:

Thanks.
Yongtao

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/5825d387-a4fc-4263-b34e-02b9b02c8043%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

If you only have one node the replicas will never be assigned.

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com

On 26 July 2014 09:23, Yongtao You yongtao.you@gmail.com wrote:

Hmm... I'm reading the same document and came to the opposite conclusion.
:frowning: My understanding is that if all the nodes have the same attribute, then
all shards will be deployed among them. As soon as a node with different
attribute arrives, that's when the "replica will not be deployed to nodes
with the same attribute as that of primary" apply. In my case, I only have
one node, hence one attribute available. So all shards should be deployed.

Thanks.
-Yongtao

On Friday, July 25, 2014 3:56:10 PM UTC-7, Mark Walkom wrote:

Take a look at the example here http://www.elasticsearch.org/
guide/en/elasticsearch/reference/current/modules-cluster.html#allocation-
awareness

Basically a shard and it's replica will never be allocated to the same
instance, which is what you are seeing.

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: ma...@campaignmonitor.com
web: www.campaignmonitor.com

On 26 July 2014 03:44, Yongtao You yongt...@gmail.com wrote:

Hi,

I was experimenting with the "cluster.routing.allocation.awareness.attributes"
setting. I started with one data node in the cluster, with allocation
awareness attribute set to "value1". I expect that all the shards will be
allocated to this node. Instead, only primary shards are allocated to this
node. All the replicas are unassigned. Note that I have not set the
"cluster.routing.allocation.awareness.force.zone.values" at all.

I'm using ES 1.1.1. Can anyone confirm? Or did I do something stupid. :frowning:

Thanks.
Yongtao

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%
40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/5825d387-a4fc-4263-b34e-02b9b02c8043%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/5825d387-a4fc-4263-b34e-02b9b02c8043%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAEM624Y7uSAD5O5kzs0SOHM6_MMZ4QqHi4ma6zGDKmKbXpvacg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.