> On Ноя. 6, 2015, 4:45 п.п., Dmytro Sen wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java, > > line 326 > > <https://reviews.apache.org/r/40007/diff/1/?file=1117800#file1117800line326> > > > > I don't think if any changes required to AbstractProviderModule. > > > > I think, using VIP means that any its clients should not worry about > > who owns VIP at the current time. VIP will be moved to the active collector > > automatically, so ambari server can continue sending requests to VIP. > > > > + This code executed on every metrics request, updating > > clusterMetricCollectorMap on every request doesn't seem correct approach > > Aravindan Vijayan wrote: > We dont update the clusterMetricCollectorMap on every request. We update > it only if the current host of clusterMetricCollectorMap is down or collector > is not reachable. > if (!vipHostConfigPresent) { > String currentCollectorHost = > clusterMetricCollectorMap.get(clusterName); > LOG.debug("Current Metrics collector Host : " + > currentCollectorHost); > if ((currentCollectorHost == null) || > !(isHostLive(clusterName, currentCollectorHost) && > isHostComponentLive(clusterName, currentCollectorHost, > "AMBARI_METRICS", Role.METRICS_COLLECTOR.name())) > ) {....}
Why we update? Why not to send requests to VIP? - Dmytro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/40007/#review105453 ----------------------------------------------------------- On Ноя. 6, 2015, 6:18 д.п., Aravindan Vijayan wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/40007/ > ----------------------------------------------------------- > > (Updated Ноя. 6, 2015, 6:18 д.п.) > > > Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle. > > > Bugs: AMBARI-13758 > https://issues.apache.org/jira/browse/AMBARI-13758 > > > Repository: ambari > > > Description > ------- > > Problem > When there are 2 instances of collectors (1 live and 1 stopped) , metrics do > not show up on the Ambari UI. > > Bug > Currently, the zookeeper_quorum_hosts property for the AMS resolves to a list > of AMS hosts when the mode is distributed. This causes failure when there one > instance of collector (on host1) is stopped and an other instance (on host2) > is installed and started. The zookeeper_quorum_hosts wrongly reserves to > host1,host2. > When 2 instances of metrics collector are on the cluster (1 live at a time), > the ambari server does not get the correct collector hostname from the > Metrics Property provider > > Fix > Resolve AMS zookeeper to localhost in distributed mode too. Make sure ambari > server gets the current "STARTED" instance of the metrics collector host for > requesting metrics. When VIP config is present, it takes precedence over any > other collector instances. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java > 3ac64e3 > > ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py > ae7ccf8 > > Diff: https://reviews.apache.org/r/40007/diff/ > > > Testing > ------- > > Relevant unit tests pass. > > Manual testing done. > > > Thanks, > > Aravindan Vijayan > >
