public class DatahubClientJsonImpl extends AbstractDatahubClient
| 构造器和说明 |
|---|
DatahubClientJsonImpl(String endpoint,
Account account,
HttpConfig httpConfig,
String userAgent) |
| 限定符和类型 | 方法和说明 |
|---|---|
AppendConnectorFieldResult |
appendConnectorField(String projectName,
String topicName,
ConnectorType connectorType,
String fieldName) |
AppendConnectorFieldResult |
appendConnectorField(String projectName,
String topicName,
String connectorId,
String fieldName)
Append data connector field
|
AppendFieldResult |
appendField(String projectName,
String topicName,
Field field)
Append a field to a TUPLE topic.
|
AppendFieldResult |
appendField(String projectName,
String topicName,
List<Field> fields)
Append multiple fields to a TUPLE topic.
|
CommitSubscriptionOffsetResult |
commitSubscriptionOffset(String projectName,
String topicName,
String subId,
Map<String,SubscriptionOffset> offsets)
Update offsets of shards to server.
|
CreateAlarmRuleResult |
createAlarmRule(String projectName,
String topicName,
AlarmRule alarmRule)
Create alarm rule.
|
CreateConnectorResult |
createConnector(String projectName,
String topicName,
ConnectorType connectorType,
List<String> columnFields,
ConnectorConfig config)
Create datahub data connectors.
|
CreateConnectorResult |
createConnector(String projectName,
String topicName,
ConnectorType connectorType,
long sinkStartTime,
List<String> columnFields,
ConnectorConfig config)
Create datahub data connectors.
|
CreateConnectorResult |
createConnector(String projectName,
String topicName,
ConnectorType connectorType,
long sinkStartTime,
List<String> columnFields,
ConnectorConfig config,
Map<String,String> columnNameMap)
Create datahub data connectors.
|
CreateProjectResult |
createProject(String projectName,
String comment)
Create a datahub project.
|
CreateSubscriptionResult |
createSubscription(String projectName,
String topicName,
String comment)
Create a subscription, and then you should commit offsets with this subscription.
|
CreateTopicResult |
createTopic(String projectName,
String topicName,
int shardCount,
int lifeCycle,
RecordType recordType,
RecordSchema recordSchema,
String comment)
Create a datahub topic with type: TUPLE
|
CreateTopicResult |
createTopic(String projectName,
String topicName,
int shardCount,
int lifeCycle,
RecordType recordType,
RecordSchema recordSchema,
String comment,
ExpandMode expandMode)
Create a datahub topic with type: TUPLE
|
CreateTopicResult |
createTopic(String projectName,
String topicName,
int shardCount,
int lifeCycle,
RecordType recordType,
String comment)
Create a datahub topic with type: BLOB
|
CreateTopicResult |
createTopic(String projectName,
String topicName,
int shardCount,
int lifeCycle,
RecordType recordType,
String comment,
ExpandMode expandMode)
Create a datahub topic with type: BLOB
|
DeleteAlarmRuleResult |
deleteAlarmRule(String projectName,
String topicName,
String alarmId)
Delete alarm rule.
|
DeleteConnectorResult |
deleteConnector(String projectName,
String topicName,
ConnectorType connectorType) |
DeleteConnectorResult |
deleteConnector(String projectName,
String topicName,
String connectorId)
Delete a data connector.
|
DeleteProjectResult |
deleteProject(String projectName)
Delete the specified project.
|
DeleteSubscriptionResult |
deleteSubscription(String projectName,
String topicName,
String subId)
Delete a subscription.
|
DeleteTopicResult |
deleteTopic(String projectName,
String topicName)
Delete a specified topic.
|
ExtendShardResult |
extendShard(String projectName,
String topicName,
int shardCount)
Extend shard num.
|
GetAlarmRuleResult |
getAlarmRule(String projectName,
String topicName,
String alarmId)
Get alarm rule.
|
GetConnectorResult |
getConnector(String projectName,
String topicName,
ConnectorType connectorType) |
GetConnectorResult |
getConnector(String projectName,
String topicName,
String connectorId)
Get information of the specified data connector.
|
GetConnectorDoneTimeResult |
getConnectorDoneTime(String projectName,
String topicName,
ConnectorType connectorType) |
GetConnectorDoneTimeResult |
getConnectorDoneTime(String projectName,
String topicName,
String connectorId)
Get the done time of a data connector.
|
GetConnectorShardStatusResult |
getConnectorShardStatus(String projectName,
String topicName,
ConnectorType connectorType) |
ConnectorShardStatusEntry |
getConnectorShardStatus(String projectName,
String topicName,
ConnectorType connectorType,
String shardId) |
GetConnectorShardStatusResult |
getConnectorShardStatus(String projectName,
String topicName,
String connectorId)
Get the detail information of the shard task which belongs to the specified data connector.
|
ConnectorShardStatusEntry |
getConnectorShardStatus(String projectName,
String topicName,
String connectorId,
String shardId)
Get the detail information of the shard task which belongs to the specified data connector.
|
GetCursorResult |
getCursor(String projectName,
String topicName,
String shardId,
CursorType type)
Get the data cursor of a shard.
|
GetCursorResult |
getCursor(String projectName,
String topicName,
String shardId,
CursorType type,
long parameter)
Get the data cursor of a shard.
|
GetMeterInfoResult |
getMeterInfo(String projectName,
String topicName,
String shardId)
Get metering info of the specified shard
|
GetProjectResult |
getProject(String projectName)
Get the information of the specified project.
|
GetRecordsResult |
getRecords(String projectName,
String topicName,
String shardId,
RecordSchema schema,
String cursor,
int limit)
Get the TUPLE records of a shard.
|
GetRecordsResult |
getRecords(String projectName,
String topicName,
String shardId,
String cursor,
int limit)
Get the BLOB records of a shard.
|
GetSubscriptionResult |
getSubscription(String projectName,
String topicName,
String subId)
Get the detail information of a subscription.
|
GetSubscriptionOffsetResult |
getSubscriptionOffset(String projectName,
String topicName,
String subId,
List<String> shardIds)
Get offsets of a subscription.
|
GetTopicResult |
getTopic(String projectName,
String topicName)
Get the information of the specified topic.
|
HeartbeatResult |
heartbeat(String projectName,
String topicName,
String consumerGroup,
String consumerId,
long versionId,
List<String> holdShardList,
List<String> readEndShardList)
Heartbeat request to let server know consumer status.
|
JoinGroupResult |
joinGroup(String projectName,
String topicName,
String consumerGroup,
long sessionTimeout)
Join a consumer group.
|
LeaveGroupResult |
leaveGroup(String projectName,
String topicName,
String consumerGroup,
String consumerId,
long versionId)
Leave consumer group info.
|
ListAlarmRuleResult |
listAlarmRule(String projectName,
String topicName)
List alarm rule under topic.
|
ListAlarmRuleResult |
listAlarmRule(String projectName,
String topicName,
int pageIndex,
int pageSize)
List alarm rule under topic.
|
ListConnectorResult |
listConnector(String projectName,
String topicName)
List name of connectors
|
ListProjectResult |
listProject()
List all projects the user owns.
|
ListProjectResult |
listProject(String filter)
List all projects the user owns.
|
ListShardResult |
listShard(String projectName,
String topicName)
List shard information
ShardEntry of a topic. |
ListSubscriptionResult |
listSubscription(String projectName,
String topicName,
int pageNum,
int pageSize)
List subscriptions in the topic.
|
ListTopicResult |
listTopic(String projectName)
List all topics in the project.
|
ListTopicResult |
listTopic(String projectName,
String filter)
List all topics in the project.
|
MergeShardResult |
mergeShard(String projectName,
String topicName,
String shardId,
String adjacentShardId)
Merge the specified shard and its adjacent shard.
|
OpenSubscriptionSessionResult |
openSubscriptionSession(String projectName,
String topicName,
String subId,
List<String> shardIds)
Init a subscription session, and returns offset if any offset stored before.
|
PutRecordsResult |
putRecords(String projectName,
String topicName,
List<RecordEntry> records)
Write data records into a DataHub topic.
|
PutRecordsByShardResult |
putRecordsByShard(String projectName,
String topicName,
String shardId,
List<RecordEntry> records)
Write data records into a DataHub shard.
|
ReloadConnectorResult |
reloadConnector(String projectName,
String topicName,
ConnectorType connectorType) |
ReloadConnectorResult |
reloadConnector(String projectName,
String topicName,
ConnectorType connectorType,
String shardId) |
ReloadConnectorResult |
reloadConnector(String projectName,
String topicName,
String connectorId)
Reload a data connector.
|
ReloadConnectorResult |
reloadConnector(String projectName,
String topicName,
String connectorId,
String shardId)
Reload the specified shard of the data connector.
|
ResetSubscriptionOffsetResult |
resetSubscriptionOffset(String projectName,
String topicName,
String subId,
Map<String,SubscriptionOffset> offsets)
Reset offsets of shards to server.
|
SplitShardResult |
splitShard(String projectName,
String topicName,
String shardId)
Split a shard.
|
SplitShardResult |
splitShard(String projectName,
String topicName,
String shardId,
String splitKey)
Split a shard by the specified splitKey.
|
SyncGroupResult |
syncGroup(String projectName,
String topicName,
String consumerGroup,
String consumerId,
long versionId,
List<String> releaseShardList,
List<String> readEndShardList)
Sync consumer group info.
|
UpdateAlarmRuleResult |
updateAlarmRule(String projectName,
String topicName,
String alarmId,
AlarmRule alarmRule)
Update alarm rule.
|
UpdateConnectorResult |
updateConnector(String projectName,
String topicName,
ConnectorType connectorType,
ConnectorConfig config) |
UpdateConnectorResult |
updateConnector(String projectName,
String topicName,
String connectorId,
ConnectorConfig config)
Update connector config of the specified data connector
|
UpdateConnectorResult |
updateConnector(String projectName,
String topicName,
String connectorId,
ConnectorConfig config,
Map<String,String> columnNameMap,
List<String> columnFields)
Update connector config of the specified data connector
|
UpdateConnectorResult |
updateConnector(String projectName,
String topicName,
String connectorId,
List<String> columnFields)
Update connector config of the specified data connector
|
UpdateConnectorResult |
updateConnector(String projectName,
String topicName,
String connectorId,
Map<String,String> columnNameMap)
Update connector config of the specified data connector
|
UpdateConnectorOffsetResult |
updateConnectorOffset(String projectName,
String topicName,
ConnectorType connectorType,
String shardId,
ConnectorOffset offset) |
UpdateConnectorOffsetResult |
updateConnectorOffset(String projectName,
String topicName,
String connectorId,
String shardId,
ConnectorOffset offset)
Update connector sink offset.
|
UpdateConnectorStateResult |
updateConnectorState(String projectName,
String topicName,
ConnectorType connectorType,
ConnectorState connectorState) |
UpdateConnectorStateResult |
updateConnectorState(String projectName,
String topicName,
String connectorId,
ConnectorState connectorState)
Update the state of the data connector
|
UpdateProjectResult |
updateProject(String projectName,
String comment)
Update project information.
|
UpdateProjectVpcWhitelistResult |
updateProjectVpcWhitelist(String projectName,
String vpcIds)
Update project vpc white list.
|
UpdateSubscriptionResult |
updateSubscription(String projectName,
String topicName,
String subId,
String comment)
Update a subscription.
|
UpdateSubscriptionStateResult |
updateSubscriptionState(String projectName,
String topicName,
String subId,
SubscriptionState state)
Update a subscription' state.
|
UpdateTopicResult |
updateTopic(String projectName,
String topicName,
int lifeCycle,
String comment)
Update topic meta information.
|
UpdateTopicResult |
updateTopic(String projectName,
String topicName,
String comment)
Update topic meta information.
|
void |
waitForShardReady(String projectName,
String topicName)
Wait for all shards' status of this topic is ACTIVE.
|
void |
waitForShardReady(String projectName,
String topicName,
long timeout)
Wait for all shards' status of this topic is ACTIVE.
|
innerSetInterceptorpublic DatahubClientJsonImpl(String endpoint, Account account, HttpConfig httpConfig, String userAgent)
public GetProjectResult getProject(String projectName)
DatahubClientprojectName - The name of the project.GetProjectResult The information of the project.public ListProjectResult listProject()
DatahubClientListProjectResult The name list of the project.public ListProjectResult listProject(String filter)
DatahubClientfilter - The regex to filter project name.ListProjectResult The name list of the project.public CreateProjectResult createProject(String projectName, String comment)
DatahubClientprojectName - The name of the project.comment - The comment of the project.public UpdateProjectResult updateProject(String projectName, String comment)
DatahubClientprojectName - The name of the project.comment - The comment to modify.public UpdateProjectVpcWhitelistResult updateProjectVpcWhitelist(String projectName, String vpcIds)
DatahubClientprojectName - The name of the project.vpcIds - The vpcIds to modify.public DeleteProjectResult deleteProject(String projectName)
DatahubClientprojectName - The name of the project.public void waitForShardReady(String projectName, String topicName)
DatahubClientDefault timeout is 30s.
projectName - The name of the project for shards to wait.topicName - The name of the topic for shards to wait.public void waitForShardReady(String projectName, String topicName, long timeout)
DatahubClientprojectName - The name of the project for shards to wait.topicName - The name of the topic for shards to wait.timeout - Max time to wait (Milliseconds).public CreateTopicResult createTopic(String projectName, String topicName, int shardCount, int lifeCycle, RecordType recordType, String comment)
DatahubClientprojectName - The name of the project in which you create.topicName - The name of the topicshardCount - The initial shard count of the topiclifeCycle - The expire time of the data (Unit: DAY). The data written before that time is not accessible.recordType - The type of the record you want to write. Now support TUPLE and BLOB RecordType.comment - The comment of the topic.public CreateTopicResult createTopic(String projectName, String topicName, int shardCount, int lifeCycle, RecordType recordType, String comment, ExpandMode expandMode)
DatahubClientprojectName - The name of the project in which you create.topicName - The name of the topicshardCount - The initial shard count of the topiclifeCycle - The expire time of the data (Unit: DAY). The data written before that time is not accessible.recordType - The type of the record you want to write. Now support TUPLE and BLOB RecordType.comment - The comment of the topic.expandMode - The expand mode of the topic.public CreateTopicResult createTopic(String projectName, String topicName, int shardCount, int lifeCycle, RecordType recordType, RecordSchema recordSchema, String comment)
DatahubClientprojectName - The name of the project in which you create.topicName - The name of the topicshardCount - The initial shard count of the topiclifeCycle - The expire time of the data (Unit: DAY). The data written before that time is not accessible.recordType - The type of the record you want to write. Now support TUPLE and BLOB RecordType.recordSchema - The records schema of this topic. RecordSchemacomment - The comment of the topic.public CreateTopicResult createTopic(String projectName, String topicName, int shardCount, int lifeCycle, RecordType recordType, RecordSchema recordSchema, String comment, ExpandMode expandMode)
DatahubClientprojectName - The name of the project in which you create.topicName - The name of the topicshardCount - The initial shard count of the topiclifeCycle - The expire time of the data (Unit: DAY). The data written before that time is not accessible.recordType - The type of the record you want to write. Now support TUPLE and BLOB RecordType.recordSchema - The records schema of this topic. RecordSchemacomment - The comment of the topic.expandMode - The expand mode of the topic.public UpdateTopicResult updateTopic(String projectName, String topicName, String comment)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.comment - The comment to modify.public UpdateTopicResult updateTopic(String projectName, String topicName, int lifeCycle, String comment)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.lifeCycle - The expire time of the data (Unit: DAY). The data written before that time is not accessible.comment - The comment to modify.public GetTopicResult getTopic(String projectName, String topicName)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.GetTopicResultpublic DeleteTopicResult deleteTopic(String projectName, String topicName)
DatahubClientprojectName - The name of the project which the topic belongs to.topicName - The name of the topic.public ListTopicResult listTopic(String projectName)
DatahubClientprojectName - The name of the project.ListTopicResult The name list of the topic.public ListTopicResult listTopic(String projectName, String filter)
DatahubClientprojectName - The name of the project.filter - The regex to topic name.ListTopicResult The name list of the topic.public ListShardResult listShard(String projectName, String topicName)
DatahubClientShardEntry of a topic.projectName - The name of the project.topicName - The name of the topic.ListShardResult The list of the shard entries.public SplitShardResult splitShard(String projectName, String topicName, String shardId)
DatahubClient
User can also call DatahubClient.splitShard(String, String, String, String) to specify the split key
But this may cause unbalanced split if you specify an inaccurate key.
projectName - The name of the project.topicName - The name of the topic.shardId - The shard which to split.SplitShardResult New shard info.public SplitShardResult splitShard(String projectName, String topicName, String shardId, String splitKey)
DatahubClient
Warning: This method may cause unbalanced split if you specify an inaccurate key. Use DatahubClient.splitShard(String, String, String, String) instead.
projectName - The name of the project.topicName - The name of the topic.shardId - The shard which to split.splitKey - The split key which is used to split shard.SplitShardResult New shard info.public MergeShardResult mergeShard(String projectName, String topicName, String shardId, String adjacentShardId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.shardId - The shard which will be mergedadjacentShardId - The adjacent shard of the specified shard.MergeShardResult New shard info.public ExtendShardResult extendShard(String projectName, String topicName, int shardCount)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.shardCount - The num of shards to extend to.public GetCursorResult getCursor(String projectName, String topicName, String shardId, CursorType type)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.shardId - The id of the shard.type - Which type used to get cursor. Also see CursorTypeGetCursorResult Cursor info which contains the cursor which is used to read data.public GetCursorResult getCursor(String projectName, String topicName, String shardId, CursorType type, long parameter)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.shardId - The id of the shard.type - Which type used to get cursor. Also see CursorTypeparameter - Parameter used to get cursor.GetCursorResult Cursor info which contains the cursor which is used to read data.public PutRecordsResult putRecords(String projectName, String topicName, List<RecordEntry> records)
DatahubClient
The response includes unsuccessfully processed records. Datahub attempts to process
all records in each record. A single record failure does not
stop the processing of subsequent records.
You can get the failed records which are not written. PutErrorEntry include
ErrorCode and ErrorMessage for each failed record.
We recommended you to use putRecordsByShard method to write data.
projectName - The name of the project.topicName - The name of the topic.records - Records list to written. Each RecordEntity contains RecordData field, which can indicate BLOB data or TUPLE data.PutRecordsResult The information of the failed records.public PutRecordsByShardResult putRecordsByShard(String projectName, String topicName, String shardId, List<RecordEntry> records)
DatahubClientRecordEntry, but the ShardId, HashKey, PartitionKey
of the struct are useless.
This method is recommended to use to write data.
projectName - The name of the projecttopicName - The name of the topic.shardId - The shard id.records - Records list to written. Each RecordEntity contains RecordData field, which can indicate BLOB data or TUPLE data.public GetRecordsResult getRecords(String projectName, String topicName, String shardId, String cursor, int limit)
DatahubClient
The cursor parameter used to specify the start position to read.
If there is no records bound with the cursor, GetDataRecords returns an empty list.
projectName - The name of the project.topicName - The name of the topic.shardId - The id of the shard.cursor - The start cursor used to read data.limit - Max record size to read.GetRecordsResult Records information read.public GetRecordsResult getRecords(String projectName, String topicName, String shardId, RecordSchema schema, String cursor, int limit)
DatahubClient
The cursor parameter used to specify the start position to read.
If there is no records bound with the cursor, GetDataRecords returns an empty list.
projectName - The name of the project.topicName - The name of the topic.shardId - The id of the shard.schema - If you read TUPLE records, you should pass RecordSchema as a parameter.cursor - The start cursor used to read data.limit - Max record size to read.GetRecordsResult Records information read.public AppendFieldResult appendField(String projectName, String topicName, Field field)
DatahubClientFieldprojectName - The name of project.topicName - The name of topic.field - The field to append. Field value must allow null.public AppendFieldResult appendField(String projectName, String topicName, List<Field> fields)
DatahubClientFieldprojectName - The name of project.topicName - The name of topic.fields - The fields to append. All field value must allow null.public GetMeterInfoResult getMeterInfo(String projectName, String topicName, String shardId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.shardId - The id of the shard.GetMeterInfoResult Metering info which contains ActiveTime and Storagepublic CreateConnectorResult createConnector(String projectName, String topicName, ConnectorType connectorType, List<String> columnFields, ConnectorConfig config)
DatahubClientNow datahub supports multiple synchronization types, such as ODPS(MaxCompute), OSS, OTS, ADS, MySQL, ElasticSearch, FunctionCompute and etc.
projectName - The name of the project.topicName - The name of the topic.connectorType - The type of connector which you want create.columnFields - Which fields you want synchronize.config - Detail config of specified connector type. ConnectorConfigpublic CreateConnectorResult createConnector(String projectName, String topicName, ConnectorType connectorType, long sinkStartTime, List<String> columnFields, ConnectorConfig config)
DatahubClientNow datahub supports multiple synchronization types, such as ODPS(MaxCompute), OSS, OTS, ADS, MySQL, ElasticSearch, FunctionCompute and etc.
projectName - The name of the project.topicName - The name of the topic.connectorType - The type of connector which you want create.sinkStartTime - Start time to sink from datahub. Unit: MscolumnFields - Which fields you want synchronize.config - Detail config of specified connector type. ConnectorConfigpublic CreateConnectorResult createConnector(String projectName, String topicName, ConnectorType connectorType, long sinkStartTime, List<String> columnFields, ConnectorConfig config, Map<String,String> columnNameMap)
DatahubClientNow datahub supports multiple synchronization types, such as ODPS(MaxCompute), OSS, OTS, ADS, MySQL, ElasticSearch, FunctionCompute and etc.
projectName - The name of the project.topicName - The name of the topic.connectorType - The type of connector which you want create.sinkStartTime - Start time to sink from datahub. Unit: MscolumnFields - Which fields you want synchronize.config - Detail config of specified connector type. ConnectorConfigcolumnNameMap - Column name map between source and target.public GetConnectorResult getConnector(String projectName, String topicName, String connectorId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.connectorId - The id of the connector.GetConnectorResult The detail information of a connector.public GetConnectorResult getConnector(String projectName, String topicName, ConnectorType connectorType)
public UpdateConnectorResult updateConnector(String projectName, String topicName, String connectorId, ConnectorConfig config)
DatahubClientprojectName - The name of the projecttopicName - The name of the topicconnectorId - The id of connector which you want update.config - Detail config of specified connector type. ConnectorConfigpublic UpdateConnectorResult updateConnector(String projectName, String topicName, String connectorId, List<String> columnFields)
DatahubClientprojectName - The name of the projecttopicName - The name of the topicconnectorId - The id of connector which you want update.columnFields - New import fields.public UpdateConnectorResult updateConnector(String projectName, String topicName, String connectorId, Map<String,String> columnNameMap)
DatahubClientprojectName - The name of the projecttopicName - The name of the topicconnectorId - The id of connector which you want update.columnNameMap - Column name map.public UpdateConnectorResult updateConnector(String projectName, String topicName, String connectorId, ConnectorConfig config, Map<String,String> columnNameMap, List<String> columnFields)
DatahubClientprojectName - The name of the projecttopicName - The name of the topicconnectorId - The id of connector which you want update.config - Detail config of specified connector type. ConnectorConfigcolumnNameMap - Column name map.columnFields - New import fields.public UpdateConnectorResult updateConnector(String projectName, String topicName, ConnectorType connectorType, ConnectorConfig config)
public ListConnectorResult listConnector(String projectName, String topicName)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.ListConnectorResult The name list of connecors.public DeleteConnectorResult deleteConnector(String projectName, String topicName, String connectorId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.connectorId - The id of the connector.public DeleteConnectorResult deleteConnector(String projectName, String topicName, ConnectorType connectorType)
public GetConnectorDoneTimeResult getConnectorDoneTime(String projectName, String topicName, String connectorId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.connectorId - The id of the connector.GetConnectorDoneTimeResult Contains a timestamp before which all data is totally synchronized.public GetConnectorDoneTimeResult getConnectorDoneTime(String projectName, String topicName, ConnectorType connectorType)
public ReloadConnectorResult reloadConnector(String projectName, String topicName, String connectorId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.connectorId - The id of the connector.public ReloadConnectorResult reloadConnector(String projectName, String topicName, ConnectorType connectorType)
public ReloadConnectorResult reloadConnector(String projectName, String topicName, ConnectorType connectorType, String shardId)
public ReloadConnectorResult reloadConnector(String projectName, String topicName, String connectorId, String shardId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.connectorId - The id of the connector.shardId - The id of the shard.public UpdateConnectorStateResult updateConnectorState(String projectName, String topicName, String connectorId, ConnectorState connectorState)
DatahubClientprojectName - The name of the projecttopicName - The name of the topicconnectorId - The id of the connectorconnectorState - The state of the connector. Support: ConnectorState.STOPPED, ConnectorState.RUNNINGpublic UpdateConnectorStateResult updateConnectorState(String projectName, String topicName, ConnectorType connectorType, ConnectorState connectorState)
public UpdateConnectorOffsetResult updateConnectorOffset(String projectName, String topicName, String connectorId, String shardId, ConnectorOffset offset)
DatahubClientprojectName - The name of the projecttopicName - The name of the topicconnectorId - The id of the connectorshardId - The id of the shard. If shardId is null, then update all shards offsetoffset - The connector offsetpublic UpdateConnectorOffsetResult updateConnectorOffset(String projectName, String topicName, ConnectorType connectorType, String shardId, ConnectorOffset offset)
public GetConnectorShardStatusResult getConnectorShardStatus(String projectName, String topicName, String connectorId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.connectorId - The id of the connector.GetConnectorShardStatusResult The detail information of the shard task.public GetConnectorShardStatusResult getConnectorShardStatus(String projectName, String topicName, ConnectorType connectorType)
public ConnectorShardStatusEntry getConnectorShardStatus(String projectName, String topicName, String connectorId, String shardId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.connectorId - The id of the connector.shardId - The id of the shardConnectorShardStatusEntry The detail information of the shard task.public ConnectorShardStatusEntry getConnectorShardStatus(String projectName, String topicName, ConnectorType connectorType, String shardId)
public AppendConnectorFieldResult appendConnectorField(String projectName, String topicName, String connectorId, String fieldName)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.connectorId - The id of the connector.fieldName - The name of the field.public AppendConnectorFieldResult appendConnectorField(String projectName, String topicName, ConnectorType connectorType, String fieldName)
public CreateSubscriptionResult createSubscription(String projectName, String topicName, String comment)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.comment - The comment of the subscriptionCreateSubscriptionResult Contains a subId returned by server.public GetSubscriptionResult getSubscription(String projectName, String topicName, String subId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.subId - The id of the subscription.GetSubscriptionResult Detail information of a subscription.public DeleteSubscriptionResult deleteSubscription(String projectName, String topicName, String subId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.subId - The id of the subscription.public ListSubscriptionResult listSubscription(String projectName, String topicName, int pageNum, int pageSize)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.pageNum - The page number used to list subscriptions.pageSize - The page size used to list subscriptions.ListSubscriptionResult Detail information of the subscriptions.public UpdateSubscriptionResult updateSubscription(String projectName, String topicName, String subId, String comment)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.subId - The id of the subscription.comment - The comment you want to update.public UpdateSubscriptionStateResult updateSubscriptionState(String projectName, String topicName, String subId, SubscriptionState state)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.subId - The id of the subscription.state - The state you want to change.public OpenSubscriptionSessionResult openSubscriptionSession(String projectName, String topicName, String subId, List<String> shardIds)
DatahubClientSubscription should be initialized before use. This operation makes sure that only one client use this subscription.
This method will return sessionId in SubscriptionOffset
projectName - The name of the project.topicName - The name of the topic.subId - The id of the subscription.shardIds - The id list of the shards.OpenSubscriptionSessionResult Offsets of the shards belongs to the topic.public GetSubscriptionOffsetResult getSubscriptionOffset(String projectName, String topicName, String subId, List<String> shardIds)
DatahubClient
This method dost not return sessionId in SubscriptionOffset
projectName - The name of the project.topicName - The name of the topic.subId - The id of the subscription.shardIds - The id list of the shards.GetSubscriptionOffsetResult Offsets of the shards belongs to the topic.public CommitSubscriptionOffsetResult commitSubscriptionOffset(String projectName, String topicName, String subId, Map<String,SubscriptionOffset> offsets)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.subId - The id of the subscription.offsets - The offset map of shards.public ResetSubscriptionOffsetResult resetSubscriptionOffset(String projectName, String topicName, String subId, Map<String,SubscriptionOffset> offsets)
DatahubClientprojectName - The name of the projecttopicName - The name of the topicsubId - The id of the subscriptionoffsets - The offset map of shardspublic HeartbeatResult heartbeat(String projectName, String topicName, String consumerGroup, String consumerId, long versionId, List<String> holdShardList, List<String> readEndShardList)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.consumerGroup - The consumerGroup use subId.consumerId - The consumerId.versionId - The offset version id.holdShardList - The shard list held by consumer.readEndShardList - The shard list finished.HeartbeatResult Heartbeat result contains versionId, shardList, totalPlanpublic JoinGroupResult joinGroup(String projectName, String topicName, String consumerGroup, long sessionTimeout)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.consumerGroup - The consumerGroup use subId.sessionTimeout - The session timeout.JoinGroupResult Consumer id.public SyncGroupResult syncGroup(String projectName, String topicName, String consumerGroup, String consumerId, long versionId, List<String> releaseShardList, List<String> readEndShardList)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.consumerGroup - The consumerGroup use subId.consumerId - The consumerId.versionId - The offset version id.releaseShardList - The shard list to release.readEndShardList - The shard list finished.public LeaveGroupResult leaveGroup(String projectName, String topicName, String consumerGroup, String consumerId, long versionId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.consumerGroup - The consumerGroup use subId.consumerId - The consumerId.versionId - The offset version id.public CreateAlarmRuleResult createAlarmRule(String projectName, String topicName, AlarmRule alarmRule)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.alarmRule - The alarmRule.public UpdateAlarmRuleResult updateAlarmRule(String projectName, String topicName, String alarmId, AlarmRule alarmRule)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.alarmId - The alarm id.alarmRule - The alarmRule.public GetAlarmRuleResult getAlarmRule(String projectName, String topicName, String alarmId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.alarmId - The alarm id.public DeleteAlarmRuleResult deleteAlarmRule(String projectName, String topicName, String alarmId)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.alarmId - The alarm id.public ListAlarmRuleResult listAlarmRule(String projectName, String topicName)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.public ListAlarmRuleResult listAlarmRule(String projectName, String topicName, int pageIndex, int pageSize)
DatahubClientprojectName - The name of the project.topicName - The name of the topic.pageIndex - The page index.pageSize - The page size.Copyright © 2021 Alibaba Cloud Computing. All rights reserved.