taklwu commented on a change in pull request #3754:
URL: https://github.com/apache/hbase/pull/3754#discussion_r730028938



##########
File path: bin/hbase
##########
@@ -487,8 +487,16 @@ add_jdk11_deps_to_classpath() {
   done
 }
 
-enable_trace() {
-  agent_jar=$(find lib/trace -type f -name "opentelemetry-javaagent-*")
+add_opentelemetry_agent() {
+  if ! agent_jar=$(find lib/trace -type f -name "opentelemetry-javaagent-*" 
2>/dev/null); then

Review comment:
       originally, I just tested it by copying out the if-condition with 
printing some message to see if it works fine, e.g.  `if ! agent_jar=$(find 
lib/trace -type f -name "opentelemetry-javaagent-*" 2>/dev/null); then echo 123 
; echo 456 ; fi` in a random directory.
   
   but I think I found my problem that the `lib/trace` does not exist after mvn 
build for sandbox such find will fail, sorry to bring up this noise.  

##########
File path: bin/hbase
##########
@@ -487,8 +487,16 @@ add_jdk11_deps_to_classpath() {
   done
 }
 
-enable_trace() {
-  agent_jar=$(find lib/trace -type f -name "opentelemetry-javaagent-*")
+add_opentelemetry_agent() {
+  if ! agent_jar=$(find lib/trace -type f -name "opentelemetry-javaagent-*" 
2>/dev/null); then

Review comment:
       originally, I just tested it by copying out the if-condition with 
printing some message to see if it works fine, e.g.  `if ! agent_jar=$(find 
lib/trace -type f -name "opentelemetry-javaagent-*" 2>/dev/null); then echo 123 
; echo 456 ; fi` in a random directory.
   
   but I think I found my problem that the `lib/trace` does not exist after mvn 
build for sandbox such find will fail, sorry to bring up this noise.  
   
   approve !




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to