Package com.alibaba.otter.shared.common.model.config.node

Examples of com.alibaba.otter.shared.common.model.config.node.NodeParameter


            node.setName(nodeDo.getName());
            node.setPort(nodeDo.getPort());
            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());
            node.setGmtModified(nodeDo.getGmtModified());
View Full Code Here


    @Test
    public void test_attachment() {
        final Node currentNode = new Node();
        currentNode.setId(1L);
        currentNode.setIp("127.0.0.1");
        currentNode.setParameters(new NodeParameter());
        final Pipeline pipeline = new Pipeline();
        pipeline.getParameters().setRetriever(RetrieverType.ARIA2C);
        // mock一下
        new NonStrictExpectations() {
View Full Code Here

    @Test
    public void test_rowData() {
        final Node currentNode = new Node();
        currentNode.setId(1L);
        currentNode.setIp("127.0.0.1");
        currentNode.setParameters(new NodeParameter());
        final Pipeline pipeline = new Pipeline();
        pipeline.getParameters().setRetriever(RetrieverType.ARIA2C);
        // mock一下
        new NonStrictExpectations() {
View Full Code Here

    public void doAdd(@FormGroup("nodeInfo") Group nodeInfo, @FormGroup("nodeParameterInfo") Group nodeParameterInfo,
                      @FormField(name = "formNodeError", group = "nodeInfo") CustomErrors err, Navigator nav)
                                                                                                             throws Exception {
        Node node = new Node();
        NodeParameter parameter = new NodeParameter();
        nodeInfo.setProperties(node);
        nodeParameterInfo.setProperties(parameter);

        if (parameter.getDownloadPort() == null || parameter.getDownloadPort() == 0) {
            parameter.setDownloadPort(node.getPort().intValue() + 1);
        }

        if (parameter.getMbeanPort() == null || parameter.getMbeanPort() == 0) {
            parameter.setMbeanPort(node.getPort().intValue() + 2);
        }

        Long autoKeeperclusterId = nodeParameterInfo.getField("autoKeeperclusterId").getLongValue();
        if (autoKeeperclusterId != null && autoKeeperclusterId > 0) {
            AutoKeeperCluster autoKeeperCluster = autoKeeperClusterService.findAutoKeeperClusterById(autoKeeperclusterId);
            parameter.setZkCluster(autoKeeperCluster);
        }

        node.setParameters(parameter);
        try {
            nodeService.create(node);
View Full Code Here

    public void doEdit(@FormGroup("nodeInfo") Group nodeInfo, @FormGroup("nodeParameterInfo") Group nodeParameterInfo,
                       @Param("pageIndex") int pageIndex, @Param("searchKey") String searchKey,
                       @FormField(name = "formNodeError", group = "nodeInfo") CustomErrors err, Navigator nav)
                                                                                                              throws Exception {
        Node node = new Node();
        NodeParameter parameter = new NodeParameter();
        nodeInfo.setProperties(node);
        nodeParameterInfo.setProperties(parameter);

        if (parameter.getDownloadPort() == null || parameter.getDownloadPort() == 0) {
            parameter.setDownloadPort(node.getPort().intValue() + 1);
        }

        if (parameter.getMbeanPort() == null || parameter.getMbeanPort() == 0) {
            parameter.setMbeanPort(node.getPort().intValue() + 2);
        }

        Long autoKeeperclusterId = nodeParameterInfo.getField("autoKeeperclusterId").getLongValue();
        if (autoKeeperclusterId != null && autoKeeperclusterId > 0) {
            AutoKeeperCluster autoKeeperCluster = autoKeeperClusterService.findAutoKeeperClusterById(autoKeeperclusterId);
            parameter.setZkCluster(autoKeeperCluster);
        }

        node.setParameters(parameter);
        try {
            nodeService.modify(node);
View Full Code Here

    public void doAdd(@FormGroup("nodeInfo") Group nodeInfo, @FormGroup("nodeParameterInfo") Group nodeParameterInfo,
                      @FormField(name = "formNodeError", group = "nodeInfo") CustomErrors err, Navigator nav)
                                                                                                             throws Exception {
        Node node = new Node();
        NodeParameter parameter = new NodeParameter();
        nodeInfo.setProperties(node);
        nodeParameterInfo.setProperties(parameter);
        Long autoKeeperclusterId = nodeParameterInfo.getField("autoKeeperclusterId").getLongValue();
        if (autoKeeperclusterId != null && autoKeeperclusterId > 0) {
            AutoKeeperCluster autoKeeperCluster = autoKeeperClusterService.findAutoKeeperClusterById(autoKeeperclusterId);
            parameter.setZkCluster(autoKeeperCluster);
        }

        node.setParameters(parameter);
        try {
            nodeService.create(node);
View Full Code Here

    public void doEdit(@FormGroup("nodeInfo") Group nodeInfo, @FormGroup("nodeParameterInfo") Group nodeParameterInfo,
                       @Param("pageIndex") int pageIndex, @Param("searchKey") String searchKey,
                       @FormField(name = "formNodeError", group = "nodeInfo") CustomErrors err, Navigator nav)
                                                                                                              throws Exception {
        Node node = new Node();
        NodeParameter parameter = new NodeParameter();
        nodeInfo.setProperties(node);
        nodeParameterInfo.setProperties(parameter);
        Long autoKeeperclusterId = nodeParameterInfo.getField("autoKeeperclusterId").getLongValue();
        if (autoKeeperclusterId != null && autoKeeperclusterId > 0) {
            AutoKeeperCluster autoKeeperCluster = autoKeeperClusterService.findAutoKeeperClusterById(autoKeeperclusterId);
            parameter.setZkCluster(autoKeeperCluster);
        }

        node.setParameters(parameter);
        try {
            nodeService.modify(node);
View Full Code Here

TOP

Related Classes of com.alibaba.otter.shared.common.model.config.node.NodeParameter

Copyright © 2018 www.massapicom. 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.