Skip to content

Commit 0b85673

Browse files
authored
chore: expose and export side-input path (#156)
Signed-off-by: Vigith Maurice <vigith@gmail.com>
1 parent 5d2a927 commit 0b85673

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

examples/sideinput/udf/src/main.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ use numaflow::map::{MapRequest, Mapper, Message, Server};
55
use tokio::spawn;
66
use tonic::async_trait;
77

8-
const DIR_PATH: &str = "/var/numaflow/sideinputs";
9-
108
struct UdfMapper;
119

1210
#[async_trait]
@@ -39,6 +37,9 @@ async fn file_watcher() -> Result<()> {
3937
Ok(event) => println!("event: {:?}", event),
4038
Err(e) => println!("watch error: {:?}", e),
4139
})?;
42-
watcher.watch(Path::new(DIR_PATH), RecursiveMode::Recursive)?;
40+
watcher.watch(
41+
Path::new(numaflow::sideinput::DIR_PATH),
42+
RecursiveMode::Recursive,
43+
)?;
4344
Ok(())
4445
}

numaflow/src/sideinput.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ pub const SOCK_ADDR: &str = "/var/run/numaflow/sideinput.sock";
1717
/// Default server info file for sideinput service
1818
pub const SERVER_INFO_FILE: &str = "/var/run/numaflow/sideinput-server-info";
1919

20+
/// Default directory path for storing side-input files
21+
pub const DIR_PATH: &str = "/var/numaflow/side-inputs";
22+
2023
struct SideInputService<T> {
2124
handler: Arc<T>,
2225
shutdown_tx: mpsc::Sender<()>,

0 commit comments

Comments
 (0)