public interface DatahubClient
DatahubClient client = new DatahubClientBuilder().setDatahubConfig(xxx).build(); try { client.createProject("projectName", "comment"); } catch (DatahubClientException e) { System.out.println(e.toString()); // deal with DatahubClientException } catch (Exception e) { // deal with Exception }
| 限定符和类型 | 方法和说明 |
|---|---|
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 param)
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.
|
GetProjectResult getProject(String projectName)
projectName - The name of the project.GetProjectResult The information of the project.DatahubClientException - Throws DatahubClientExceptionListProjectResult listProject()
ListProjectResult The name list of the project.DatahubClientException - Throws DatahubClientExceptionListProjectResult listProject(String filter)
filter - The regex to filter project name.ListProjectResult The name list of the project.DatahubClientException - Throws DatahubClientExceptionCreateProjectResult createProject(String projectName, String comment)
projectName - The name of the project.comment - The comment of the project.DatahubClientException - Throws DatahubClientExceptionUpdateProjectResult updateProject(String projectName, String comment)
projectName - The name of the project.comment - The comment to modify.DatahubClientException - Throws DatahubClientExceptionUpdateProjectVpcWhitelistResult updateProjectVpcWhitelist(String projectName, String vpcIds)
projectName - The name of the project.vpcIds - The vpcIds to modify.DatahubClientException - Throws DatahubClientExceptionDeleteProjectResult deleteProject(String projectName)
projectName - The name of the project.DatahubClientException - Throws DatahubClientExceptionvoid waitForShardReady(String projectName, String topicName)
Default timeout is 30s.
projectName - The name of the project for shards to wait.topicName - The name of the topic for shards to wait.void waitForShardReady(String projectName, String topicName, long timeout)
projectName - 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).DatahubClientException - Throws DatahubClientExceptionCreateTopicResult createTopic(String projectName, String topicName, int shardCount, int lifeCycle, RecordType recordType, String comment)
projectName - 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.DatahubClientException - Throws DatahubClientExceptionCreateTopicResult createTopic(String projectName, String topicName, int shardCount, int lifeCycle, RecordType recordType, String comment, ExpandMode expandMode)
projectName - 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.DatahubClientException - Throws DatahubClientExceptionCreateTopicResult createTopic(String projectName, String topicName, int shardCount, int lifeCycle, RecordType recordType, RecordSchema recordSchema, String comment)
projectName - 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.DatahubClientException - Throws DatahubClientExceptionCreateTopicResult createTopic(String projectName, String topicName, int shardCount, int lifeCycle, RecordType recordType, RecordSchema recordSchema, String comment, ExpandMode expandMode)
projectName - 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.DatahubClientException - Throws DatahubClientExceptionUpdateTopicResult updateTopic(String projectName, String topicName, String comment)
projectName - The name of the project.topicName - The name of the topic.comment - The comment to modify.DatahubClientException - Throws DatahubClientExceptionUpdateTopicResult updateTopic(String projectName, String topicName, int lifeCycle, String comment)
projectName - 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.DatahubClientException - Throws DatahubClientExceptionGetTopicResult getTopic(String projectName, String topicName)
projectName - The name of the project.topicName - The name of the topic.GetTopicResultDatahubClientException - Throws DatahubClientExceptionDeleteTopicResult deleteTopic(String projectName, String topicName)
projectName - The name of the project which the topic belongs to.topicName - The name of the topic.DatahubClientException - Throws DatahubClientExceptionListTopicResult listTopic(String projectName)
projectName - The name of the project.ListTopicResult The name list of the topic.DatahubClientException - Throws DatahubClientExceptionListTopicResult listTopic(String projectName, String filter)
projectName - The name of the project.filter - The regex to topic name.ListTopicResult The name list of the topic.DatahubClientException - Throws DatahubClientExceptionListShardResult listShard(String projectName, String topicName)
ShardEntry of a topic.projectName - The name of the project.topicName - The name of the topic.ListShardResult The list of the shard entries.DatahubClientException - Throws DatahubClientExceptionSplitShardResult splitShard(String projectName, String topicName, String shardId)
User can also call 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.SplitShardResult splitShard(String projectName, String topicName, String shardId, String splitKey)
Warning: This method may cause unbalanced split if you specify an inaccurate key. Use 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.DatahubClientException - Throws DatahubClientExceptionMergeShardResult mergeShard(String projectName, String topicName, String shardId, String adjacentShardId)
projectName - 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.DatahubClientException - Throws DatahubClientExceptionExtendShardResult extendShard(String projectName, String topicName, int shardCount)
projectName - The name of the project.topicName - The name of the topic.shardCount - The num of shards to extend to.DatahubClientException - Throws DatahubClientExceptionGetCursorResult getCursor(String projectName, String topicName, String shardId, CursorType type)
projectName - 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.DatahubClientException - Throws DatahubClientExceptionGetCursorResult getCursor(String projectName, String topicName, String shardId, CursorType type, long param)
projectName - 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 CursorTypeparam - Parameter used to get cursor.GetCursorResult Cursor info which contains the cursor which is used to read data.DatahubClientException - Throws DatahubClientExceptionPutRecordsResult putRecords(String projectName, String topicName, List<RecordEntry> records)
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.DatahubClientException - Throws DatahubClientExceptionPutRecordsByShardResult putRecordsByShard(String projectName, String topicName, String shardId, List<RecordEntry> records)
RecordEntry, 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.GetRecordsResult getRecords(String projectName, String topicName, String shardId, String cursor, int limit)
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.DatahubClientException - Throws DatahubClientExceptionGetRecordsResult getRecords(String projectName, String topicName, String shardId, RecordSchema schema, String cursor, int limit)
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.DatahubClientException - Throws DatahubClientExceptionAppendFieldResult appendField(String projectName, String topicName, Field field)
FieldprojectName - The name of project.topicName - The name of topic.field - The field to append. Field value must allow null.DatahubClientException - Throws DatahubClientExceptionAppendFieldResult appendField(String projectName, String topicName, List<Field> fields)
FieldprojectName - The name of project.topicName - The name of topic.fields - The fields to append. All field value must allow null.DatahubClientException - Throws DatahubClientExceptionGetMeterInfoResult getMeterInfo(String projectName, String topicName, String shardId)
projectName - The name of the project.topicName - The name of the topic.shardId - The id of the shard.GetMeterInfoResult Metering info which contains ActiveTime and StorageDatahubClientException - Throws DatahubClientExceptionCreateConnectorResult createConnector(String projectName, String topicName, ConnectorType connectorType, List<String> columnFields, ConnectorConfig config)
Now 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. ConnectorConfigDatahubClientException - Throws DatahubClientExceptionCreateConnectorResult createConnector(String projectName, String topicName, ConnectorType connectorType, long sinkStartTime, List<String> columnFields, ConnectorConfig config)
Now 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. ConnectorConfigDatahubClientException - Throws DatahubClientExceptionCreateConnectorResult createConnector(String projectName, String topicName, ConnectorType connectorType, long sinkStartTime, List<String> columnFields, ConnectorConfig config, Map<String,String> columnNameMap)
Now 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.DatahubClientException - Throws DatahubClientExceptionGetConnectorResult getConnector(String projectName, String topicName, String connectorId)
projectName - The name of the project.topicName - The name of the topic.connectorId - The id of the connector.GetConnectorResult The detail information of a connector.DatahubClientException - Throws DatahubClientException@Deprecated GetConnectorResult getConnector(String projectName, String topicName, ConnectorType connectorType)
UpdateConnectorResult updateConnector(String projectName, String topicName, String connectorId, ConnectorConfig config)
projectName - 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. ConnectorConfigDatahubClientException - Throws DatahubClientExceptionUpdateConnectorResult updateConnector(String projectName, String topicName, String connectorId, Map<String,String> columnNameMap)
projectName - The name of the projecttopicName - The name of the topicconnectorId - The id of connector which you want update.columnNameMap - Column name map.DatahubClientException - Throws DatahubClientExceptionUpdateConnectorResult updateConnector(String projectName, String topicName, String connectorId, List<String> columnFields)
projectName - The name of the projecttopicName - The name of the topicconnectorId - The id of connector which you want update.columnFields - New import fields.DatahubClientException - Throws DatahubClientExceptionUpdateConnectorResult updateConnector(String projectName, String topicName, String connectorId, ConnectorConfig config, Map<String,String> columnNameMap, List<String> columnFields)
projectName - 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.DatahubClientException - Throws DatahubClientException@Deprecated UpdateConnectorResult updateConnector(String projectName, String topicName, ConnectorType connectorType, ConnectorConfig config)
ListConnectorResult listConnector(String projectName, String topicName)
projectName - The name of the project.topicName - The name of the topic.ListConnectorResult The name list of connecors.DatahubClientException - Throws DatahubClientExceptionDeleteConnectorResult deleteConnector(String projectName, String topicName, String connectorId)
projectName - The name of the project.topicName - The name of the topic.connectorId - The id of the connector.DatahubClientException - Throws DatahubClientException@Deprecated DeleteConnectorResult deleteConnector(String projectName, String topicName, ConnectorType connectorType)
GetConnectorDoneTimeResult getConnectorDoneTime(String projectName, String topicName, String connectorId)
projectName - 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.DatahubClientException - Throws DatahubClientException@Deprecated GetConnectorDoneTimeResult getConnectorDoneTime(String projectName, String topicName, ConnectorType connectorType)
ReloadConnectorResult reloadConnector(String projectName, String topicName, String connectorId)
projectName - The name of the project.topicName - The name of the topic.connectorId - The id of the connector.DatahubClientException - Throws DatahubClientException@Deprecated ReloadConnectorResult reloadConnector(String projectName, String topicName, ConnectorType connectorType)
ReloadConnectorResult reloadConnector(String projectName, String topicName, String connectorId, String shardId)
projectName - The name of the project.topicName - The name of the topic.connectorId - The id of the connector.shardId - The id of the shard.DatahubClientException - Throws DatahubClientException@Deprecated ReloadConnectorResult reloadConnector(String projectName, String topicName, ConnectorType connectorType, String shardId)
UpdateConnectorStateResult updateConnectorState(String projectName, String topicName, String connectorId, ConnectorState connectorState)
projectName - The name of the projecttopicName - The name of the topicconnectorId - The id of the connectorconnectorState - The state of the connector. Support: ConnectorState.STOPPED, ConnectorState.RUNNINGDatahubClientException - Throws DatahubClientException@Deprecated UpdateConnectorStateResult updateConnectorState(String projectName, String topicName, ConnectorType connectorType, ConnectorState connectorState)
UpdateConnectorOffsetResult updateConnectorOffset(String projectName, String topicName, String connectorId, String shardId, ConnectorOffset offset)
projectName - 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 offsetDatahubClientException - Throws DatahubClientException@Deprecated UpdateConnectorOffsetResult updateConnectorOffset(String projectName, String topicName, ConnectorType connectorType, String shardId, ConnectorOffset offset)
GetConnectorShardStatusResult getConnectorShardStatus(String projectName, String topicName, String connectorId)
projectName - 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.DatahubClientException - Throws DatahubClientException@Deprecated GetConnectorShardStatusResult getConnectorShardStatus(String projectName, String topicName, ConnectorType connectorType)
ConnectorShardStatusEntry getConnectorShardStatus(String projectName, String topicName, String connectorId, String shardId)
projectName - 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.DatahubClientException - Throws DatahubClientException@Deprecated ConnectorShardStatusEntry getConnectorShardStatus(String projectName, String topicName, ConnectorType connectorType, String shardId)
AppendConnectorFieldResult appendConnectorField(String projectName, String topicName, String connectorId, String fieldName)
projectName - The name of the project.topicName - The name of the topic.connectorId - The id of the connector.fieldName - The name of the field.DatahubClientException - Throws DatahubClientException@Deprecated AppendConnectorFieldResult appendConnectorField(String projectName, String topicName, ConnectorType connectorType, String fieldName)
CreateSubscriptionResult createSubscription(String projectName, String topicName, String comment)
projectName - The name of the project.topicName - The name of the topic.comment - The comment of the subscriptionCreateSubscriptionResult Contains a subId returned by server.DatahubClientException - Throws DatahubClientExceptionGetSubscriptionResult getSubscription(String projectName, String topicName, String subId)
projectName - The name of the project.topicName - The name of the topic.subId - The id of the subscription.GetSubscriptionResult Detail information of a subscription.DatahubClientException - Throws DatahubClientExceptionDeleteSubscriptionResult deleteSubscription(String projectName, String topicName, String subId)
projectName - The name of the project.topicName - The name of the topic.subId - The id of the subscription.DatahubClientException - Throws DatahubClientExceptionListSubscriptionResult listSubscription(String projectName, String topicName, int pageNum, int pageSize)
projectName - 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.DatahubClientException - Throws DatahubClientExceptionUpdateSubscriptionResult updateSubscription(String projectName, String topicName, String subId, String comment)
projectName - The name of the project.topicName - The name of the topic.subId - The id of the subscription.comment - The comment you want to update.DatahubClientException - Throws DatahubClientExceptionUpdateSubscriptionStateResult updateSubscriptionState(String projectName, String topicName, String subId, SubscriptionState state)
projectName - The name of the project.topicName - The name of the topic.subId - The id of the subscription.state - The state you want to change.DatahubClientException - Throws DatahubClientExceptionOpenSubscriptionSessionResult openSubscriptionSession(String projectName, String topicName, String subId, List<String> shardIds)
Subscription 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.DatahubClientException - Throws DatahubClientExceptionGetSubscriptionOffsetResult getSubscriptionOffset(String projectName, String topicName, String subId, List<String> shardIds)
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.DatahubClientException - Throws DatahubClientExceptionCommitSubscriptionOffsetResult commitSubscriptionOffset(String projectName, String topicName, String subId, Map<String,SubscriptionOffset> offsets)
projectName - The name of the project.topicName - The name of the topic.subId - The id of the subscription.offsets - The offset map of shards.DatahubClientException - Throws DatahubClientExceptionResetSubscriptionOffsetResult resetSubscriptionOffset(String projectName, String topicName, String subId, Map<String,SubscriptionOffset> offsets)
projectName - The name of the projecttopicName - The name of the topicsubId - The id of the subscriptionoffsets - The offset map of shardsDatahubClientException - Throws DatahubClientExceptionHeartbeatResult heartbeat(String projectName, String topicName, String consumerGroup, String consumerId, long versionId, List<String> holdShardList, List<String> readEndShardList)
projectName - 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, totalPlanDatahubClientException - Throws DatahubClientExceptionJoinGroupResult joinGroup(String projectName, String topicName, String consumerGroup, long sessionTimeout)
projectName - The name of the project.topicName - The name of the topic.consumerGroup - The consumerGroup use subId.sessionTimeout - The session timeout.JoinGroupResult Consumer id.DatahubClientException - Throws DatahubClientExceptionSyncGroupResult syncGroup(String projectName, String topicName, String consumerGroup, String consumerId, long versionId, List<String> releaseShardList, List<String> readEndShardList)
projectName - 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.DatahubClientException - Throws DatahubClientExceptionLeaveGroupResult leaveGroup(String projectName, String topicName, String consumerGroup, String consumerId, long versionId)
projectName - The name of the project.topicName - The name of the topic.consumerGroup - The consumerGroup use subId.consumerId - The consumerId.versionId - The offset version id.DatahubClientException - Throws DatahubClientExceptionCreateAlarmRuleResult createAlarmRule(String projectName, String topicName, AlarmRule alarmRule)
projectName - The name of the project.topicName - The name of the topic.alarmRule - The alarmRule.DatahubClientException - Throws DatahubClientExceptionUpdateAlarmRuleResult updateAlarmRule(String projectName, String topicName, String alarmId, AlarmRule alarmRule)
projectName - The name of the project.topicName - The name of the topic.alarmId - The alarm id.alarmRule - The alarmRule.DatahubClientException - Throws DatahubClientExceptionGetAlarmRuleResult getAlarmRule(String projectName, String topicName, String alarmId)
projectName - The name of the project.topicName - The name of the topic.alarmId - The alarm id.DatahubClientException - Throws DatahubClientExceptionDeleteAlarmRuleResult deleteAlarmRule(String projectName, String topicName, String alarmId)
projectName - The name of the project.topicName - The name of the topic.alarmId - The alarm id.DatahubClientException - Throws DatahubClientExceptionListAlarmRuleResult listAlarmRule(String projectName, String topicName)
projectName - The name of the project.topicName - The name of the topic.DatahubClientException - Throws DatahubClientExceptionListAlarmRuleResult listAlarmRule(String projectName, String topicName, int pageIndex, int pageSize)
projectName - The name of the project.topicName - The name of the topic.pageIndex - The page index.pageSize - The page size.DatahubClientException - Throws DatahubClientExceptionCopyright © 2021 Alibaba Cloud Computing. All rights reserved.