public class DLIClient extends Object
Constructor and Description |
---|
DLIClient(AuthenticationMode mode,
DLIInfo info) |
Modifier and Type | Method and Description |
---|---|
com.huawei.dli.restapi.model.GlobalResponse |
authorizeBucket(com.huawei.dli.restapi.model.ObsBuckets obsBuckets)
用户主动授权起OBS桶的操作权限给DLI服务, 用于保存用户作业的checkpoint、作业的运行日志等
|
void |
cancelJob(String jobId)
Cancel LAUNCHING,RUNNING status job,
and the job status changes to CANCELLED.
|
com.huawei.dli.restapi.model.ResponseJobInfo |
checkSQL(String sql)
Check the syntax of SQL, if syntax is wrong, it will throw exception.
|
com.huawei.dli.restapi.model.ResponseJobInfo |
checkSQL(String sql,
String currentdb)
Check the syntax of SQL, if syntax is wrong, it will throw exception.
|
Cluster |
createCluster(String clusterName,
int cuCount,
String description)
Create a cluster.
|
Database |
createDatabase(String databaseName) |
Database |
createDatabase(String databaseName,
String description)
Create a database,must sure databaseName is not exist,
and there are enough quotas.
|
Database |
createDatabase(String databaseName,
String description,
String enterpriseProjectId) |
com.huawei.dli.restapi.model.JobStatusResponse |
createFlinkJarJob(com.huawei.dli.restapi.model.CreateFlinkJarJobRequest body)
创建一个用户自定义Flink作业
用户自定义作业目前支持jar格式, 运行在独享集群中
|
com.huawei.dli.restapi.model.FlinkJobTemplateCreateResponse |
createFlinkJobTemplate(com.huawei.dli.restapi.model.CreateFlinkJobTemplateRequest body)
创建作业模板
Create job template on Data lake insight
|
Queue |
createQueue(String queueName,
int cuCount,
ChargingMode chargingMode,
String description)
Create a queue.
|
com.huawei.dli.restapi.model.CreateTsdbResp |
createTsdb(com.huawei.dli.restapi.model.CreateTsdbReq createTsdbReq,
String projectId)
创建时序数据库配置信息
|
com.huawei.dli.restapi.model.MessageInfo |
delBatchJob(String batchId)
Delete batchJob by batchId
|
List<com.huawei.dli.restapi.model.GlobalBatchResponse> |
deleteFlinkJobInBatch(com.huawei.dli.restapi.model.DeleteJobInBatchRequest body)
批量删除作业
|
com.huawei.dli.restapi.model.FlinkJobTemplateDeleteResponse |
deleteFlinkJobTemplate(Long templateId)
删除作业模板
当前模板被引用也允许删除模板
|
com.huawei.dli.restapi.model.GlobalResponse |
deleteJob(Long jobId)
删除任何状态的作业
|
void |
deleteResource(String resourceName)
Delete package resources by name.
|
void |
deleteResource(String resourceName,
String group)
Delete package resources by name and group.
|
com.huawei.dli.restapi.model.GlobalResponse |
deleteTsdb(String projectId,
String tsdbId)
删除时序数据库配置信息
删除时序数据库配置信息
|
Authentication |
getAuthentication() |
String |
getAuthToken() |
Cluster |
getCluster(String clusterName)
Get a Cluster object by queueName.
|
Database |
getDatabase(String databaseName) |
Queue |
getDefaultQueue()
Get default queue,
get a Queue object and queueName is "default"
|
DLIInfo |
getDLIInfo() |
com.huawei.dli.restapi.model.FlinkJobApigSinksResponse |
getFlinkApigSinks(Long jobId)
查询作业apig网关服务访问地址
The apig sinks is json format.
|
com.huawei.dli.restapi.model.GetFlinkJobDetailResponse |
getFlinkJobDetail(Long jobId)
查询作业详情
Get job detail information.
|
com.huawei.dli.restapi.model.FlinkJobExecutePlanResponse |
getFlinkJobExecuteGraph(Long jobId)
查询作业执行计划图
The execution graph is json format.
|
com.huawei.dli.restapi.model.QueryFlinkJobListResponse |
getFlinkJobs(String name,
String status,
String queueName,
Boolean showDetail,
Long offset,
Integer limit,
String order,
Long rootJobId,
String username,
String jobType,
String showJobType)
查询作业列表
作业列表查询, 支持以下参数: name, status, show_detail, offset, limit, order, root_job_id.
|
com.huawei.dli.restapi.model.QueryFlinkJobMetricsResponse |
getFlinkJobsMetrics(com.huawei.dli.restapi.model.GetFlinkJobsMetricsBody body)
查询作业监控信息
查询作业监控信息, 支持同时查询多个作业监控信息
|
com.huawei.dli.restapi.model.FlinkJobTemplateListResponse |
getFlinkJobTemplates(Long offset,
Integer limit,
String order)
查询作业模板列表
|
JobProgressResultInfo |
getJobProgress(String jobId)
Obtains the job execution progress based on jobId.
|
String |
getProjectId() |
Queue |
getQueue(String queueName)
Get a Queue object by queueName.Must be sure that the name exists,
otherwise throw exception:"There is no Queue named"
|
PackageResource |
getResource(String resourceName)
Get a PackageResource object by resourceName.
|
PackageResource |
getResource(String resourceName,
String group)
Get a PackageResource object by resourceName.
|
com.huawei.dli.restapi.api.RestApi |
getRestApi() |
com.huawei.dli.restapi.model.GetTsdbByIdResp |
getTsdbById(String projectId,
Long tsdbId)
查询时序数据库配置信息详情
根据时序数据库ID,查询时序数据库详情
|
com.huawei.dli.restapi.model.GetTsdbListResp |
getTsdbList(String projectId,
Integer offset,
Integer limit)
查询时序数据库配置信息列表
|
List<SparkJobResultInfo> |
listAllBatchJobs(BatchListFilter batchListFilter)
GET /v2.0/{project_id}/batches
Lists the currently user-owned Spark batch jobs.
|
List<SparkJobResultInfo> |
listAllBatchJobs(String clusterName,
int from,
int size)
Lists the currently user-owned Spark batch jobs.
|
List<Cluster> |
listAllClusters()
Lists the currently user-owned Clusters.
|
List<Database> |
listAllDatabases()
List the currently user-owned all databases .
|
List<JobResultInfo> |
listAllJobs()
Get all JobsResultInfo list below the current project.
|
List<JobResultInfo> |
listAllJobs(Integer pageSize,
Integer currentPage,
JobType jobType)
Get all JobsResultInfo list below the current project.
|
List<JobResultInfo> |
listAllJobs(Integer pageSize,
Integer currentPage,
Long start,
Long end,
JobType jobType)
Get all JobsResultInfo list below the current project.
|
List<JobResultInfo> |
listAllJobs(JobFilter jobFilter)
Get all JobsResultInfo list below the current project.
|
List<JobResultInfo> |
listAllJobs(JobType jobType)
Get all JobsResultInfo list below the current project.
|
List<JobResultInfo> |
listAllJobs(Long start,
Long end,
JobType jobType)
Get all JobsResultInfo list below the current project.
|
List<Queue> |
listAllQueues()
Lists the currently user-owned Queues.
|
Resources |
listAllResources()
Lists the currently user-owned Resources.
|
List<JobResultInfo> |
listAllSQLJobs(JobFilter jobFilter)
Query all the information of the recently executed sql job submitted in the edit box under the current project.
|
List<JobResultInfo> |
listJobsByPage(JobFilter jobFilter)
Get specify page and pageSize JobsResultInfo list below the current project.
|
List<JobResultInfo> |
listSQLJobs()
Query the information of the recently executed job submitted in the edit box under the current project.
|
List<JobResultInfo> |
listSQLJobs(Integer pageSize,
Integer currentPage)
Query the information of the recently executed job submitted in the edit box under the current project.
|
List<JobResultInfo> |
listSQLJobsByPage(JobFilter jobFilter)
Query the information of the recently executed job submitted in the edit box under the current project.
|
JobResultInfo |
queryJobResultInfo(String jobId)
Queue the JobResultInfo by job id.
|
com.huawei.dli.restapi.model.QueueActionResponse |
queueAction(String queueName,
com.huawei.dli.restapi.model.QueueActionRequest body)
队列操作
|
List<com.huawei.dli.restapi.model.GlobalBatchResponse> |
runFlinkJob(com.huawei.dli.restapi.model.RunFlinkJobRequest body)
批量运行作业
触发运行作业
|
void |
setAccessKey(String accessKey) |
void |
setAuthToken(String authToken) |
void |
setConnectTimeout(int connectionTimeout)
Set the default connect timeout for new connections.
|
void |
setHttpClient(okhttp3.OkHttpClient httpClient)
Set httpClient for new connections.
|
void |
setProxy(String proxyHost,
int proxyPort)
Set proxy for new connections.
|
void |
setReadTimeout(int readTimeout)
Set the default read timeout for new connections.
|
void |
setSecretKey(String secretKey) |
void |
setSecurityToken(String securityToken) |
com.huawei.dli.restapi.model.PartitionResult |
showPartitions(String databaseName,
String tableName)
Get describes the partition information for the specified table
|
com.huawei.dli.restapi.model.PartitionResult |
showPartitions(String databaseName,
String tableName,
Integer offset,
Integer limit)
Get describes the partition information for the table in specified offset and limit.
|
List<com.huawei.dli.restapi.model.GlobalBatchResponse> |
stopFlinkJob(com.huawei.dli.restapi.model.StopFlinkJobRequest body)
批量停止作业
|
com.huawei.dli.restapi.model.GlobalBatchResponse |
stopSingleFlinkJob(Long jobId,
Boolean isResumeSavepoint)
取消flink自定义作业
|
com.huawei.dli.restapi.model.JobStatusResponse |
submitFlinkSqlJob(com.huawei.dli.restapi.model.SubmitFlinkSqlJobRequest body)
提交流式SQL作业到DLI服务
通过POST方式, 提交流式SQL作业, 请求体为JSON格式
|
com.huawei.dli.restapi.model.JobUpdateResponse |
updateFlinkJarJob(com.huawei.dli.restapi.model.UpdateFlinkJarJobRequest body,
Long jobId)
更新用户自定义Flink作业
目前仅支持Jar格式, 运行在独享集群中
|
com.huawei.dli.restapi.model.GlobalResponse |
updateFlinkJobTemplate(com.huawei.dli.restapi.model.UpdateFlinkJobTemplateRequest body,
Long templateId)
更新作业模板
Update job template on Data lake insight
|
com.huawei.dli.restapi.model.JobUpdateResponse |
updateFlinkSqlJob(com.huawei.dli.restapi.model.UpdateFlinkSqlJobRequest body,
Long jobId)
更新流式SQL作业
流式SQL的语法扩展了Apache Flink SQL, 具体详情请参考DLI官方文档
|
void |
updateResourceOrGroupOwner(com.huawei.dli.restapi.model.UpdateResourceOwner updateResourceOwner)
Update resource or group owner
|
com.huawei.dli.restapi.model.GlobalResponse |
updateTsdb(String projectId,
String tsdbId,
com.huawei.dli.restapi.model.UpdateTsdbReq updateTsdbReq)
修改时序数据库配置信息
修改时序数据库配置信息
|
List<PackageResource> |
uploadResources(String kind,
String[] paths,
String description)
Upload resources sync.
|
List<PackageResource> |
uploadResources(String kind,
String group,
String[] paths,
String description)
Upload resources sync.
|
List<String> |
uploadResourcesAsync(String kind,
String[] paths,
String description)
Upload resources async.
|
List<String> |
uploadResourcesAsync(String kind,
String group,
String[] paths,
String description)
Upload resources async.
|
public DLIClient(AuthenticationMode mode, DLIInfo info)
public void setAuthToken(String authToken)
public void setAccessKey(String accessKey)
public void setSecretKey(String secretKey)
public void setSecurityToken(String securityToken)
public Authentication getAuthentication()
public DLIInfo getDLIInfo()
public com.huawei.dli.restapi.api.RestApi getRestApi()
public String getProjectId()
public String getAuthToken() throws DLIException
DLIException
public void setConnectTimeout(int connectionTimeout)
connectionTimeout
- Unit:SECONDSpublic void setReadTimeout(int readTimeout)
readTimeout
- Unit:SECONDSpublic void setProxy(String proxyHost, int proxyPort)
proxyHost
- proxy ipproxyPort
- proxy portpublic void setHttpClient(okhttp3.OkHttpClient httpClient)
httpClient
- http clientpublic com.huawei.dli.restapi.model.QueueActionResponse queueAction(String queueName, com.huawei.dli.restapi.model.QueueActionRequest body) throws DLIException
queueName
- queue名称,指定queue (required)body
- 队列操作请求体, 请求参数为json格式 (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.GlobalResponse authorizeBucket(com.huawei.dli.restapi.model.ObsBuckets obsBuckets) throws DLIException
obsBuckets
- 授权一个或多个OBS bucket权限给Data lake insight, 请求参数为json格式 (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.JobStatusResponse submitFlinkSqlJob(com.huawei.dli.restapi.model.SubmitFlinkSqlJobRequest body) throws DLIException
body
- 提交创建SQL作业请求 (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.JobUpdateResponse updateFlinkSqlJob(com.huawei.dli.restapi.model.UpdateFlinkSqlJobRequest body, Long jobId) throws DLIException
body
- 提交修改SQL作业请求 (required)jobId
- 作业ID (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.JobStatusResponse createFlinkJarJob(com.huawei.dli.restapi.model.CreateFlinkJarJobRequest body) throws DLIException
body
- 提交创建自定义Flink作业请求 (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.JobUpdateResponse updateFlinkJarJob(com.huawei.dli.restapi.model.UpdateFlinkJarJobRequest body, Long jobId) throws DLIException
body
- 提交修改自定义Flink作业请求 (required)jobId
- 作业ID (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.QueryFlinkJobMetricsResponse getFlinkJobsMetrics(com.huawei.dli.restapi.model.GetFlinkJobsMetricsBody body) throws DLIException
body
- 查询作业监控信息, 支持同时查询多个作业监控, 请求参数为json格式 (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.QueryFlinkJobListResponse getFlinkJobs(String name, String status, String queueName, Boolean showDetail, Long offset, Integer limit, String order, Long rootJobId, String username, String jobType, String showJobType) throws DLIException
name
- 作业名 (optional)status
- 作业状态码, 请参考DLI文档 (optional)queueName
- 队列名称 (optional)showDetail
- 是否返回作业详情信息 (optional, default to false)offset
- 作业偏移量 (optional)limit
- 返回的数据条数 (optional, default to 20)order
- 查询结果排序, 升序和降序两种可选 (optional, default to desc)rootJobId
- 边缘父作业ID, 用于查询指定边缘作业的子作业; 不带该参数时, 查询所有非边缘作业和边缘父作业,
不包括边缘子作业 (optional)username
- 执行作业的用户名jobType
- 作业类型showJobType
- 显示作业类型DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.GetFlinkJobDetailResponse getFlinkJobDetail(Long jobId) throws DLIException
jobId
- 作业ID (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.GlobalResponse deleteJob(Long jobId) throws DLIException
jobId
- 作业ID (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<com.huawei.dli.restapi.model.GlobalBatchResponse> deleteFlinkJobInBatch(com.huawei.dli.restapi.model.DeleteJobInBatchRequest body) throws DLIException
body
- 作业ID数组 (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<com.huawei.dli.restapi.model.GlobalBatchResponse> runFlinkJob(com.huawei.dli.restapi.model.RunFlinkJobRequest body) throws DLIException
body
- 提交批量运行作业请求, 请求参数为json格式 (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<com.huawei.dli.restapi.model.GlobalBatchResponse> stopFlinkJob(com.huawei.dli.restapi.model.StopFlinkJobRequest body) throws DLIException
body
- 提交批量停止作业请求, 请求参数为json格式 (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.GlobalBatchResponse stopSingleFlinkJob(Long jobId, Boolean isResumeSavepoint) throws DLIException
jobId
- 取消flink自定义作业id (required)isResumeSavepoint
- 是否恢复savepointDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.FlinkJobExecutePlanResponse getFlinkJobExecuteGraph(Long jobId) throws DLIException
jobId
- 作业ID (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.FlinkJobApigSinksResponse getFlinkApigSinks(Long jobId) throws DLIException
jobId
- 作业ID (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.FlinkJobTemplateListResponse getFlinkJobTemplates(Long offset, Integer limit, String order) throws DLIException
offset
- 作业偏移量 (optional)limit
- 查询条数限制 (optional)order
- 查询结果排序, 升序和降序两种可选 (optional, default to desc)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.FlinkJobTemplateDeleteResponse deleteFlinkJobTemplate(Long templateId) throws DLIException
templateId
- (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.FlinkJobTemplateCreateResponse createFlinkJobTemplate(com.huawei.dli.restapi.model.CreateFlinkJobTemplateRequest body) throws DLIException
body
- Create job template request (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.GlobalResponse updateFlinkJobTemplate(com.huawei.dli.restapi.model.UpdateFlinkJobTemplateRequest body, Long templateId) throws DLIException
body
- 提交修改SQL作业模板请求 (required)templateId
- 作业模板IDDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<Queue> listAllQueues() throws DLIException
DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic Queue getDefaultQueue() throws DLIException
DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic Queue getQueue(String queueName) throws DLIException
queueName
- queue nameDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic Queue createQueue(String queueName, int cuCount, ChargingMode chargingMode, String description) throws DLIException
queueName
- The name of the newly created resource queue.
Names can only contain numbers,
English letters, and underscores,
but they cannot be pure numbers,
and cannot begin with an underscore.cuCount
- The minimum number of calculation units bound to the queue.chargingMode
- Queue charging modeldescription
- The description of the queue.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic Database createDatabase(String databaseName) throws DLIException
databaseName
- database nameDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic Database createDatabase(String databaseName, String description) throws DLIException
databaseName
- database namedescription
- the description of databaseDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic Database createDatabase(String databaseName, String description, String enterpriseProjectId) throws DLIException
DLIException
public Database getDatabase(String databaseName) throws DLIException
DLIException
public List<Database> listAllDatabases() throws DLIException
DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic JobProgressResultInfo getJobProgress(String jobId) throws DLIException
jobId
- the job idDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<JobResultInfo> listAllJobs() throws DLIException
DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<JobResultInfo> listAllJobs(JobType jobType) throws DLIException
jobType
- the job type enum valueDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<JobResultInfo> listAllJobs(Long start, Long end, JobType jobType) throws DLIException
start
- Used to query jobs that start after this time.end
- Used to query jobs whose start time is before this point in time.jobType
- Such as:JobType.DDLDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<JobResultInfo> listAllJobs(Integer pageSize, Integer currentPage, JobType jobType) throws DLIException
pageSize
- The maximum number of jobs displayed on each page, in the range: [1, 100].currentPage
- The current page number, the default is the first page.jobType
- Such as:JobType.DDLDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<JobResultInfo> listAllJobs(Integer pageSize, Integer currentPage, Long start, Long end, JobType jobType) throws DLIException
pageSize
- The maximum number of jobs displayed on each page, in the range: [1, 100].currentPage
- The current page number, the default is the first page.start
- Used to query jobs that start after this time.end
- Used to query jobs whose start time is before this point in time.jobType
- Such as:JobType.DDLDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<JobResultInfo> listAllJobs(JobFilter jobFilter) throws DLIException
jobFilter
- the filter conditions.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<JobResultInfo> listJobsByPage(JobFilter jobFilter) throws DLIException
jobFilter
- the filter conditions.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic JobResultInfo queryJobResultInfo(String jobId) throws DLIException
jobId
- Such as:"9e093e36-6efe-4549-8f04-db6f83c3c439".DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<JobResultInfo> listSQLJobs() throws DLIException
DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<JobResultInfo> listSQLJobs(Integer pageSize, Integer currentPage) throws DLIException
pageSize
- The maximum number of jobs displayed on each page, in the range: [1, 100].currentPage
- The current page number, the default is the first page.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<JobResultInfo> listAllSQLJobs(JobFilter jobFilter) throws DLIException
jobFilter
- the filter conditions, such as tags.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<JobResultInfo> listSQLJobsByPage(JobFilter jobFilter) throws DLIException
jobFilter
- the filter conditions, such as pageSize, currentPage and tags.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic void cancelJob(String jobId) throws DLIException
jobId
- Such as:"9e093e36-6efe-4549-8f04-db6f83c3c439".DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.ResponseJobInfo checkSQL(String sql) throws DLIException
sql
- The sql which should be checked.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.ResponseJobInfo checkSQL(String sql, String currentdb) throws DLIException
sql
- The sql which should be checked.currentdb
- The database name of sql.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic Cluster createCluster(String clusterName, int cuCount, String description) throws DLIException
clusterName
- Name of a new cluster. The name can contain only digits, letters, and underscores (_),
but cannot contain only digits or start with an underscore (_).cuCount
- Number of computing units (units to be billed) bound to a cluster.description
- Description of a cluster.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic Cluster getCluster(String clusterName) throws DLIException
clusterName
- Name of a new cluster. The name can contain only digits, letters, and underscores (_),
but cannot contain only digits or start with an underscore (_).DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<Cluster> listAllClusters() throws DLIException
DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<String> uploadResourcesAsync(String kind, String[] paths, String description) throws DLIException
kind
- Resource type. Only support jar, pyFile, file.paths
- List of OBS object paths. The OBS object path refers to the OBS object URL.description
- Package resource description.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<String> uploadResourcesAsync(String kind, String group, String[] paths, String description) throws DLIException
kind
- Resource type. Only support jar, pyFile, file.group
- The name of the group to be created.paths
- List of OBS object paths. The OBS object path refers to the OBS object URL.description
- Package resource description.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<PackageResource> uploadResources(String kind, String[] paths, String description) throws DLIException
kind
- Resource type. Only support jar, pyFile, file.paths
- List of OBS object paths. The OBS object path refers to the OBS object URL.description
- Package resource description.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<PackageResource> uploadResources(String kind, String group, String[] paths, String description) throws DLIException
kind
- Resource type. Only support jar, pyFile, file.group
- The name of the group to be created.paths
- List of OBS object paths. The OBS object path refers to the OBS object URL.description
- Package resource description.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic PackageResource getResource(String resourceName) throws DLIException
resourceName
- Name of the resource package returned when the resource package is uploaded.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic PackageResource getResource(String resourceName, String group) throws DLIException
resourceName
- Name of the resource package returned when the resource package is uploaded.group
- The name of the resource groupDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic Resources listAllResources() throws DLIException
DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic void deleteResource(String resourceName) throws DLIException
resourceName
- name of the resource packageDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic void deleteResource(String resourceName, String group) throws DLIException
resourceName
- Name of the resource packagegroup
- If group is not null,will delete the resource in the groupDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic void updateResourceOrGroupOwner(com.huawei.dli.restapi.model.UpdateResourceOwner updateResourceOwner) throws DLIException
updateResourceOwner
- new owner of the resource or groupDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<SparkJobResultInfo> listAllBatchJobs(String clusterName, int from, int size) throws DLIException
clusterName
- Name of a cluster, which running the batch job.from
- Index number of the start batch processing job. By default, the index number starts from 0.size
- Number of batch processing jobs.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic List<SparkJobResultInfo> listAllBatchJobs(BatchListFilter batchListFilter) throws DLIException
batchListFilter
- the filter conditions.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.MessageInfo delBatchJob(String batchId) throws DLIException
batchId
- batch idDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.PartitionResult showPartitions(String databaseName, String tableName, Integer offset, Integer limit) throws DLIException
databaseName
- database nametableName
- table nameoffset
- get offsetlimit
- get limitDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.PartitionResult showPartitions(String databaseName, String tableName) throws DLIException
databaseName
- database nametableName
- table nameDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.CreateTsdbResp createTsdb(com.huawei.dli.restapi.model.CreateTsdbReq createTsdbReq, String projectId) throws DLIException
createTsdbReq
- This is a auto create Body Object (required)projectId
- (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.GlobalResponse deleteTsdb(String projectId, String tsdbId) throws DLIException
projectId
- (required)tsdbId
- (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.GetTsdbByIdResp getTsdbById(String projectId, Long tsdbId) throws DLIException
projectId
- 项目ID (required)tsdbId
- 时序数据库的ID (required)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.GetTsdbListResp getTsdbList(String projectId, Integer offset, Integer limit) throws DLIException
projectId
- (required)offset
- 偏移量 (optional, default to 0)limit
- 每页的数量 (optional, default to 10)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic com.huawei.dli.restapi.model.GlobalResponse updateTsdb(String projectId, String tsdbId, com.huawei.dli.restapi.model.UpdateTsdbReq updateTsdbReq) throws DLIException
projectId
- (required)tsdbId
- (required)updateTsdbReq
- This is a auto create Body Object (optional)DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyCopyright © 2023. All rights reserved.