-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(connector): init embedded connector node #12122
Changes from 3 commits
2904555
2831bad
8e3fc67
bea170f
768776d
03664e9
37e530e
89d421f
61f5463
1f2d3ae
2e3c93f
41583db
3041df2
2dbbb51
ef0f0c8
a940f8d
d0ef67f
df9fc72
071b96d
738a2dd
d9562ff
4f4bb7f
018b332
25e1a8a
8b5b94a
41bd111
4b2089f
35ab88a
8bcce49
e16d040
cfa9e0e
5017dff
5a1bd7f
fb87e9c
0d7f770
336aae6
3b4233f
079520b
f55a545
a0901d2
170df20
a8d54ce
d5ee0fb
ae1327d
3a39f98
adc1a8d
547941b
67f0e72
cfa8ac6
0d87139
366eba9
dd0142b
c184ade
7208816
e6fbfde
ba14875
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,6 +88,8 @@ ENV CLASSPATH ${HADOOP_CONF_DIR}:${CLASSPATH} | |
ENV PLAYGROUND_PROFILE docker-playground | ||
# Set default dashboard UI to local path instead of github proxy | ||
ENV RW_DASHBOARD_UI_PATH /risingwave/ui | ||
# Set default connector libs path | ||
ENV CONNECTOR_LIBS_PATH /risingwave/bin/connector-node/libs | ||
Comment on lines
+91
to
+92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add default CONNECTOR_LIBS_PATH to the Dockerfile. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC, opandal also uses jni to start a jvm when supporting hdfs access. May need to test whether it will conflict with the embedded connector node. cc @wcy-fdu |
||
|
||
ENTRYPOINT [ "/risingwave/hdfs_env.sh" ] | ||
CMD [ "playground" ] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,24 +151,33 @@ where | |
|
||
let channel_ptr = Box::into_raw(tx) as i64; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For current code, we don't even need wrapping the channel with box, since the |
||
|
||
let _ = env | ||
.call_static_method( | ||
"com/risingwave/connector/source/core/JniDbzSourceHandler", | ||
"runJniDbzSourceThread", | ||
"([BJ)V", | ||
&[ | ||
JValue::Object(&get_event_stream_request_bytes), | ||
JValue::from(channel_ptr), | ||
], | ||
) | ||
.inspect_err(|e| tracing::error!("jni call error: {:?}", e)) | ||
.unwrap(); | ||
let result = env.call_static_method( | ||
"com/risingwave/connector/source/core/JniDbzSourceHandler", | ||
"runJniDbzSourceThread", | ||
"([BJ)V", | ||
&[ | ||
JValue::Object(&get_event_stream_request_bytes), | ||
JValue::from(channel_ptr), | ||
], | ||
); | ||
|
||
unsafe { drop(Box::from_raw(channel_ptr as *mut GetEventStreamJniSender)) }; | ||
match result { | ||
Ok(_) => { | ||
tracing::info!("end of jni call runJniDbzSourceThread"); | ||
} | ||
Err(e) => { | ||
tracing::error!("jni call error: {:?}", e); | ||
} | ||
} | ||
}); | ||
|
||
while let Some(GetEventStreamResponse { events, .. }) = rx.recv().await { | ||
tracing::debug!("receive events {:?}", events.len()); | ||
let msgs = events.into_iter().map(SourceMessage::from).collect_vec(); | ||
yield msgs; | ||
} | ||
|
||
Err(anyhow!("all senders are dropped"))?; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add default CONNECTOR_LIBS_PATH to the Dockerfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I miss any other Dockerfiles? cc @fuyufjh @BugenZhao
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK this is the only one