public void connect() throws IOException {
    JMXServiceURL jmxUrl = new JMXServiceURL(url);
    jmxc = JMXConnectorFactory.connect(jmxUrl, null);
  }
JMX metrics accessor.
It connects to a container JMX url,and get metrics values by querying the MBeans.
samza-core/src/main/java/org/apache/samza/metrics/JmxMetricsAccessor.java