ArkenKiran commented on pull request #3445:
URL: https://github.com/apache/hadoop/pull/3445#issuecomment-921081392
How to Test locally.
1. Add the following maven dependency to hadoop-common/pom.xml
```
<dependency>
<groupId>io.opentelemetry.javaagent</groupId>
<artifactId>opentelemetry-javaagent</artifactId>
<version>${opentelemetry-instrumentation.version}</version>
<classifier>all</classifier>
</dependency>
```
2. Build using the following command
```
mvn install -Pdist -DskipTests -Dtar -Dmaven.javadoc.skip=true
```
3. Extract the tar from the location `hadoop-dist/target/` (Ex tar -xvf
hadoop-dist/target/hadoop-3.4.0-SNAPSHOT.tar.gz -C ~/)
4. cd ~/hadoop-3.4.0-SNAPSHOT/
5. uncomment the following lines in hadoop-env.sh (location:
etc/hadoop/hadoop-env.sh)
```
# export OPENTELEMETRY_JAVAAGENT_PATH="$(find
$HADOOP_HOME/share/hadoop/common/lib/ -name opentelemetry-javaagent*)"
# export HADOOP_TRACE_OPTS="-javaagent:$OPENTELEMETRY_JAVAAGENT_PATH
-Dotel.traces.exporter=jaeger -Dotel.metrics.exporter=none"
# export HDFS_NAMENODE_OPTS="$HDFS_NAMENODE_OPTS $HADOOP_TRACE_OPTS
-Dotel.resource.attributes=service.name=HDFS_NAMENODE"
# export HDFS_DATANODE_OPTS="$HDFS_DATANODE_OPTS $HADOOP_TRACE_OPTS
-Dotel.resource.attributes=service.name=HDFS_DATANODE"
# export HDFS_SECONDARYNAMENODE_OPTS="$HDFS_SECONDARYNAMENODE_OPTS
$HADOOP_TRACE_OPTS
-Dotel.resource.attributes=service.name=HDFS_SECONDARYNAMENODE"
```
6. Make sure `share/hadoop/common/lib/ ` has the maven dependency
(opentelemetry-javaagent-1.3.0-all.jar) that you have added in step 1.
7. Start Jaeger following the instructions
https://www.jaegertracing.io/docs/1.26/getting-started/
8. Setup Single Node cluster following the instructions
https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/SingleCluster.html#Pseudo-Distributed_Operation
9. You should be able to see the traces in the jaeger UI
(http://localhost:16686/search)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]