Skip to content

Commit

Permalink
remove with_value
Browse files Browse the repository at this point in the history
Signed-off-by: Yashash H L <[email protected]>
  • Loading branch information
yhl25 committed Dec 20, 2024
1 parent b0989e0 commit f9b1b86
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 88 deletions.
17 changes: 0 additions & 17 deletions numaflow/src/batchmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,23 +196,6 @@ impl Message {
self.tags = Some(tags);
self
}

/// Replaces the value of the message.
///
/// # Arguments
///
/// * `value` - A new vector of bytes that replaces the current message value.
///
/// # Examples
///
/// ```
/// use numaflow::batchmap::Message;
/// let message = Message::new(vec![1, 2, 3]).with_value(vec![4, 5, 6]);
/// ```
pub fn with_value(mut self, value: Vec<u8>) -> Self {
self.value = value;
self
}
}
/// The result of the call to [`BatchMapper::batchmap`] method.
pub struct BatchResponse {
Expand Down
17 changes: 0 additions & 17 deletions numaflow/src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,23 +145,6 @@ impl Message {
self.tags = Some(tags);
self
}

/// Replaces the value of the message.
///
/// # Arguments
///
/// * `value` - A new vector of bytes that replaces the current message value.
///
/// # Examples
///
/// ```
/// use numaflow::map::Message;
/// let message = Message::new(vec![1, 2, 3]).with_value(vec![4, 5, 6]);
/// ```
pub fn with_value(mut self, value: Vec<u8>) -> Self {
self.value = value;
self
}
}

impl From<Message> for proto::map_response::Result {
Expand Down
19 changes: 1 addition & 18 deletions numaflow/src/mapstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,23 +150,6 @@ impl Message {
self.tags = Some(tags);
self
}

/// Replaces the value of the message.
///
/// # Arguments
///
/// * `value` - A new vector of bytes that replaces the current message value.
///
/// # Examples
///
/// ```
/// use numaflow::mapstream::Message;
/// let message = Message::new(vec![1, 2, 3]).with_value(vec![4, 5, 6]);
/// ```
pub fn with_value(mut self, value: Vec<u8>) -> Self {
self.value = value;
self
}
}

impl From<Message> for proto::map_response::Result {
Expand Down Expand Up @@ -601,7 +584,7 @@ mod tests {
async fn map_stream(&self, input: MapStreamRequest, tx: Sender<Message>) {
let message = Message::new(input.value)
.with_keys(input.keys)
.with_value(vec![]);
.with_tags(vec![]);
tx.send(message).await.unwrap();
}
}
Expand Down
17 changes: 0 additions & 17 deletions numaflow/src/reduce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,23 +259,6 @@ impl Message {
self.tags = Some(tags);
self
}

/// Replaces the value of the message.
///
/// # Arguments
///
/// * `value` - A new vector of bytes that replaces the current message value.
///
/// # Examples
///
/// ```
/// use numaflow::reduce::Message;
/// let message = Message::new(vec![1, 2, 3]).with_value(vec![4, 5, 6]);
/// ```
pub fn with_value(mut self, value: Vec<u8>) -> Self {
self.value = value;
self
}
}

/// Incoming request into the reducer handler of [`Reducer`].
Expand Down
19 changes: 0 additions & 19 deletions numaflow/src/sourcetransform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,25 +171,6 @@ impl Message {
self.tags = Some(tags);
self
}

/// Replaces the value of the message.
///
/// # Arguments
///
/// * `value` - A new vector of bytes that replaces the current message value.
///
/// # Examples
///
/// ```
/// use numaflow::sourcetransform::Message;
/// use chrono::Utc;
/// let now = Utc::now();
/// let message = Message::new(vec![1, 2, 3], now).with_value(vec![4, 5, 6]);
/// ```
pub fn with_value(mut self, value: Vec<u8>) -> Self {
self.value = value;
self
}
}

/// Incoming request to the Source Transformer.
Expand Down

0 comments on commit f9b1b86

Please sign in to comment.