[
https://issues.apache.org/jira/browse/SAMZA-670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14587796#comment-14587796
]
József Márton Jung commented on SAMZA-670:
------------------------------------------
Hi,
{qoute}
I also realize the messages order in the log is different from what the console
shows. This is related to SAMZA-699. I committed that patch. So it should fix
this. Can you rebase and try?
{qoute}
After the rebase, the order of messages is correct, so yes, SAMZA-699 solved
the ordering issue.
{quote}
I think this behavior is expected. Because when the
CoordinatorStreamSystemConsumer bootstraps, the latest jmx has not been
published to the broker by that time. That means, publishing the latest jmx
always happens after the bootstrap in the log. If you want to verify this, get
the coordinatorStream bootstrap again after publishing the latest jmx (just for
testing purpose). You should be able to see the latest jmx.
{quote}
I tested this by moving {{LocalityManager}} instance to servlet, so basically
when you click on a link in AM UI, it executes
{{LocalityManager.getContainerLocality}} call which calls the {{bootstrap()}}
method, so the JMX address should be visible, right? For some reason, it does
not shows the newest address, but shows the address which is older by 1 run.
For example: I started and stopped my Samza app 2 times, and started it the 3rd
time. It shows the JMX address from second run, even if the
{{LocalityManager.getContainerLocality}} is invoked after the writing the 3rd
run's JMX address to stream. Here are the logs:
samza-container-0.log:
{{noformat}}
2015-06-16 11:56:01 SamzaContainer [INFO] Writing container locality and JMX
address to Coordinator Stream
...
2015-06-16 11:56:02 SamzaContainer [INFO] Entering run loop.
{{noformat}}
samza-application-master.log:
{{noformat}}
2015-06-16 11:57:22 CoordinatorStreamSystemConsumer [INFO] Bootstrapping
configuration from coordinator stream.
2015-06-16 11:57:22 LocalityManager [INFO] Read locality for container 0:
{jmx-tunneling-address=service:jmx:rmi://ubuntu:47360/jndi/rmi://ubuntu:47359/jmxrmi,
ip=127.0.1.1,
jmx-address=service:jmx:rmi://localhost:47360/jndi/rmi://localhost:47359/jmxrmi}
2015-06-16 11:57:22 LocalityManager [INFO] Read locality for container 0:
{jmx-tunneling-address=service:jmx:rmi://ubuntu:38324/jndi/rmi://ubuntu:38323/jmxrmi,
ip=127.0.1.1,
jmx-address=service:jmx:rmi://localhost:38324/jndi/rmi://localhost:38323/jmxrmi}
{{noformat}}
> Allow easier access to JMX port
> -------------------------------
>
> Key: SAMZA-670
> URL: https://issues.apache.org/jira/browse/SAMZA-670
> Project: Samza
> Issue Type: Improvement
> Components: container
> Affects Versions: 0.9.0
> Reporter: Naveen Somasundaram
> Assignee: József Márton Jung
> Fix For: 0.10.0
>
>
> The current way we expose JMX is throw logs. The process for figuring this
> out is (To debug a particular partition):
> 1. Figure out the Partition to container mapping through the YARM AM or logs.
> 2. Once we know the container, access the container logs and figure out the
> JMX port.
> 3. Connect to the machine using the JMX port.
> We should ideally expose it through some REST service or make it available
> through the coordinator stream.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)