-
Notifications
You must be signed in to change notification settings - Fork 446
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
[VL] Replace std::cerr/cout with LOG and remove GLUTEN_PRINT_DEBUG macro #3171
Conversation
Thanks for opening a pull request! Could you open an issue for this pull request on Github Issues? https://github.com/oap-project/gluten/issues Then could you also rename commit message and pull request title in the following format?
See also: |
Thanks. Would you rebase? |
The find_package(glog REQUIRED) requires that the glog dependency is installed. Currently, glog is installed as part of building Velox dependencies. However, nowhere indicates that glog is a mandatory dependency for Gluten. As it's moved to top-level CMakeList.txt, I think it would be better if we can have something like
|
yeah, I will do rebase later. |
I dont know how to configure vcpkg correctly... |
cc: @zhouyuan |
@Yohahaha @marin-ma here's the place to add thanks, -yuan |
@Yohahaha I dig a bit deeper and found its probably caused by our Findglog.cmake module doesn't interface link to gflags. https://github.com/oap-project/gluten/blob/ba045c7705d8fe6cd2a52d7b303a6a01fd54a8d8/cpp/CMake/Findglog.cmake#L33-L37 Let me open another PR to solve it first. |
I will pending this path since it is not important, and vcpkg env confused me a lot... |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
@Yohahaha This PR is very useful. Could you help to rebase? |
yeah, let me try again. |
@marin-ma could you help remove |
@@ -106,13 +105,11 @@ static inline jmethodID getStaticMethodIdOrError(JNIEnv* env, jclass thisClass, | |||
static inline void attachCurrentThreadAsDaemonOrThrow(JavaVM* vm, JNIEnv** out) { | |||
int getEnvStat = vm->GetEnv(reinterpret_cast<void**>(out), jniVersion); | |||
if (getEnvStat == JNI_EDETACHED) { | |||
DEBUG_OUT << "JNIEnv was not attached to current thread." << std::endl; |
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.
Please do not remove existing logs, unless for cleanup purposes. I would suggest replacing with DLOG(INFO)
.
Would you please include the replacement policies in the PR description? e.g. Replacing And please do not remove any existing debug logs. If cleanup or removal is necessary, let's address that separately in another PR. |
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.
LGTM. Thank you for tracking this PR! Just a few minor comments.
LGTM. Thanks for iterating! |
DEBUG_OUT << "Not found node id: " << nodeId << std::endl; | ||
DEBUG_OUT << "Plan Node: " << std::endl << veloxPlan_->toString(true, true) << std::endl; | ||
LOG(WARNING) << "Not found node id: " << nodeId; | ||
LOG(WARNING) << "Plan Node: " << std::endl << veloxPlan_->toString(true, true); |
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.
replace DEBUG_OUT with DLOG
Seems not matched with this description. Any reason here?
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.
Changing the log type to warning in the exception block does make sense to me.
} | ||
} catch (std::exception& e) { | ||
DEBUG_OUT << __func__ << " call JavaInputStreamAdaptor::Close() got exception:" << e.what() << std::endl; | ||
LOG(WARNING) << __func__ << " call JavaInputStreamAdaptor::Close() got exception:" << e.what(); |
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.
Why not DLOG
here?
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.
exception msg should be warning.
===== Performance report for TPCH SF2000 with Velox backend, for reference only ====
|
Replace all std::cerr/cout with LOG, replace DEBUG_OUT with DLOG, and remove GLUTEN_PRINT_DEBUG macro to avoid compilation issues caused by the lack of DEBUG testing.