com.alibaba.dts.sdk.DtsSDKManager Maven / Gradle / Ivy
package com.alibaba.dts.sdk;
import java.util.List;
import com.alibaba.dts.common.domain.result.Result;
import com.alibaba.dts.common.domain.store.Cluster;
import com.alibaba.dts.common.domain.store.Job;
import com.alibaba.dts.common.domain.store.assemble.*;
/**
* Created by luliang on 14/12/24.
*/
public interface DtsSDKManager {
/**
* 所有的集群信息;
*
*/
public Result> getDtsClustersInfo();
/**
* 创建用户组;
* clusterId
* groupDescription
*
*/
public Result createGroup(long clusterId, String groupDescription);
/**
* 删除组
* userGroupId:页面显示的组ID,非数据库中的组ID;
*
*/
public Result deleteGroup(String userGroupId);
/**
*
* clusterId 集群的ID;
*
*/
public Result> getUserGroups(long clusterId);
/**
*
* userGroupId
* job
*
*/
public Result createJob(String userGroupId, Job job);
/**
*
* jobId
*
*/
public Result deleteJob(long jobId);
/**
*
* job
*
*/
public Result updateJob(String groupId, Job job);
/**
*
* job
*
*/
public Result updateJobWithArguments(String groupId, Job job);
/**
* 修改Job参数;
* jobId
* jobArguments
*
*/
public Result updateJobArguments(long jobId, String jobArguments);
/**
* 查询一个组中所有的JOB;
* userGroupId
*
*/
public Result> getJobsForGroup(String userGroupId);
/**
* 使一个任务生效,默认使自动创建生效,也可以调用这个方法再生效;
* jobId
*
*/
public Result enableJob(long jobId);
/**
* 使一个任务实效;
* jobId
*
*/
public Result disableJob(long jobId);
/**
* 使一个任务立即运行一次;
* jobId
*
*/
public Result instanceRunJob(String userGroupId, long jobId);
/**
* 使一个任务立即运行一次;
* userGroupId
* jobId
* instanceGlobal
*
*/
public Result instanceRunJob(String userGroupId, long jobId, String instanceGlobal);
/**
* 立即停止
* jobId
*
*/
public Result instanceStopJob(long jobId);
/**
* 授权给用户;
* userGroupId 授权的系统显示的组ID
* ownerUserId 拥有者的阿里云账户ID
* grantUserId 要授权给的用户的ID
*
*/
public Result grantGroupAuth(String userGroupId, String ownerUserId, String grantUserId);
/**
* 给一个用户的JOB添加监控配置
* assembledMonitor
*
*/
public Result setJobMonitorConfig(AssembledMonitor assembledMonitor);
/**
* 更新监控
* monitorSeting
*
*/
public Result updateJobMonitor(AssembledMonitor monitorSeting);
public Result getMonitorSetings(long jobId);
/**
* 得到JOB目前的状况
* jobId
*
*/
public Result getJobRunningStatus(long jobId);
/**
*
* jobId
*
*/
public Result getJobDetailRunningStatus(long jobId, long instanceId);
public Result getJobRunningHistoryStatus(long jobId);
public Result getJobConfig(long jobId);
public Result getJobRunningInformations(long jobInstanceId);
public Result getJobLastInstanceId(long jobId);
public Result getJobRunningHistoryStatusById(long jobId, long instanceId);
}