@@ -63,17 +63,17 @@ public class EnableAllocationDecider extends AllocationDecider {
6363 public static final String NAME = "enable" ;
6464
6565 public static final Setting <Allocation > CLUSTER_ROUTING_ALLOCATION_ENABLE_SETTING =
66- new Setting <>("cluster.routing.allocation.enable" , Allocation .ALL .name (), Allocation ::parse ,
66+ new Setting <>("cluster.routing.allocation.enable" , Allocation .ALL .toString (), Allocation ::parse ,
6767 Property .Dynamic , Property .NodeScope );
6868 public static final Setting <Allocation > INDEX_ROUTING_ALLOCATION_ENABLE_SETTING =
69- new Setting <>("index.routing.allocation.enable" , Allocation .ALL .name (), Allocation ::parse ,
69+ new Setting <>("index.routing.allocation.enable" , Allocation .ALL .toString (), Allocation ::parse ,
7070 Property .Dynamic , Property .IndexScope );
7171
7272 public static final Setting <Rebalance > CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING =
73- new Setting <>("cluster.routing.rebalance.enable" , Rebalance .ALL .name (), Rebalance ::parse ,
73+ new Setting <>("cluster.routing.rebalance.enable" , Rebalance .ALL .toString (), Rebalance ::parse ,
7474 Property .Dynamic , Property .NodeScope );
7575 public static final Setting <Rebalance > INDEX_ROUTING_REBALANCE_ENABLE_SETTING =
76- new Setting <>("index.routing.rebalance.enable" , Rebalance .ALL .name (), Rebalance ::parse ,
76+ new Setting <>("index.routing.rebalance.enable" , Rebalance .ALL .toString (), Rebalance ::parse ,
7777 Property .Dynamic , Property .IndexScope );
7878
7979 private volatile Rebalance enableRebalance ;
@@ -228,6 +228,11 @@ public static Allocation parse(String strValue) {
228228 }
229229 }
230230 }
231+
232+ @ Override
233+ public String toString () {
234+ return name ().toLowerCase (Locale .ROOT );
235+ }
231236 }
232237
233238 /**
@@ -255,6 +260,11 @@ public static Rebalance parse(String strValue) {
255260 }
256261 }
257262 }
263+
264+ @ Override
265+ public String toString () {
266+ return name ().toLowerCase (Locale .ROOT );
267+ }
258268 }
259269
260270}
0 commit comments