Hi,

I am trying to use the on-the-fly instrumentation on hive source code by 
passing jacocoagent.jar as a javaagent. Everything works fine for single 
javaagent but when I try to pass multiple javaagents the socket connection 
is only opened for the first passed javaagent. These are my final java 
options that i get after jps -lvm

org.apache.hadoop.util.RunJar /mnt/c/Users/admin/work/apache-hive/hive/
packaging/target/apache-hive-4.0.0-SNAPSHOT-bin/apache-hive-4.0.0-SNAPSHOT-
bin/lib/hive-cli-4.0.0-SNAPSHOT.jar org.apache.hadoop.hive.cli.CliDriver -
Dproc_jar -Djava.net.preferIPv4Stack=true -Dproc_hivecli -javaagent:/mnt/c/
Users/admin/work/apache-hive/hive/packaging/target/apache-hive-4.0.0-
SNAPSHOT-bin/apache-hive-4.0.0-SNAPSHOT-bin/lib/jacocoagent.jar=output=
tcpserver,port=5005,includes=org.apache.hadoop.hive.cli.* -javaagent:/mnt/c/
Users/admin/work/apache-hive/hive/packaging/target/apache-hive-4.0.0-
SNAPSHOT-bin/apache-hive-4.0.0-SNAPSHOT-bin/lib/jacocoagent.jar=output=
tcpserver,port=5006,includes=org.apache.hadoop.hive.*,excludes=org.apache.
hadoop.hive.ql.*:org.apache.hadoop.hive.cli.* -Dlog4j.configurationFile=hive
-log4j2.properties -Djava.util.logging.config.file=/mnt/c/Users/admin/work/
apache-hive/hive/packaging/target/apache-hive-4.0.0-SNAPSHOT-bin/apache-hive
-4.0.0-SNAPSHOT-bin/conf/parquet-logging.properties -Djline.terminal=jline.
UnsupportedTerminal -Dyarn.log.dir=/mnt/c/Users/admin/work/hadoop-local/
hadoop/logs -Dyarn.log.file=hadoop.log -Dyarn.home.dir=/mnt/c/Users/admin/
work/hadoop-local/hadoop -Dyarn.root.logger=INFO,console -Djava.librar   

As you can see I am trying to use two jacoco agents on port 5005 and 5006. 
I then use ExecutionDataClient Example to dump the .exec. It works only for 
one port, whichever is declared first. The second port says connection 
refused. I checked with netstat -an on command prompt and I can see only 
the port which was declared first is opening. Also the second jacocoagent 
does try to instrument the code as I receive instrumentation error if I 
remove the excludes option. So the jacocoagent is loaded only not able to 
open the port. Please can someone point me in the right direction?

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/ea275f4a-3655-4c65-995d-02aa5f5fd554%40googlegroups.com.

Reply via email to