Search in sources :

Example 21 with MonitoringTask

use of com.cubrid.cubridmanager.core.common.task.MonitoringTask in project cubrid-manager by CUBRID.

the class CreateReplicationJobExecutor method startAgent.

/**
	 * start agent service
	 * 
	 * @param agentName String
	 * @param monitor IProgressMonitor
	 * @param taskList List<ITask>
	 * @return status
	 */
private IStatus startAgent(String agentName, final IProgressMonitor monitor, List<ITask> taskList) {
    monitor.subTask(Messages.bind(Messages.startAgentJobName, agentName));
    MonitoringTask monitoringTask = null;
    boolean isExecuteStopAgentTask = true;
    MonitorDashboardPreference monPref = new MonitorDashboardPreference();
    for (ITask task : taskList) {
        if (task instanceof MonitoringTask) {
            monitoringTask = (MonitoringTask) task;
            ServerInfo serverInfo = monitoringTask.getServerInfo();
            CMHostNodePersistManager.getInstance().addServer(serverInfo.getHostAddress(), serverInfo.getHostMonPort(), serverInfo.getUserName(), serverInfo);
            monitoringTask.connectServer(Version.releaseVersion, monPref.getHAHeartBeatTimeout());
        } else if (task instanceof StopReplicationAgentTask) {
            if (isExecuteStopAgentTask) {
                task.execute();
            } else {
                continue;
            }
        } else {
            task.execute();
        }
        if (monitor.isCanceled()) {
            disConnect(monitoringTask);
            return Status.CANCEL_STATUS;
        }
        final String msg = task.getErrorMsg();
        if (msg != null && msg.length() > 0 && !monitor.isCanceled()) {
            disConnect(monitoringTask);
            return new Status(IStatus.ERROR, CubridManagerUIPlugin.PLUGIN_ID, msg);
        }
        if (task instanceof GetReplAgentStatusTask) {
            GetReplAgentStatusTask getReplAgentStatusTask = (GetReplAgentStatusTask) task;
            isExecuteStopAgentTask = getReplAgentStatusTask.isActive();
        }
    }
    disConnect(monitoringTask);
    return Status.OK_STATUS;
}
Also used : IStatus(org.eclipse.core.runtime.IStatus) Status(org.eclipse.core.runtime.Status) MonitorDashboardPreference(com.cubrid.cubridmanager.ui.mondashboard.preference.MonitorDashboardPreference) ITask(com.cubrid.common.core.task.ITask) GetReplAgentStatusTask(com.cubrid.cubridmanager.core.replication.task.GetReplAgentStatusTask) ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) StopReplicationAgentTask(com.cubrid.cubridmanager.core.replication.task.StopReplicationAgentTask) MonitoringTask(com.cubrid.cubridmanager.core.common.task.MonitoringTask)

Example 22 with MonitoringTask

use of com.cubrid.cubridmanager.core.common.task.MonitoringTask in project cubrid-manager by CUBRID.

the class CreateReplicationJobExecutor method createMaster.

/**
	 * create master database
	 * 
	 * @param dbName String
	 * @param monitor IProgressMonitor
	 * @param taskList List<ITask>
	 * @return status
	 */
private IStatus createMaster(final String dbName, final IProgressMonitor monitor, List<ITask> taskList) {
    monitor.subTask(Messages.bind(Messages.createMasterJobName, dbName));
    Display display = Display.getDefault();
    MonitoringTask monitoringTask = null;
    boolean isExecuteSetParaTask = true;
    boolean isExecuteStopDbTask = true;
    boolean isExecuteStartDbTask = false;
    Map<String, Map<String, String>> confParaMaps = null;
    MonitorDashboardPreference monPref = new MonitorDashboardPreference();
    for (ITask task : taskList) {
        if (task instanceof MonitoringTask) {
            monitoringTask = (MonitoringTask) task;
            ServerInfo serverInfo = monitoringTask.getServerInfo();
            CMHostNodePersistManager.getInstance().addServer(serverInfo.getHostAddress(), serverInfo.getHostMonPort(), serverInfo.getUserName(), serverInfo);
            monitoringTask.connectServer(Version.releaseVersion, monPref.getHAHeartBeatTimeout());
        } else if (task instanceof StopReplServerTask) {
            if (isExecuteStopReplServerTask) {
                task.execute();
            } else {
                continue;
            }
        } else if (task instanceof SetCubridConfParameterTask) {
            if (isExecuteSetParaTask) {
                SetCubridConfParameterTask setCubridConfParameterTask = (SetCubridConfParameterTask) task;
                setCubridConfParameterTask.setConfParameters(confParaMaps);
                task.execute();
            } else {
                continue;
            }
        } else if (task instanceof CommonUpdateTask && task.getTaskname().equals(CommonTaskName.STOP_DB_TASK_NAME)) {
            if (isExecuteStopDbTask) {
                task.execute();
            } else {
                continue;
            }
        } else if (task instanceof CommonUpdateTask && task.getTaskname().equals(CommonTaskName.START_DB_TASK_NAME)) {
            if (isExecuteStartDbTask) {
                task.execute();
            } else {
                continue;
            }
        } else if (task instanceof GetTransferProgressTask) {
            GetTransferProgressTask getTransferProgressTask = (GetTransferProgressTask) task;
            monitor.subTask(Messages.transFileJobName);
            if (pid != null) {
                while (!isCanceled()) {
                    getTransferProgressTask.setPid(pid);
                    getTransferProgressTask.execute();
                    TransFileProgressInfo progressInfo = getTransferProgressTask.getProgressInfo();
                    if (getTransferProgressTask.isSuccess() && progressInfo != null) {
                        String transferStatus = progressInfo.getTransferStatus();
                        String transferNote = progressInfo.getTransferNote();
                        if (transferStatus != null && transferStatus.equals("success")) {
                            pid = null;
                            cancelTransFileTask = null;
                            break;
                        } else if (transferStatus != null && transferStatus.equals("failure")) {
                            pid = null;
                            cancelTransFileTask = null;
                            getTransferProgressTask.setErrorMsg(transferNote);
                            break;
                        } else {
                            try {
                                Thread.sleep(1000);
                            } catch (InterruptedException e) {
                                e.printStackTrace();
                            }
                        }
                    } else {
                        break;
                    }
                }
            }
        } else if (task instanceof CancelTransFileTask) {
            cancelTransFileTask = (CancelTransFileTask) task;
        } else {
            task.execute();
        }
        if (monitor.isCanceled()) {
            disConnect(monitoringTask);
            return Status.CANCEL_STATUS;
        }
        final String msg = task.getErrorMsg();
        if (msg != null && msg.length() > 0 && !monitor.isCanceled()) {
            disConnect(monitoringTask);
            return new Status(IStatus.ERROR, CubridManagerUIPlugin.PLUGIN_ID, msg);
        }
        if (task instanceof GetReplServerStatusTask) {
            GetReplServerStatusTask getReplServerStatusTask = (GetReplServerStatusTask) task;
            boolean isActive = getReplServerStatusTask.isActive();
            if (isActive) {
                display.syncExec(new Runnable() {

                    public void run() {
                        isExecuteStopReplServerTask = CommonUITool.openConfirmBox(Messages.bind(Messages.msgConfirmStopReplServer, dbName));
                    }
                });
                if (!isExecuteStopReplServerTask) {
                    disConnect(monitoringTask);
                    return Status.CANCEL_STATUS;
                }
            }
        } else if (task instanceof GetCubridConfParameterTask) {
            GetCubridConfParameterTask getCubridConfParameterTask = (GetCubridConfParameterTask) task;
            confParaMaps = getCubridConfParameterTask.getConfParameters();
            String mdbName = (String) getCubridConfParameterTask.getData("dbName");
            Map<String, String> dbMap = confParaMaps.get("[@" + mdbName + "]");
            if (dbMap == null) {
                Map<String, String> commonMap = confParaMaps.get(ConfConstants.COMMON_SECTION_NAME);
                if (commonMap != null && commonMap.get(ConfConstants.REPLICATION) != null && commonMap.get(ConfConstants.REPLICATION).equalsIgnoreCase("yes")) {
                    isExecuteSetParaTask = false;
                } else if (commonMap != null) {
                    isExecuteSetParaTask = true;
                    commonMap.put(ConfConstants.REPLICATION, "yes");
                }
            } else {
                String replStr = dbMap.get(ConfConstants.REPLICATION);
                if (replStr == null || replStr.equalsIgnoreCase("no")) {
                    isExecuteSetParaTask = true;
                    dbMap.put(ConfConstants.REPLICATION, "yes");
                } else {
                    isExecuteSetParaTask = false;
                }
            }
        } else if (task instanceof GetDatabaseListTask) {
            GetDatabaseListTask getDatabaseListTask = (GetDatabaseListTask) task;
            String mdbName = (String) getDatabaseListTask.getData("dbName");
            List<DatabaseInfo> dbInfoList = getDatabaseListTask.loadDatabaseInfo();
            for (int i = 0; i < dbInfoList.size(); i++) {
                DatabaseInfo dbInfo = dbInfoList.get(i);
                if (mdbName.equalsIgnoreCase(dbInfo.getDbName())) {
                    if (dbInfo.getRunningType() == DbRunningType.CS) {
                        isExecuteStopDbTask = isExecuteSetParaTask;
                    }
                    isExecuteStartDbTask = dbInfo.getRunningType() == DbRunningType.STANDALONE || isExecuteStopDbTask;
                    break;
                }
            }
        } else if (task instanceof TransFileTask) {
            TransFileTask transFileTask = (TransFileTask) task;
            pid = transFileTask.getTransFilePid();
        }
    }
    disConnect(monitoringTask);
    return Status.OK_STATUS;
}
Also used : TransFileProgressInfo(com.cubrid.cubridmanager.core.replication.model.TransFileProgressInfo) MonitorDashboardPreference(com.cubrid.cubridmanager.ui.mondashboard.preference.MonitorDashboardPreference) ITask(com.cubrid.common.core.task.ITask) DatabaseInfo(com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo) ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) StopReplServerTask(com.cubrid.cubridmanager.core.replication.task.StopReplServerTask) CancelTransFileTask(com.cubrid.cubridmanager.core.replication.task.CancelTransFileTask) CancelTransFileTask(com.cubrid.cubridmanager.core.replication.task.CancelTransFileTask) TransFileTask(com.cubrid.cubridmanager.core.replication.task.TransFileTask) MonitoringTask(com.cubrid.cubridmanager.core.common.task.MonitoringTask) CommonUpdateTask(com.cubrid.cubridmanager.core.common.task.CommonUpdateTask) GetTransferProgressTask(com.cubrid.cubridmanager.core.replication.task.GetTransferProgressTask) IStatus(org.eclipse.core.runtime.IStatus) Status(org.eclipse.core.runtime.Status) SetCubridConfParameterTask(com.cubrid.cubridmanager.core.common.task.SetCubridConfParameterTask) GetCubridConfParameterTask(com.cubrid.cubridmanager.core.common.task.GetCubridConfParameterTask) GetDatabaseListTask(com.cubrid.cubridmanager.core.cubrid.database.task.GetDatabaseListTask) GetReplServerStatusTask(com.cubrid.cubridmanager.core.replication.task.GetReplServerStatusTask) Map(java.util.Map) Display(org.eclipse.swt.widgets.Display)

Example 23 with MonitoringTask

use of com.cubrid.cubridmanager.core.common.task.MonitoringTask in project cubrid-manager by CUBRID.

the class CreateReplicationJobExecutor method createSlave.

/**
	 * create slave database
	 * 
	 * @param dbName String
	 * @param monitor IProgressMonitor
	 * @param taskList List<ITask>
	 * @return status
	 */
private IStatus createSlave(String dbName, final IProgressMonitor monitor, List<ITask> taskList) {
    monitor.subTask(Messages.bind(Messages.createSlaveJobName, dbName));
    Display display = Display.getDefault();
    MonitoringTask monitoringTask = null;
    boolean isExecuteStopDbTask = true;
    MonitorDashboardPreference monPref = new MonitorDashboardPreference();
    for (ITask task : taskList) {
        if (task instanceof MonitoringTask) {
            monitoringTask = (MonitoringTask) task;
            ServerInfo serverInfo = monitoringTask.getServerInfo();
            CMHostNodePersistManager.getInstance().addServer(serverInfo.getHostAddress(), serverInfo.getHostMonPort(), serverInfo.getUserName(), serverInfo);
            monitoringTask.connectServer(Version.releaseVersion, monPref.getHAHeartBeatTimeout());
        } else if (task instanceof CommonUpdateTask && task.getTaskname().equals(CommonTaskName.STOP_DB_TASK_NAME)) {
            if (isDeleteDb && isExecuteStopDbTask) {
                task.execute();
            } else {
                continue;
            }
        } else if (task instanceof CommonUpdateTask && task.getTaskname().equals(CommonTaskName.DELETE_DATABASE_TASK_NAME)) {
            if (isDeleteDb) {
                task.execute();
            } else {
                continue;
            }
        } else {
            task.execute();
        }
        if (monitor.isCanceled()) {
            disConnect(monitoringTask);
            return Status.CANCEL_STATUS;
        }
        final String msg = task.getErrorMsg();
        if (msg != null && msg.length() > 0 && !monitor.isCanceled()) {
            disConnect(monitoringTask);
            return new Status(IStatus.ERROR, CubridManagerUIPlugin.PLUGIN_ID, msg);
        }
        if (task instanceof GetDatabaseListTask) {
            GetDatabaseListTask getDatabaseListTask = (GetDatabaseListTask) task;
            final String sdbName = (String) getDatabaseListTask.getData("dbName");
            List<DatabaseInfo> dbInfoList = getDatabaseListTask.loadDatabaseInfo();
            boolean isDbExist = false;
            for (int i = 0; i < dbInfoList.size(); i++) {
                DatabaseInfo dbInfo = dbInfoList.get(i);
                if (dbName.equalsIgnoreCase(dbInfo.getDbName())) {
                    isDbExist = true;
                    display.syncExec(new Runnable() {

                        public void run() {
                            isDeleteDb = CommonUITool.openConfirmBox(Messages.bind(Messages.msgConfirmDeleteDb, sdbName));
                        }
                    });
                    if (dbInfo.getRunningType() == DbRunningType.CS) {
                        isExecuteStopDbTask = true;
                    }
                    break;
                }
            }
            if (isDbExist && !isDeleteDb) {
                disConnect(monitoringTask);
                return Status.CANCEL_STATUS;
            }
        }
    }
    disConnect(monitoringTask);
    isDeleteDb = false;
    return Status.OK_STATUS;
}
Also used : IStatus(org.eclipse.core.runtime.IStatus) Status(org.eclipse.core.runtime.Status) MonitorDashboardPreference(com.cubrid.cubridmanager.ui.mondashboard.preference.MonitorDashboardPreference) ITask(com.cubrid.common.core.task.ITask) DatabaseInfo(com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo) ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) GetDatabaseListTask(com.cubrid.cubridmanager.core.cubrid.database.task.GetDatabaseListTask) MonitoringTask(com.cubrid.cubridmanager.core.common.task.MonitoringTask) CommonUpdateTask(com.cubrid.cubridmanager.core.common.task.CommonUpdateTask) Display(org.eclipse.swt.widgets.Display)

Example 24 with MonitoringTask

use of com.cubrid.cubridmanager.core.common.task.MonitoringTask in project cubrid-manager by CUBRID.

the class CreateReplicationUtil method createMasterTaskGroup.

/**
	 * 
	 * Fill in the related tasks of creating master to executor according master
	 * information
	 * 
	 * @param master MasterNode
	 * @param slaveList List<SlaveNode>
	 * @param executor CreateReplicationJobExecutor
	 * @return null or error message
	 */
public static String createMasterTaskGroup(MasterNode master, List<SlaveNode> slaveList, CreateReplicationJobExecutor executor) {
    TaskGroup taskGroup = new TaskGroup(IConstants.REPL_GROUP_NAME_CREATE_MASTER);
    taskGroup.setTarget(master.getDbName());
    HostNode masterHost = (HostNode) master.getParent();
    final String ip = masterHost.getIp();
    final String port = masterHost.getPort();
    final String userName = masterHost.getUserName();
    final String password = masterHost.getPassword();
    boolean isConnected = ServerManager.getInstance().isConnected(ip, Integer.parseInt(port), userName);
    ServerInfo serverInfo = new ServerInfo();
    if (isConnected) {
        serverInfo = ServerManager.getInstance().getServer(ip, Integer.parseInt(port), userName);
        if (!serverInfo.getLoginedUserInfo().isAdmin()) {
            return Messages.bind(Messages.errInvalidUser, ip);
        }
    } else {
        serverInfo.setHostAddress(ip);
        serverInfo.setHostMonPort(Integer.parseInt(port));
        serverInfo.setHostJSPort(Integer.parseInt(port) + 1);
        serverInfo.setUserName(userName);
        serverInfo.setUserPassword(password);
        MonitoringTask monitoringTask = new MonitoringTask(serverInfo);
        taskGroup.addTask(monitoringTask);
    }
    GetReplServerStatusTask getReplServerStatusTask = new GetReplServerStatusTask(serverInfo);
    getReplServerStatusTask.setDbName(master.getDbName());
    taskGroup.addTask(getReplServerStatusTask);
    StopReplServerTask stopReplServerTask = new StopReplServerTask(serverInfo);
    stopReplServerTask.setDbName(master.getDbName());
    taskGroup.addTask(stopReplServerTask);
    GetCubridConfParameterTask getCubridConfParameterTask = new GetCubridConfParameterTask(serverInfo);
    getCubridConfParameterTask.putData("dbName", master.getDbName());
    taskGroup.addTask(getCubridConfParameterTask);
    SetCubridConfParameterTask setCubridConfParameterTask = new SetCubridConfParameterTask(serverInfo);
    taskGroup.addTask(setCubridConfParameterTask);
    GetDatabaseListTask getDatabaseListTask = new GetDatabaseListTask(serverInfo);
    getDatabaseListTask.putData("dbName", master.getDbName());
    taskGroup.addTask(getDatabaseListTask);
    CommonUpdateTask stopDbTask = new CommonUpdateTask(CommonTaskName.STOP_DB_TASK_NAME, serverInfo, CommonSendMsg.getCommonDatabaseSendMsg());
    stopDbTask.setDbName(master.getDbName());
    taskGroup.addTask(stopDbTask);
    CommonUpdateTask startDbTask = new CommonUpdateTask(CommonTaskName.START_DB_TASK_NAME, serverInfo, CommonSendMsg.getCommonDatabaseSendMsg());
    startDbTask.setDbName(master.getDbName());
    taskGroup.addTask(startDbTask);
    BackupDbTask backupDbTask = new BackupDbTask(serverInfo);
    backupDbTask.setDbName(master.getDbName());
    backupDbTask.setLevel("0");
    backupDbTask.setVolumeName(master.getDbName() + "_bk0v000");
    backupDbTask.setBackupDir(master.getDbPath());
    backupDbTask.setRemoveLog(false);
    backupDbTask.setCheckDatabaseConsist(true);
    backupDbTask.setThreadCount(String.valueOf(0));
    backupDbTask.setZiped(false);
    backupDbTask.setSafeReplication(false);
    taskGroup.addTask(backupDbTask);
    CancelTransFileTask cancelTransFileTask = new CancelTransFileTask(serverInfo);
    taskGroup.addTask(cancelTransFileTask);
    for (int i = 0; i < slaveList.size(); i++) {
        SlaveNode slave = slaveList.get(i);
        HostNode slaveHost = (HostNode) slave.getParent();
        TransFileTask transFileTask = new TransFileTask(serverInfo);
        transFileTask.setMasterDbDir(master.getDbPath());
        List<String> fileList = new ArrayList<String>();
        fileList.add(master.getDbName() + "_bk0v000");
        fileList.add(master.getDbName() + "_bkvinf");
        transFileTask.setBackupFileList(fileList);
        transFileTask.setSlaveDbHost(slaveHost.getIp());
        transFileTask.setSlaveCmServerPort(String.valueOf(Integer.parseInt(slaveHost.getPort()) + 1));
        transFileTask.setSlaveDbDir(slave.getDbPath());
        taskGroup.addTask(transFileTask);
        GetTransferProgressTask getTransferProgressTask = new GetTransferProgressTask(serverInfo);
        taskGroup.addTask(getTransferProgressTask);
    }
    executor.addGroupTask(taskGroup);
    return null;
}
Also used : SlaveNode(com.cubrid.cubridmanager.ui.replication.editor.model.SlaveNode) ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) HostNode(com.cubrid.cubridmanager.ui.replication.editor.model.HostNode) SetCubridConfParameterTask(com.cubrid.cubridmanager.core.common.task.SetCubridConfParameterTask) ArrayList(java.util.ArrayList) BackupDbTask(com.cubrid.cubridmanager.core.cubrid.database.task.BackupDbTask) GetCubridConfParameterTask(com.cubrid.cubridmanager.core.common.task.GetCubridConfParameterTask) GetDatabaseListTask(com.cubrid.cubridmanager.core.cubrid.database.task.GetDatabaseListTask) GetReplServerStatusTask(com.cubrid.cubridmanager.core.replication.task.GetReplServerStatusTask) StopReplServerTask(com.cubrid.cubridmanager.core.replication.task.StopReplServerTask) CancelTransFileTask(com.cubrid.cubridmanager.core.replication.task.CancelTransFileTask) CancelTransFileTask(com.cubrid.cubridmanager.core.replication.task.CancelTransFileTask) TransFileTask(com.cubrid.cubridmanager.core.replication.task.TransFileTask) MonitoringTask(com.cubrid.cubridmanager.core.common.task.MonitoringTask) CommonUpdateTask(com.cubrid.cubridmanager.core.common.task.CommonUpdateTask) TaskGroup(com.cubrid.common.ui.spi.progress.TaskGroup) GetTransferProgressTask(com.cubrid.cubridmanager.core.replication.task.GetTransferProgressTask)

Example 25 with MonitoringTask

use of com.cubrid.cubridmanager.core.common.task.MonitoringTask in project cubrid-manager by CUBRID.

the class CreateReplicationUtil method createDistributorTaskGroup.

/**
	 * 
	 * Fill in the tasks of creating distributor to executor
	 * 
	 * @param master MasterNode
	 * @param slave SlaveNode
	 * @param dist DistributorNode
	 * @param executor CreateReplicationJobExecutor
	 * @return null or error message
	 */
public static String createDistributorTaskGroup(MasterNode master, SlaveNode slave, DistributorNode dist, CreateReplicationJobExecutor executor) {
    TaskGroup taskGroup = new TaskGroup(IConstants.REPL_GROUP_NAME_CREATE_DIST);
    taskGroup.setTarget(dist.getDbName());
    HostNode distdbHost = (HostNode) dist.getParent();
    HostNode slaveHost = (HostNode) slave.getParent();
    final String ip = distdbHost.getIp();
    final String port = distdbHost.getPort();
    final String userName = distdbHost.getUserName();
    final String password = distdbHost.getPassword();
    boolean isConnected = ServerManager.getInstance().isConnected(ip, Integer.parseInt(port), userName);
    ServerInfo serverInfo = new ServerInfo();
    if (isConnected) {
        serverInfo = ServerManager.getInstance().getServer(ip, Integer.parseInt(port), userName);
        if (!serverInfo.getLoginedUserInfo().isAdmin()) {
            return Messages.bind(Messages.errInvalidUser, ip);
        }
    } else {
        serverInfo.setHostAddress(ip);
        serverInfo.setHostMonPort(Integer.parseInt(port));
        serverInfo.setHostJSPort(Integer.parseInt(port) + 1);
        serverInfo.setUserName(userName);
        serverInfo.setUserPassword(password);
        MonitoringTask monitoringTask = new MonitoringTask(serverInfo);
        taskGroup.addTask(monitoringTask);
    }
    addCheckDbTaskGroup(serverInfo, dist.getDbName(), taskGroup);
    CreateDistributorTask createDistributorTask = new CreateDistributorTask(serverInfo);
    createDistributorTask.setDistDbName(dist.getDbName());
    createDistributorTask.setDistDbPath(dist.getDbPath());
    createDistributorTask.setDbaPassword(dist.getDbaPassword());
    createDistributorTask.setReplAgentPort(dist.getReplAgentPort());
    createDistributorTask.setMasterDbName(slave.getDbName());
    createDistributorTask.setMasterDbIp(slaveHost.getIp());
    createDistributorTask.setReplServerPort(master.getReplServerPort());
    createDistributorTask.setCopyLogPath(dist.getCopyLogPath());
    createDistributorTask.setErrorLogPath(dist.getErrorLogPath());
    createDistributorTask.setTrailLogPath(dist.getTrailLogPath());
    createDistributorTask.setDelayTimeLogSize(dist.getDelayTimeLogSize());
    createDistributorTask.setRestartRepl(dist.isRestartWhenError());
    taskGroup.addTask(createDistributorTask);
    executor.addGroupTask(taskGroup);
    return null;
}
Also used : ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) CreateDistributorTask(com.cubrid.cubridmanager.core.replication.task.CreateDistributorTask) HostNode(com.cubrid.cubridmanager.ui.replication.editor.model.HostNode) MonitoringTask(com.cubrid.cubridmanager.core.common.task.MonitoringTask) TaskGroup(com.cubrid.common.ui.spi.progress.TaskGroup)

Aggregations

MonitoringTask (com.cubrid.cubridmanager.core.common.task.MonitoringTask)30 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)24 GetDatabaseListTask (com.cubrid.cubridmanager.core.cubrid.database.task.GetDatabaseListTask)17 DatabaseInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo)12 ITask (com.cubrid.common.core.task.ITask)11 GetCubridConfParameterTask (com.cubrid.cubridmanager.core.common.task.GetCubridConfParameterTask)11 GetCMUserListTask (com.cubrid.cubridmanager.core.common.task.GetCMUserListTask)10 MonitorDashboardPreference (com.cubrid.cubridmanager.ui.mondashboard.preference.MonitorDashboardPreference)10 GetCMConfParameterTask (com.cubrid.cubridmanager.core.common.task.GetCMConfParameterTask)9 GetEnvInfoTask (com.cubrid.cubridmanager.core.common.task.GetEnvInfoTask)9 TaskGroup (com.cubrid.common.ui.spi.progress.TaskGroup)8 GetBrokerConfParameterTask (com.cubrid.cubridmanager.core.broker.task.GetBrokerConfParameterTask)8 ArrayList (java.util.ArrayList)8 Map (java.util.Map)8 ServerType (com.cubrid.cubridmanager.core.common.model.ServerType)7 ServerUserInfo (com.cubrid.cubridmanager.core.common.model.ServerUserInfo)7 UpdateCMUserTask (com.cubrid.cubridmanager.core.common.task.UpdateCMUserTask)7 HostNode (com.cubrid.cubridmanager.ui.replication.editor.model.HostNode)7 IStatus (org.eclipse.core.runtime.IStatus)6 Status (org.eclipse.core.runtime.Status)6