public class Client extends Object implements LogService
| 构造器和说明 |
|---|
Client(String endpoint,
String accessId,
String accessKey)
Construct the sls client with accessId, accessKey and server address, all
other parameters will be set to default value
|
Client(String endpoint,
String accessId,
String accessKey,
String SourceIp)
Construct the sls client with accessId, accessKey , server address and
client ip address, all other parameters will be set to default value
|
Client(String endpoint,
String accessId,
String accessKey,
String sourceIp,
boolean compressFlag)
Construct sls client with full parameters
|
| 限定符和类型 | 方法和说明 |
|---|---|
ApplyConfigToMachineGroupResponse |
ApplyConfigToMachineGroup(ApplyConfigToMachineGroupRequest request)
Apply config to machine group
|
ApplyConfigToMachineGroupResponse |
ApplyConfigToMachineGroup(String project,
String groupName,
String configName)
Apply config to machine group
|
BatchGetLogResponse |
BatchGetLog(BatchGetLogRequest request)
Batch get log
|
BatchGetLogResponse |
BatchGetLog(String project,
String logStore,
int shardId,
int count,
String cursor)
Batch get log
|
void |
ClearConsoleResources() |
CreateConfigResponse |
CreateConfig(CreateConfigRequest request)
Create logtail config
|
CreateConfigResponse |
CreateConfig(String project,
Config config)
Create logtail config
|
CreateConsumerGroupResponse |
CreateConsumerGroup(CreateConsumerGroupRequest request)
create logstore consumer group
|
CreateConsumerGroupResponse |
CreateConsumerGroup(String project,
String logStore,
ConsumerGroup consumerGroup)
create logstore consumer group
|
CreateIndexResponse |
CreateIndex(CreateIndexRequest request)
create logstore index
|
CreateIndexResponse |
CreateIndex(String project,
String logStore,
Index index)
create logstore index
|
CreateLogStoreResponse |
CreateLogStore(CreateLogStoreRequest request)
create logstore
|
CreateLogStoreResponse |
CreateLogStore(String project,
LogStore logStore)
create a logstore in a project
|
CreateMachineGroupResponse |
CreateMachineGroup(CreateMachineGroupRequest request)
Create machine group
|
CreateMachineGroupResponse |
CreateMachineGroup(String project,
MachineGroup group)
Create machine group
|
DeleteConfigResponse |
DeleteConfig(DeleteConfigRequest request)
Delete logtail config
|
DeleteConfigResponse |
DeleteConfig(String project,
String configName)
Delete logtail config
|
DeleteConsumerGroupResponse |
DeleteConsumerGroup(String project,
String logStore,
String consumerGroup)
delete logstore consumer group
|
DeleteIndexResponse |
DeleteIndex(DeleteIndexRequest request)
delete logstore index
|
DeleteIndexResponse |
DeleteIndex(String project,
String logStore)
delete logstore index
|
DeleteLogStoreResponse |
DeleteLogStore(DeleteLogStoreRequest request)
Delete logstore
|
DeleteLogStoreResponse |
DeleteLogStore(String project,
String logStoreName)
Delete the logstore
|
DeleteMachineGroupResponse |
DeleteMachineGroup(DeleteMachineGroupRequest request)
Delete machine group
|
DeleteMachineGroupResponse |
DeleteMachineGroup(String project,
String groupName)
Delete machine group
|
DeleteShardResponse |
DeleteShard(DeleteShardRequest request)
delete a readonly shard in the logtstore
|
DeleteShardResponse |
DeleteShard(String prj,
String logStore,
int shardId)
delete a readonly shard in the logtstore
|
protected void |
ErrorCheck(net.sf.json.JSONObject object,
String requestId) |
protected Config |
ExtractConfigFromResponse(net.sf.json.JSONObject dict,
String requestId) |
protected ArrayList<String> |
ExtractConfigMachineGroupFromResponse(net.sf.json.JSONObject object,
String requestId) |
protected List<String> |
ExtractConfigs(net.sf.json.JSONObject object,
String requestId) |
protected ArrayList<String> |
ExtractConfigsFromResponse(net.sf.json.JSONObject object,
String requestId) |
protected MachineGroup |
ExtractMachineGroupFromResponse(net.sf.json.JSONObject dict,
String requestId) |
protected List<String> |
ExtractMachineGroups(net.sf.json.JSONObject object,
String requestId) |
protected ArrayList<Shard> |
ExtractShards(net.sf.json.JSONArray array,
String requestId) |
protected void |
ExtractShards(net.sf.json.JSONArray array,
String requestId,
ArrayList<Integer> shards) |
GetAppliedConfigResponse |
GetAppliedConfig(GetAppliedConfigsRequest request)
get applied config on a certain machine group
|
GetAppliedConfigResponse |
GetAppliedConfig(String project,
String groupName)
get applied config on a certain machine group
|
GetAppliedMachineGroupsResponse |
GetAppliedMachineGroups(GetAppliedMachineGroupRequest request)
get applied machine group for a certain logtail config
|
GetAppliedMachineGroupsResponse |
GetAppliedMachineGroups(String project,
String configName)
get applied machine group for a certain logtail config
|
ConsumerGroupCheckPointResponse |
GetCheckPoint(String project,
String logStore,
String consumerGroup)
get all of the shard checkpoints in the consumer group
|
ConsumerGroupCheckPointResponse |
GetCheckPoint(String project,
String logStore,
String consumerGroup,
int shard)
get shard checkpoint in the consumer group
|
GetConfigResponse |
GetConfig(GetConfigRequest request)
Get logtail config
|
GetConfigResponse |
GetConfig(String project,
String configName)
Get logtail config
|
GetCursorResponse |
GetCursor(GetCursorRequest request)
Get cursor from log service server
|
GetCursorResponse |
GetCursor(String project,
String logStream,
int shardId,
Consts.CursorMode mode)
Get cursor from log service server
|
GetCursorResponse |
GetCursor(String project,
String logStore,
int shardId,
Date fromTime)
Get cursor from log service server
|
GetCursorResponse |
GetCursor(String project,
String logStore,
int shardId,
long fromTime)
Get cursor from log service server
|
GetHistogramsResponse |
GetHistograms(GetHistogramsRequest request)
Get The log status(histogram info) from log service server which match
input parameters.
|
GetHistogramsResponse |
GetHistograms(String project,
String logStore,
int from,
int to,
String topic,
String query)
Get The log status(histogram info) from log service server which match
input parameters.
|
GetIndexResponse |
GetIndex(GetIndexRequest request)
Get logstore index config
|
GetIndexResponse |
GetIndex(String project,
String logStore)
Get logstore index config
|
GetLogsResponse |
GetLogs(GetLogsRequest request)
Get The sub set of logs data from log service server which match input
parameters.
|
GetLogsResponse |
GetLogs(String project,
String logStore,
int from,
int to,
String topic,
String query)
Get The sub set of logs data from log service server which match input
parameters.
|
GetLogsResponse |
GetLogs(String project,
String logStore,
int from,
int to,
String topic,
String query,
int line,
int offset,
boolean reverse)
Get The sub set of logs data from log service server which match input
parameters.
|
GetLogStoreResponse |
GetLogStore(GetLogStoreRequest request)
get the logstore config
|
GetLogStoreResponse |
GetLogStore(String project,
String logStoreName)
Get the logstore config
|
GetMachineGroupResponse |
GetMachineGroup(GetMachineGroupRequest request)
Get machine group
|
GetMachineGroupResponse |
GetMachineGroup(String project,
String groupName)
Get machine group
|
String |
getRealIpForConsole() |
protected String |
GetRequestId(Map<String,String> headers) |
String |
GetSecurityToken() |
GetShipperTasksResponse |
GetShipperTasks(String project,
String logStore,
String shipperName,
int startTime,
int endTime,
String statusType,
int offset,
int size)
Get the tasks of a logstore shipper
|
String |
getUserAgent() |
ConsumerGroupHeartBeatResponse |
HeartBeat(String project,
String logStore,
String consumerGroup,
String consumer,
ArrayList<Integer> shards)
notify the server periodically to show that the consumer is still alive.
|
boolean |
isUseSSLForConsole() |
ListConfigResponse |
ListConfig(ListConfigRequest request)
List logtail configs
|
ListConfigResponse |
ListConfig(String project)
List logtail configs
|
ListConfigResponse |
ListConfig(String project,
int offSet,
int size)
List logtail configs
|
ListConfigResponse |
ListConfig(String project,
String configName,
int offSet,
int size)
List logtail configs
|
ListConsumerGroupResponse |
ListConsumerGroup(String project,
String logStore)
list logstore consumer groups
|
ListLogStoresResponse |
ListLogStores(ListLogStoresRequest request)
Get all the logstore of a project
|
ListLogStoresResponse |
ListLogStores(String project,
int offset,
int size,
String logstoreName)
Get all the logstore for the user
|
ListMachineGroupResponse |
ListMachineGroup(ListMachineGroupRequest request)
List machine groups
|
ListMachineGroupResponse |
ListMachineGroup(String project)
List machine groups
|
ListMachineGroupResponse |
ListMachineGroup(String project,
int offSet,
int size)
List machine groups
|
ListMachineGroupResponse |
ListMachineGroup(String project,
String groupName,
int offSet,
int size)
List machine groups
|
ListMachinesResponse |
ListMachines(String project,
String machineGroup,
int offset,
int size)
List the real machines in the machine group
|
ListShardResponse |
ListShard(ListShardRequest request)
Get the shards in the logtstore
|
ListShardResponse |
ListShard(String prj,
String logStore)
Get the shards in the logtstore
|
ListShipperResponse |
ListShipper(String project,
String logStore)
List shipper of a logstore
|
ListTopicsResponse |
ListTopics(ListTopicsRequest request)
Get the topics in the logtstore
|
ListTopicsResponse |
ListTopics(String project,
String logStore,
String token,
int line)
Get the topics in the logtstore
|
ListShardResponse |
MergeShards(MergeShardsRequest request)
merge two readwrite shards in the logtstore
|
ListShardResponse |
MergeShards(String prj,
String logStore,
int shardId)
merge two readwrite shards in the logtstore
|
protected net.sf.json.JSONObject |
ParserResponseMessage(ResponseMessage response,
String requestId) |
PutLogsResponse |
PutLogs(PutLogsRequest request)
Send Data to log service server
|
PutLogsResponse |
PutLogs(String project,
String logStore,
String topic,
List<LogItem> logItems,
String source)
Send Data to log service server
|
PutLogsResponse |
PutLogs(String project,
String logStore,
String topic,
List<LogItem> logItems,
String source,
String shardHash) |
RemoveConfigFromMachineGroupResponse |
RemoveConfigFromMachineGroup(RemoveConfigFromMachineGroupRequest request)
Remove config from machine group
|
RemoveConfigFromMachineGroupResponse |
RemoveConfigFromMachineGroup(String project,
String groupName,
String configName)
Remove config from machine group
|
void |
RemoveSecurityToken() |
RetryShipperTasksResponse |
RetryShipperTasks(String project,
String logStore,
String shipperName,
List<String> taskList)
retry the failed tasks, for every time it can only retry 10 task
|
protected ResponseMessage |
SendData(String project,
HttpMethod method,
String resourceUri,
Map<String,String> parameters,
Map<String,String> headers,
byte[] body) |
void |
setRealIpForConsole(String realIpForConsole) |
void |
SetSecurityToken(String securityToken) |
void |
setUserAgent(String userAgent) |
void |
setUseSSLForConsole(boolean useSSLForConsole) |
ListShardResponse |
SplitShard(SplitShardRequest request)
split a readwrite shard in the logtstore
|
ListShardResponse |
SplitShard(String prj,
String logStore,
int shardId,
String midHash)
split a readwrite shard in the logtstore
|
ConsumerGroupUpdateCheckPointResponse |
UpdateCheckPoint(String project,
String logStore,
String consumerGroup,
int shard,
String checkpoint)
update consume checkpoint
|
ConsumerGroupUpdateCheckPointResponse |
UpdateCheckPoint(String project,
String logStore,
String consumerGroup,
String consumer,
int shard,
String checkpoint)
update consume checkpoint
|
protected ConsumerGroupUpdateCheckPointResponse |
UpdateCheckPoint(String project,
String logStore,
String consumerGroup,
String consumer,
int shard,
String checkpoint,
boolean forceSuccess) |
UpdateConfigResponse |
UpdateConfig(String project,
Config config)
Update logtail config
|
UpdateConfigResponse |
UpdateConfig(UpdateConfigRequest request)
Update logtail config
|
UpdateConsumerGroupResponse |
UpdateConsumerGroup(String project,
String logStore,
String consumerGroup,
boolean inOrder) |
UpdateConsumerGroupResponse |
UpdateConsumerGroup(String project,
String logStore,
String consumerGroup,
boolean inOrder,
int timeoutInSec)
update consumer group
|
protected UpdateConsumerGroupResponse |
UpdateConsumerGroup(String project,
String logStore,
String consumerGroup,
Boolean inOrder,
Integer timeoutInSec) |
UpdateConsumerGroupResponse |
UpdateConsumerGroup(String project,
String logStore,
String consumerGroup,
int timeoutInSec)
update consumer group
|
UpdateIndexResponse |
UpdateIndex(String project,
String logStore,
Index index)
Update logstore index config
|
UpdateIndexResponse |
UpdateIndex(UpdateIndexRequest request)
update logstore index config
|
UpdateLogStoreResponse |
UpdateLogStore(String project,
LogStore logStore)
Update log store config
|
UpdateLogStoreResponse |
UpdateLogStore(UpdateLogStoreRequest request)
Update logstore config
|
UpdateMachineGroupResponse |
UpdateMachineGroup(String project,
MachineGroup group)
Update machine group
|
UpdateMachineGroupResponse |
UpdateMachineGroup(UpdateMachineGroupRequest request)
Update machine group
|
public Client(String endpoint, String accessId, String accessKey)
endpoint - the log service server addressaccessId - aliyun accessIdaccessKey - aliyun accessKeyNullPointerException - if the input parameter is nullIllegalArgumentException - if the input parameter is emptypublic Client(String endpoint, String accessId, String accessKey, String SourceIp)
endpoint - the log service server addressaccessId - aliyun accessIdaccessKey - aliyun accessKeySourceIp - client ip addressNullPointerException - if the input parameter is nullIllegalArgumentException - if the input parameter is emptypublic Client(String endpoint, String accessId, String accessKey, String sourceIp, boolean compressFlag)
endpoint - the log service server addressaccessId - aliyun accessIdaccessKey - aliyun accessKeysourceIp - client ip addresscompressFlag - a flag to determine if the send data will compressed , default
is true ( data compressed)NullPointerException - if the input parameter is nullIllegalArgumentException - if the input parameter is emptypublic String getUserAgent()
public void setUserAgent(String userAgent)
public String getRealIpForConsole()
public void setRealIpForConsole(String realIpForConsole)
public boolean isUseSSLForConsole()
public void setUseSSLForConsole(boolean useSSLForConsole)
public void ClearConsoleResources()
public String GetSecurityToken()
public void SetSecurityToken(String securityToken)
public void RemoveSecurityToken()
public GetHistogramsResponse GetHistograms(String project, String logStore, int from, int to, String topic, String query) throws LogException
LogServiceGetHistograms 在接口中 LogServiceproject - the project namelogStore - the result data logstorefrom - the begin time of the result data to getto - the end time of the result data to gettopic - the result data topicquery - If the query is not empty, it will return the logs contain the
keys in query, if "all_hit" is contained in the query, only
the logs contains all the keys in query are matched logs,
other wise logs contain any key in query are matched logs.LogException - if any error happen when get the data from log service serverpublic GetHistogramsResponse GetHistograms(GetHistogramsRequest request) throws LogException
LogServiceGetHistograms 在接口中 LogServicerequest - the get histogram requestLogException - if any error happen when get the data from log service serverpublic PutLogsResponse PutLogs(String project, String logStore, String topic, List<LogItem> logItems, String source, String shardHash) throws LogException
LogExceptionpublic PutLogsResponse PutLogs(String project, String logStore, String topic, List<LogItem> logItems, String source) throws LogException
LogServicePutLogs 在接口中 LogServiceproject - the project namelogStore - the log store where the source data should be puttopic - source data topiclogItems - the log data to sendsource - the source of the data, if the source is empty, it will be
reset to the host ipLogException - if any error happen when send data to the serverpublic PutLogsResponse PutLogs(PutLogsRequest request) throws LogException
LogServicePutLogs 在接口中 LogServicerequest - the put log requestLogException - if any error happen when send data to the serverpublic GetLogsResponse GetLogs(String project, String logStore, int from, int to, String topic, String query) throws LogException
LogServiceGetLogs 在接口中 LogServiceproject - the project namelogStore - the result data logstorefrom - the begin time of the result data to getto - the end time of the result data to gettopic - the result data topicquery - If the query is not empty, it will return the logs contain the
keys in query, if "all_hit" is contained in the query, only
the logs contains all the keys in query are matched logs,
other wise logs contain any key in query are matched logsLogException - if any error happen when get the data from log service serverpublic GetLogsResponse GetLogs(String project, String logStore, int from, int to, String topic, String query, int line, int offset, boolean reverse) throws LogException
LogServiceGetLogs 在接口中 LogServiceproject - the project namelogStore - the result data logstorefrom - the begin time of the result data to getto - the end time of the result data to gettopic - the result data topicquery - If the query is not empty, it will return the logs contain the
keys in query, if "all_hit" is contained in the query, only
the logs contains all the keys in query are matched logs,
other wise logs contain any key in query are matched logs.line - how many lines to get, the max lines is decided by the sls
backend serveroffset - the start log index in all the matched logs.reverse - a flag to determine the return data order, if reverse is set
to false, the return logs is ascending order by time, other
wise, it's descending orderLogException - if any error happen when get the data from log service serverpublic GetLogsResponse GetLogs(GetLogsRequest request) throws LogException
LogServiceGetLogs 在接口中 LogServicerequest - the get logs requestLogException - if any error happen when get the data from log service serverpublic ListLogStoresResponse ListLogStores(String project, int offset, int size, String logstoreName) throws LogException
LogServiceListLogStores 在接口中 LogServiceproject - the project nameoffset - the begin offsetsize - the query logstore name countlogstoreName - part name of the logstore, only return the logstores which
contains the input nameLogException - if any error happen when get the data from log service serverpublic ListLogStoresResponse ListLogStores(ListLogStoresRequest request) throws LogException
LogServiceListLogStores 在接口中 LogServicerequest - the list log store requestLogException - if any error happen when get the data from log service serverpublic ListTopicsResponse ListTopics(String project, String logStore, String token, int line) throws LogException
LogServiceListTopics 在接口中 LogServiceproject - the project namelogStore - where the topic belongs totoken - all the returned topics are equal or larger than the given
token according to topics' lexicographical orderline - the topic number from log service serverLogException - if any error happen when get the data from log service serverpublic ListTopicsResponse ListTopics(ListTopicsRequest request) throws LogException
LogServiceListTopics 在接口中 LogServicerequest - the list topics requestLogException - if any error happen when get the data from log service serverpublic GetCursorResponse GetCursor(String project, String logStore, int shardId, long fromTime) throws LogException
LogServiceGetCursor 在接口中 LogServiceproject - the project namelogStore - the log store nameshardId - the shard where the cursor should be getfromTime - the from time of log data in unix time stamp secLogException - if any error happen when get cursor from the serverpublic GetCursorResponse GetCursor(String project, String logStore, int shardId, Date fromTime) throws LogException
LogServiceGetCursor 在接口中 LogServiceproject - the project namelogStore - the log store nameshardId - the shard where the cursor should be getfromTime - the from time of log data in java DateLogException - if any error happen when get cursor from the serverpublic GetCursorResponse GetCursor(String project, String logStream, int shardId, Consts.CursorMode mode) throws LogException
LogServiceGetCursor 在接口中 LogServiceproject - the project namelogStream - the log store nameshardId - the shard where the cursor should be getmode - the mode to get cursor, include BEGIN and ENDLogException - if any error happen when get cursor from the serverpublic GetCursorResponse GetCursor(GetCursorRequest request) throws LogException
LogServiceGetCursor 在接口中 LogServicerequest - the get cursor requestLogException - if any error happen when get cursor from the serverpublic ListShardResponse SplitShard(String prj, String logStore, int shardId, String midHash) throws LogException
LogServiceSplitShard 在接口中 LogServiceprj - the project namelogStore - where the shard belongs toshardId - the shard id to splitmidHash - the middle md5 hash string to split the shardLogException - if any error happen when get the data from log service serverpublic ListShardResponse SplitShard(SplitShardRequest request) throws LogException
LogServiceSplitShard 在接口中 LogServicerequest - split shard requestLogException - if any error happen when get the data from log service serverpublic ListShardResponse MergeShards(String prj, String logStore, int shardId) throws LogException
LogServiceMergeShards 在接口中 LogServiceprj - the project namelogStore - where the shard belongs toshardId - the shard id to merge with right adjacent shardLogException - if any error happen when get the data from log service serverpublic ListShardResponse MergeShards(MergeShardsRequest request) throws LogException
LogServiceMergeShards 在接口中 LogServicerequest - the project nameLogException - if any error happen when get the data from log service serverpublic DeleteShardResponse DeleteShard(String prj, String logStore, int shardId) throws LogException
LogServiceDeleteShard 在接口中 LogServiceprj - the project namelogStore - where the shard belongs toshardId - the shard id to deleteLogException - if any error happen when get the data from log service serverpublic DeleteShardResponse DeleteShard(DeleteShardRequest request) throws LogException
LogServiceDeleteShard 在接口中 LogServicerequest - delete shard requestLogException - if any error happen when get the data from log service serverpublic ListShardResponse ListShard(String prj, String logStore) throws LogException
LogServiceListShard 在接口中 LogServiceprj - the project namelogStore - where the shard belongs toLogException - if any error happen when get the data from log service serverpublic ListShardResponse ListShard(ListShardRequest request) throws LogException
LogServiceListShard 在接口中 LogServicerequest - the get cursor requestLogException - if any error happen when get the data from log service serverpublic BatchGetLogResponse BatchGetLog(String project, String logStore, int shardId, int count, String cursor) throws LogException
LogServiceBatchGetLog 在接口中 LogServiceproject - the project namelogStore - where the shard belongs toshardId - the shard to batch get logcount - the logrgroup numcursor - the cursor to batch get logLogException - if any error happen when get the data from log service serverpublic BatchGetLogResponse BatchGetLog(BatchGetLogRequest request) throws LogException
LogServiceBatchGetLog 在接口中 LogServicerequest - the batch get log requestLogException - if any error happen when get the data from log service serverpublic CreateConfigResponse CreateConfig(String project, Config config) throws LogException
LogServiceCreateConfig 在接口中 LogServiceproject - the project nameconfig - the full config resourceLogException - if any error happen when creating logtail configpublic CreateConfigResponse CreateConfig(CreateConfigRequest request) throws LogException
LogServiceCreateConfig 在接口中 LogServicerequest - the create config requestLogException - if any error happen when creating logtail configpublic UpdateConfigResponse UpdateConfig(String project, Config config) throws LogException
LogServiceUpdateConfig 在接口中 LogServiceproject - the project nameconfig - the full config resourceLogException - if any error happen when updating logtail configpublic UpdateConfigResponse UpdateConfig(UpdateConfigRequest request) throws LogException
LogServiceUpdateConfig 在接口中 LogServicerequest - the update config requestLogException - if any error happen when updating logtail configprotected Config ExtractConfigFromResponse(net.sf.json.JSONObject dict, String requestId) throws LogException
LogExceptionpublic GetConfigResponse GetConfig(String project, String configName) throws LogException
LogServiceGetConfig 在接口中 LogServiceproject - the project nameconfigName - the config nameLogException - if any error happen when getting logtail configpublic GetConfigResponse GetConfig(GetConfigRequest request) throws LogException
LogServiceGetConfig 在接口中 LogServicerequest - the get config requestLogException - if any error happen when getting logtail configpublic DeleteConfigResponse DeleteConfig(String project, String configName) throws LogException
LogServiceDeleteConfig 在接口中 LogServiceproject - the project nameconfigName - the config nameLogException - if any error happen when deleting logtail configpublic DeleteConfigResponse DeleteConfig(DeleteConfigRequest request) throws LogException
LogServiceDeleteConfig 在接口中 LogServicerequest - the delete config requestLogException - if any error happen when deleting logtail configprotected List<String> ExtractConfigs(net.sf.json.JSONObject object, String requestId) throws LogException
LogExceptionpublic ListConfigResponse ListConfig(String project) throws LogException
LogServiceListConfig 在接口中 LogServiceproject - the project nameLogException - if any error happen when listing logtail configspublic ListConfigResponse ListConfig(String project, int offSet, int size) throws LogException
LogServiceListConfig 在接口中 LogServiceproject - the project nameoffSet - the list offsetsize - the query sizeLogException - if any error happen when listing logtail configspublic ListConfigResponse ListConfig(String project, String configName, int offSet, int size) throws LogException
LogServiceListConfig 在接口中 LogServiceproject - the project nameconfigName - the config nameoffSet - the list offsetsize - the query sizeLogException - if any error happen when listing logtail configspublic ListConfigResponse ListConfig(ListConfigRequest request) throws LogException
LogServiceListConfig 在接口中 LogServicerequest - the list configs requestLogException - if any error happen when listing logtail configspublic CreateMachineGroupResponse CreateMachineGroup(String project, MachineGroup group) throws LogException
LogServiceCreateMachineGroup 在接口中 LogServiceproject - the project namegroup - the full machine group resourceLogException - if any error happen when creating machine grouppublic CreateMachineGroupResponse CreateMachineGroup(CreateMachineGroupRequest request) throws LogException
LogServiceCreateMachineGroup 在接口中 LogServicerequest - the create machine group requestLogException - if any error happen when creating machine grouppublic UpdateMachineGroupResponse UpdateMachineGroup(String project, MachineGroup group) throws LogException
LogServiceUpdateMachineGroup 在接口中 LogServiceproject - the project namegroup - the full machine group resourceLogException - if any error happen when updating machine grouppublic UpdateMachineGroupResponse UpdateMachineGroup(UpdateMachineGroupRequest request) throws LogException
LogServiceUpdateMachineGroup 在接口中 LogServicerequest - the update machine group requestLogException - if any error happen when updating machine groupprotected MachineGroup ExtractMachineGroupFromResponse(net.sf.json.JSONObject dict, String requestId) throws LogException
LogExceptionprotected ArrayList<String> ExtractConfigsFromResponse(net.sf.json.JSONObject object, String requestId) throws LogException
LogExceptionprotected ArrayList<String> ExtractConfigMachineGroupFromResponse(net.sf.json.JSONObject object, String requestId) throws LogException
LogExceptionpublic GetAppliedConfigResponse GetAppliedConfig(String project, String groupName) throws LogException
LogServiceGetAppliedConfig 在接口中 LogServiceproject - the project namegroupName - the machine group nameLogException - if any error happen when get applied config configspublic GetAppliedConfigResponse GetAppliedConfig(GetAppliedConfigsRequest request) throws LogException
LogServiceGetAppliedConfig 在接口中 LogServicerequest - get applied config requestLogException - if any error happen when get applied config configspublic GetAppliedMachineGroupsResponse GetAppliedMachineGroups(String project, String configName) throws LogException
LogServiceGetAppliedMachineGroups 在接口中 LogServiceproject - the project nameconfigName - the config nameLogException - if any error happen when get applied config configspublic GetAppliedMachineGroupsResponse GetAppliedMachineGroups(GetAppliedMachineGroupRequest request) throws LogException
LogServiceGetAppliedMachineGroups 在接口中 LogServicerequest - get applied machine group requestLogException - if any error happen when get applied config configspublic GetMachineGroupResponse GetMachineGroup(String project, String groupName) throws LogException
LogServiceGetMachineGroup 在接口中 LogServiceproject - the project namegroupName - the machine group nameLogException - if any error happen when getting machine grouppublic GetMachineGroupResponse GetMachineGroup(GetMachineGroupRequest request) throws LogException
LogServiceGetMachineGroup 在接口中 LogServicerequest - the get machine group requestLogException - if any error happen when getting machine grouppublic ListMachinesResponse ListMachines(String project, String machineGroup, int offset, int size) throws LogException
LogServiceListMachines 在接口中 LogServiceproject - the project namemachineGroup - the machine group nameoffset - the offset in the machine groupsize - the size to getLogException - if any error happen when listing machinespublic DeleteMachineGroupResponse DeleteMachineGroup(String project, String groupName) throws LogException
LogServiceDeleteMachineGroup 在接口中 LogServiceproject - the project namegroupName - the machine group nameLogException - if any error happen when deleting machine grouppublic DeleteMachineGroupResponse DeleteMachineGroup(DeleteMachineGroupRequest request) throws LogException
LogServiceDeleteMachineGroup 在接口中 LogServicerequest - the delete machine group requestLogException - if any error happen when deleting machine groupprotected List<String> ExtractMachineGroups(net.sf.json.JSONObject object, String requestId) throws LogException
LogExceptionpublic ListMachineGroupResponse ListMachineGroup(String project) throws LogException
LogServiceListMachineGroup 在接口中 LogServiceproject - the project nameLogException - if any error happen when listing machine groupspublic ListMachineGroupResponse ListMachineGroup(String project, int offSet, int size) throws LogException
LogServiceListMachineGroup 在接口中 LogServiceproject - the project nameoffSet - the list offsetsize - the query sizeLogException - if any error happen when listing machine groupspublic ListMachineGroupResponse ListMachineGroup(String project, String groupName, int offSet, int size) throws LogException
LogServiceListMachineGroup 在接口中 LogServiceproject - the project namegroupName - the machine group nameoffSet - the list offsetsize - the query sizeLogException - if any error happen when listing machine groupspublic ListMachineGroupResponse ListMachineGroup(ListMachineGroupRequest request) throws LogException
LogServiceListMachineGroup 在接口中 LogServicerequest - the list machine groups requestLogException - if any error happen when listing machine grouppublic ApplyConfigToMachineGroupResponse ApplyConfigToMachineGroup(String project, String groupName, String configName) throws LogException
LogServiceApplyConfigToMachineGroup 在接口中 LogServiceproject - the project namegroupName - the machine group nameconfigName - the logtail config nameLogException - if any error happen when applying config to machine grouppublic ApplyConfigToMachineGroupResponse ApplyConfigToMachineGroup(ApplyConfigToMachineGroupRequest request) throws LogException
LogServiceApplyConfigToMachineGroup 在接口中 LogServicerequest - apply config to machine group requestLogException - if any error happen when applying config to machine grouppublic RemoveConfigFromMachineGroupResponse RemoveConfigFromMachineGroup(String project, String groupName, String configName) throws LogException
LogServiceRemoveConfigFromMachineGroup 在接口中 LogServiceproject - the project namegroupName - the machine group nameconfigName - the logtail config nameLogException - if any error happen when removing config from machine grouppublic RemoveConfigFromMachineGroupResponse RemoveConfigFromMachineGroup(RemoveConfigFromMachineGroupRequest request) throws LogException
LogServiceRemoveConfigFromMachineGroup 在接口中 LogServicerequest - remove config from machine group requestLogException - if any error happen when removing config from machine groupprotected void ErrorCheck(net.sf.json.JSONObject object,
String requestId)
throws LogException
LogExceptionprotected net.sf.json.JSONObject ParserResponseMessage(ResponseMessage response, String requestId) throws LogException
LogExceptionprotected ResponseMessage SendData(String project, HttpMethod method, String resourceUri, Map<String,String> parameters, Map<String,String> headers, byte[] body) throws LogException
LogExceptionprotected ArrayList<Shard> ExtractShards(net.sf.json.JSONArray array, String requestId) throws LogException
LogExceptionpublic CreateLogStoreResponse CreateLogStore(String project, LogStore logStore) throws LogException
LogServiceCreateLogStore 在接口中 LogServiceproject - the project namelogStore - the configLogException - if any error happen when creasting logstorepublic CreateLogStoreResponse CreateLogStore(CreateLogStoreRequest request) throws LogException
LogServiceCreateLogStore 在接口中 LogServicerequest - logstore create requestLogException - if any error happen when creasting logstorepublic DeleteLogStoreResponse DeleteLogStore(String project, String logStoreName) throws LogException
LogServiceDeleteLogStore 在接口中 LogServiceproject - the project namelogStoreName - the lostore to deleteLogException - if any error happen when deleting logstorepublic DeleteLogStoreResponse DeleteLogStore(DeleteLogStoreRequest request) throws LogException
LogServiceDeleteLogStore 在接口中 LogServicerequest - delete logstore requestLogException - if any error happen when deleting logstorepublic UpdateLogStoreResponse UpdateLogStore(String project, LogStore logStore) throws LogException
LogServiceUpdateLogStore 在接口中 LogServiceproject - the project namelogStore - the logsotre configLogException - if any error happen when updating logstorepublic UpdateLogStoreResponse UpdateLogStore(UpdateLogStoreRequest request) throws LogException
LogServiceUpdateLogStore 在接口中 LogServicerequest - update logstore requstLogException - if any error happen when updating logstorepublic GetLogStoreResponse GetLogStore(String project, String logStoreName) throws LogException
LogServiceGetLogStore 在接口中 LogServiceproject - the project namelogStoreName - the logstore nameLogException - if any error happen when getting logstore configpublic GetLogStoreResponse GetLogStore(GetLogStoreRequest request) throws LogException
LogServiceGetLogStore 在接口中 LogServicerequest - the get logstore config requestLogException - if any error happen when getting logstore configpublic CreateIndexResponse CreateIndex(String project, String logStore, Index index) throws LogException
LogServiceCreateIndex 在接口中 LogServiceproject - the project namelogStore - the logstore nameindex - logstore index configLogException - if any error happen when creating indexpublic CreateIndexResponse CreateIndex(CreateIndexRequest request) throws LogException
LogServiceCreateIndex 在接口中 LogServicerequest - the create logstore index requestLogException - if any error happen when creating indexpublic UpdateIndexResponse UpdateIndex(String project, String logStore, Index index) throws LogException
LogServiceUpdateIndex 在接口中 LogServiceproject - project namelogStore - logstore nameindex - logstore index configLogException - if any error happen when updating logstore index configpublic UpdateIndexResponse UpdateIndex(UpdateIndexRequest request) throws LogException
LogServiceUpdateIndex 在接口中 LogServicerequest - update logstore index requestLogException - if any error happen when update logstore index configpublic DeleteIndexResponse DeleteIndex(String project, String logStore) throws LogException
LogServiceDeleteIndex 在接口中 LogServiceproject - project namelogStore - store nameLogException - if any error happen when deleting logstore index configpublic DeleteIndexResponse DeleteIndex(DeleteIndexRequest request) throws LogException
LogServiceDeleteIndex 在接口中 LogServicerequest - delete logstore index configLogException - if any error happen when deleting logstore index configpublic GetIndexResponse GetIndex(String project, String logStore) throws LogException
LogServiceGetIndex 在接口中 LogServiceproject - project namelogStore - logstore nameLogException - if any error happen when get index configpublic GetIndexResponse GetIndex(GetIndexRequest request) throws LogException
LogServiceGetIndex 在接口中 LogServicerequest - get logstore index requestLogException - if any error happen when getting index configpublic ListShipperResponse ListShipper(String project, String logStore) throws LogException
LogServiceListShipper 在接口中 LogServiceproject - project namelogStore - logstore nameLogException - if any error happenedpublic GetShipperTasksResponse GetShipperTasks(String project, String logStore, String shipperName, int startTime, int endTime, String statusType, int offset, int size) throws LogException
LogServiceGetShipperTasks 在接口中 LogServiceproject - project namelogStore - logstore nameshipperName - shipper namestartTime - the start time in timestamp (from 1970.1.1)endTime - the end timestatusType - one of ['', 'success', 'running', 'fail'], if statusType is
'', return all tasksoffset - the offsetsize - the task countLogException - if any error happenedpublic RetryShipperTasksResponse RetryShipperTasks(String project, String logStore, String shipperName, List<String> taskList) throws LogException
LogServiceRetryShipperTasks 在接口中 LogServiceproject - project namelogStore - logstore nameshipperName - shipper nametaskList - failed task id listLogException - if any error happenedpublic CreateConsumerGroupResponse CreateConsumerGroup(String project, String logStore, ConsumerGroup consumerGroup) throws LogException
LogServiceCreateConsumerGroup 在接口中 LogServiceproject - project namelogStore - logstore nameconsumerGroup - contains all of the parameters needed by consumer groupLogException - if any error happenedpublic CreateConsumerGroupResponse CreateConsumerGroup(CreateConsumerGroupRequest request) throws LogException
LogServiceCreateConsumerGroup 在接口中 LogServicerequest - contains all of the parameters neededLogException - if any error happenedprotected UpdateConsumerGroupResponse UpdateConsumerGroup(String project, String logStore, String consumerGroup, Boolean inOrder, Integer timeoutInSec) throws LogException
LogExceptionpublic UpdateConsumerGroupResponse UpdateConsumerGroup(String project, String logStore, String consumerGroup, boolean inOrder, int timeoutInSec) throws LogException
LogServiceUpdateConsumerGroup 在接口中 LogServiceproject - project namelogStore - logstore nameconsumerGroup - consumer group nameinOrder - consume data in oder or nottimeoutInSec - if the time interval of a consumer's heartbeat exceed this
value in second, the consumer will be deleted.LogException - if any error happenedpublic UpdateConsumerGroupResponse UpdateConsumerGroup(String project, String logStore, String consumerGroup, boolean inOrder) throws LogException
UpdateConsumerGroup 在接口中 LogServiceLogExceptionpublic UpdateConsumerGroupResponse UpdateConsumerGroup(String project, String logStore, String consumerGroup, int timeoutInSec) throws LogException
LogServiceUpdateConsumerGroup 在接口中 LogServiceproject - project namelogStore - logstore nameconsumerGroup - consumer group nametimeoutInSec - if the time interval of a consumer's heartbeat exceed this
value in second, the consumer will be deleted.LogException - if any error happenedpublic DeleteConsumerGroupResponse DeleteConsumerGroup(String project, String logStore, String consumerGroup) throws LogException
LogServiceDeleteConsumerGroup 在接口中 LogServiceproject - project namelogStore - logstore nameconsumerGroup - consumer group nameLogException - if any error happenedpublic ListConsumerGroupResponse ListConsumerGroup(String project, String logStore) throws LogException
LogServiceListConsumerGroup 在接口中 LogServiceproject - project namelogStore - logstore nameLogException - if any error happenedpublic ConsumerGroupUpdateCheckPointResponse UpdateCheckPoint(String project, String logStore, String consumerGroup, String consumer, int shard, String checkpoint) throws LogException
LogServiceUpdateCheckPoint 在接口中 LogServiceproject - project namelogStore - logstore nameconsumerGroup - consumer group nameconsumer - consumer nameshard - shard idcheckpoint - shard cursorLogException - if any error happenedpublic ConsumerGroupUpdateCheckPointResponse UpdateCheckPoint(String project, String logStore, String consumerGroup, int shard, String checkpoint) throws LogException
LogServiceUpdateCheckPoint 在接口中 LogServiceproject - project namelogStore - logstore nameconsumerGroup - consumer group nameshard - shard idcheckpoint - shard cursorLogException - if any error happenedprotected ConsumerGroupUpdateCheckPointResponse UpdateCheckPoint(String project, String logStore, String consumerGroup, String consumer, int shard, String checkpoint, boolean forceSuccess) throws LogException
LogExceptionpublic ConsumerGroupHeartBeatResponse HeartBeat(String project, String logStore, String consumerGroup, String consumer, ArrayList<Integer> shards) throws LogException
LogServiceHeartBeat 在接口中 LogServiceproject - project namelogStore - logstore nameconsumerGroup - consumer group nameconsumer - consumer nameshards - shards hold by the consumerLogException - if any error happenedprotected void ExtractShards(net.sf.json.JSONArray array,
String requestId,
ArrayList<Integer> shards)
throws LogException
LogExceptionpublic ConsumerGroupCheckPointResponse GetCheckPoint(String project, String logStore, String consumerGroup) throws LogException
LogServiceGetCheckPoint 在接口中 LogServiceproject - project namelogStore - logstore nameconsumerGroup - consumer group nameLogException - if any error happenedpublic ConsumerGroupCheckPointResponse GetCheckPoint(String project, String logStore, String consumerGroup, int shard) throws LogException
LogServiceGetCheckPoint 在接口中 LogServiceproject - project namelogStore - logstore nameconsumerGroup - consumer group nameshard - shard idLogException - if any error happenedCopyright © 2016. All Rights Reserved.