ClusterState function ( String arg0 , boolean arg1 , int arg2 ) { int loc0 = randomIntBetween ( 0 , arg2 ) ; return stateWithActivePrimary ( arg0 , arg1 , loc0 , arg2 - loc0 ) ; }
creates cluster state with and index that has one shard and as many replicas as numberofreplicas . primary will be started in cluster state but replicas will be one of unassigned , initializing , started or relocating . concode_field_sep PlaceHolder placeHolder concode_field_sep ClusterState stateWithAssignedPrimariesAndOneReplica concode_elem_sep String selectAndRemove concode_elem_sep DiscoveryNode newNode concode_elem_sep ClusterState state concode_elem_sep ClusterState state concode_elem_sep ClusterState stateWithNoShard