/// Ensure all parameters are valid for computed replication
Ensure all parameters are valid for computed replication
Ensure all parameters are valid for computed replication
fn parse_assigned_replica(&self) -> Result<ReplicaConfig, CliError> {
        if let Some(replica_assign_file) = &self.replica_assignment {
            match Partitions::file_decode(replica_assign_file) {
                Ok(partitions) => Ok(ReplicaConfig::Assigned(partitions)),
                Err(err) => Err(CliError::IoError(IoError::new(
                    ErrorKind::InvalidInput,
                    format!(
                        "cannot parse replica assignment file {:?}: {}",
                        replica_assign_file, err
                    ),
                ))),
            }
        } else {
            Err(CliError::IoError(IoError::new(
                ErrorKind::InvalidInput,
                "cannot find replica assignment file",
            )))
        }
    }
fn parse_assigned_replica ( & self ) -> Result < ReplicaConfig , CliError > { if let Some ( replica_assign_file ) = & self . replica_assignment { match Partitions :: file_decode ( replica_assign_file ) { Ok ( partitions ) => Ok ( ReplicaConfig :: Assigned ( partitions ) ) , Err ( err ) => Err ( CliError :: IoError ( IoError :: new ( ErrorKind :: InvalidInput , format ! ( " " replica_assign_file err ) , ) ) ) , } } else { Err ( CliError :: IoError ( IoError :: new ( ErrorKind :: InvalidInput , " " , ) ) ) } }
Ensure all parameters are valid for computed replication
Ensure all parameters are valid for computed replication
&self