public void initialize(ShardRouting shard,String nodeId,long expectedSize){
  ensureMutable();
  assert shard.unassigned() : shard;
  shard.initialize(nodeId,expectedSize);
  node(nodeId).add(shard);
  inactiveShardCount++;
  if (shard.primary()) {
    inactivePrimaryCount++;
  }
  assignedShardsAdd(shard);
}

public void initialize ( ShardRouting shard , String nodeId , long expectedSize ) { ensureMutable ( ) ; assert shard . unassigned ( ) : shard ; shard . initialize ( nodeId , expectedSize ) ; node ( nodeId ) . add ( shard ) ; inactiveShardCount ++ ; if ( shard . primary ( ) ) { inactivePrimaryCount ++ ; } assignedShardsAdd ( shard ) ; }
moves a shard from unassigned to initialize state
