Examples of AutoKeeperCluster


Examples of com.alibaba.otter.shared.common.model.autokeeper.AutoKeeperCluster

            canal.setId(canalDo.getId());
            canal.setName(canalDo.getName());
            canal.setStatus(canalDo.getStatus());
            canal.setDesc(canalDo.getDescription());
            CanalParameter parameter = canalDo.getParameters();
            AutoKeeperCluster zkCluster = autoKeeperClusterService.findAutoKeeperClusterById(parameter.getZkClusterId());
            if (zkCluster != null) {
                parameter.setZkClusters(Arrays.asList(StringUtils.join(zkCluster.getServerList(), ',')));
            }
            canal.setCanalParameter(canalDo.getParameters());
            canal.setGmtCreate(canalDo.getGmtCreate());
            canal.setGmtModified(canalDo.getGmtModified());
        } catch (Exception e) {
View Full Code Here

Examples of com.alibaba.otter.shared.common.model.autokeeper.AutoKeeperCluster

    public void removeAutoKeeperCluster(Long id) {
        autoKeeperClusterDao.delete(id);
    }

    private AutoKeeperCluster doToModel(AutoKeeperClusterDO autoKeeperClusterDo) {
        AutoKeeperCluster autoKeeperCluster = new AutoKeeperCluster();
        autoKeeperCluster.setId(autoKeeperClusterDo.getId());
        autoKeeperCluster.setClusterName(autoKeeperClusterDo.getClusterName());
        autoKeeperCluster.setDescription(autoKeeperClusterDo.getDescription());
        autoKeeperCluster.setServerList(JsonUtils.unmarshalFromString(autoKeeperClusterDo.getServerList(),
                                                                      new TypeReference<List<String>>() {
                                                                      }));
        autoKeeperCluster.setGmtCreate(autoKeeperClusterDo.getGmtCreate());
        autoKeeperCluster.setGmtModified(autoKeeperClusterDo.getGmtModified());
        return autoKeeperCluster;
    }
View Full Code Here

Examples of com.alibaba.otter.shared.common.model.autokeeper.AutoKeeperCluster

            canal.setId(canalDo.getId());
            canal.setName(canalDo.getName());
            canal.setStatus(canalDo.getStatus());
            canal.setDesc(canalDo.getDescription());
            CanalParameter parameter = canalDo.getParameters();
            AutoKeeperCluster zkCluster = autoKeeperClusterService.findAutoKeeperClusterById(parameter.getZkClusterId());
            if (zkCluster != null) {
                parameter.setZkClusters(Arrays.asList(StringUtils.join(zkCluster.getServerList(), ',')));
            }
            canal.setCanalParameter(canalDo.getParameters());
            canal.setGmtCreate(canalDo.getGmtCreate());
            canal.setGmtModified(canalDo.getGmtModified());
        } catch (Exception e) {
View Full Code Here

Examples of com.alibaba.otter.shared.common.model.autokeeper.AutoKeeperCluster

            node.setDescription(nodeDo.getDescription());
            node.setStatus(nodeDo.getStatus());
            // 处理下zk集群
            NodeParameter parameter = nodeDo.getParameters();
            if (parameter.getZkCluster() != null) {
                AutoKeeperCluster zkCluster = autoKeeperClusterService.findAutoKeeperClusterById(parameter.getZkCluster().getId());
                parameter.setZkCluster(zkCluster);
            }

            node.setParameters(parameter);
            node.setGmtCreate(nodeDo.getGmtCreate());
View Full Code Here

Examples of com.alibaba.otter.shared.common.model.autokeeper.AutoKeeperCluster

    @Resource(name = "channelService")
    private ChannelService           channelService;

    public void execute(@Param("canalId") Long canalId, Context context) throws Exception {
        Canal canal = canalService.findById(canalId);
        AutoKeeperCluster zkCluster = autoKeeperClusterService.findAutoKeeperClusterById(canal.getCanalParameter()
            .getZkClusterId());

        List<Pipeline> pipelines = pipelineService.listByDestinationWithoutOther(canal.getName());
        List<Long> channelIds = new ArrayList<Long>();
        for (Pipeline pipeline : pipelines) {
View Full Code Here

Examples of com.alibaba.otter.shared.common.model.autokeeper.AutoKeeperCluster

    private AutoKeeperStatService    autoKeeperStatService;

    public void execute(@Param("clusterId") String clusterId, Context context) throws Exception {

        Map<String, AutoKeeperServerStat> statMap = new HashMap<String, AutoKeeperServerStat>();
        AutoKeeperCluster autoKeeperCluster = autoKeeperClusterService.findAutoKeeperClusterById(Long.valueOf(clusterId));
        for (String address : autoKeeperCluster.getServerList()) {
            AutoKeeperServerStat autoKeeperServerStat = autoKeeperStatService.findServerStat(address);
            statMap.put(address, autoKeeperServerStat);
        }
        context.put("clusterId", clusterId);
        context.put("statMap", statMap);
View Full Code Here

Examples of com.alibaba.otter.shared.common.model.autokeeper.AutoKeeperCluster

    private AutoKeeperStatService    autoKeeperStatService;

    public void execute(@Param("clusterId") String clusterId, @Param("address") String address, Context context)
                                                                                                                throws Exception {

        AutoKeeperCluster autoKeeperCluster = autoKeeperClusterService.findAutoKeeperClusterById(Long.valueOf(clusterId));
        Set<AutoKeeperConnectionStat> autoKeeperConnectionStats = new HashSet<AutoKeeperConnectionStat>();
        for (String ipAddress : autoKeeperCluster.getServerList()) {
            if (ipAddress.equalsIgnoreCase(address)) {
                AutoKeeperServerStat autoKeeperServerStat = autoKeeperStatService.findServerStat(ipAddress);
                if (autoKeeperServerStat != null) {
                    autoKeeperConnectionStats = autoKeeperServerStat.getConnectionStats();
                } else {
View Full Code Here

Examples of com.alibaba.otter.shared.common.model.autokeeper.AutoKeeperCluster

    private AutoKeeperCollector      autoKeeperCollector;

    public void doAdd(@FormGroup("autokeeperClusterInfo") Group autokeeperClusterInfo,
                      @FormField(name = "formAutokeeperClusterError", group = "autokeeperClusterInfo") CustomErrors err,
                      Navigator nav) throws Exception {
        AutoKeeperCluster autoKeeperCluster = new AutoKeeperCluster();
        autokeeperClusterInfo.setProperties(autoKeeperCluster);
        String zkClustersString = autokeeperClusterInfo.getField("zookeeperClusters").getStringValue();
        String[] zkClusters = StringUtils.split(zkClustersString, ";");

        autoKeeperCluster.setServerList(Arrays.asList(zkClusters));

        try {
            autoKeeperClusterService.createAutoKeeperCluster(autoKeeperCluster);
        } catch (RepeatConfigureException rce) {
            err.setMessage("invalidNode");
View Full Code Here

Examples of com.alibaba.otter.shared.common.model.autokeeper.AutoKeeperCluster

    }

    public void doEdit(@FormGroup("autokeeperClusterInfo") Group autokeeperClusterInfo,
                       @FormField(name = "formAutokeeperClusterError", group = "autokeeperClusterInfo") CustomErrors err,
                       Navigator nav) throws Exception {
        AutoKeeperCluster autoKeeperCluster = new AutoKeeperCluster();
        autokeeperClusterInfo.setProperties(autoKeeperCluster);
        String zkClustersString = autokeeperClusterInfo.getField("zookeeperClusters").getStringValue();
        String[] zkClusters = StringUtils.split(zkClustersString, ";");

        autoKeeperCluster.setServerList(Arrays.asList(zkClusters));
        try {
            autoKeeperClusterService.modifyAutoKeeperCluster(autoKeeperCluster);
        } catch (RepeatConfigureException rce) {
            err.setMessage("invalidChannelName");
            return;
View Full Code Here

Examples of com.alibaba.otter.shared.common.model.autokeeper.AutoKeeperCluster

        }
        nav.redirectTo(WebConstant.AUTO_KEEPER_CLUSTERS_LINK);
    }

    public void doRefresh(@Param("clusterId") Long clusterId, Navigator nav) throws Exception {
        AutoKeeperCluster autoKeeperCluster = autoKeeperClusterService.findAutoKeeperClusterById(clusterId);
        for (String address : autoKeeperCluster.getServerList()) {
            autoKeeperCollector.collectorServerStat(address);
            autoKeeperCollector.collectorConnectionStat(address);
            autoKeeperCollector.collectorWatchStat(address);
            autoKeeperCollector.collectorEphemeralStat(address);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.