aliyun-log-python-sdk 0.9.27__tar.gz → 0.9.28__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. {aliyun_log_python_sdk-0.9.27/aliyun_log_python_sdk.egg-info → aliyun_log_python_sdk-0.9.28}/PKG-INFO +1 -1
  2. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/__init__.py +6 -1
  3. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/consumer/config.py +3 -1
  4. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/consumer/consumer_client.py +2 -2
  5. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/consumer/shard_worker.py +6 -3
  6. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/consumer/tasks.py +3 -3
  7. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/consumer/worker.py +2 -1
  8. aliyun_log_python_sdk-0.9.28/aliyun/log/deletelogsrequest.py +113 -0
  9. aliyun_log_python_sdk-0.9.28/aliyun/log/deletelogssresponse.py +32 -0
  10. aliyun_log_python_sdk-0.9.28/aliyun/log/getdeletelogsstatusrequest.py +57 -0
  11. aliyun_log_python_sdk-0.9.28/aliyun/log/getdeletelogsstatusresponse.py +37 -0
  12. aliyun_log_python_sdk-0.9.28/aliyun/log/listdeletelogsstasksrequest.py +37 -0
  13. aliyun_log_python_sdk-0.9.28/aliyun/log/listdeletelogsstasksresponse.py +53 -0
  14. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/logclient.py +94 -7
  15. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/logclient_operator.py +4 -4
  16. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/version.py +1 -1
  17. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28/aliyun_log_python_sdk.egg-info}/PKG-INFO +1 -1
  18. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun_log_python_sdk.egg-info/SOURCES.txt +6 -0
  19. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/LICENSE +0 -0
  20. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/README.md +0 -0
  21. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/__init__.py +0 -0
  22. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/_proto_py2/__init__.py +0 -0
  23. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/_proto_py2/log_logs_pb2.py +0 -0
  24. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/_proto_py2/log_logs_raw_pb2.py +0 -0
  25. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/acl_config.py +0 -0
  26. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/acl_response.py +0 -0
  27. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/auth.py +0 -0
  28. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/common_response.py +0 -0
  29. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/compress.py +0 -0
  30. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/consumer/__init__.py +0 -0
  31. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/consumer/checkpoint_tracker.py +0 -0
  32. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/consumer/exceptions.py +0 -0
  33. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/consumer/fetched_log_group.py +0 -0
  34. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/consumer/heart_beat.py +0 -0
  35. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/consumer_group_request.py +0 -0
  36. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/consumer_group_response.py +0 -0
  37. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/credentials.py +0 -0
  38. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/cursor_response.py +0 -0
  39. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/cursor_time_response.py +0 -0
  40. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/es_migration/__init__.py +0 -0
  41. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/es_migration/doc_logitem_converter.py +0 -0
  42. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/es_migration/index_logstore_mappings.py +0 -0
  43. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/es_migration/mapping_index_converter.py +0 -0
  44. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/es_migration/migration_log.py +0 -0
  45. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/es_migration/migration_manager.py +0 -0
  46. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/es_migration/migration_response.py +0 -0
  47. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/es_migration/migration_task.py +0 -0
  48. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/es_migration/util.py +0 -0
  49. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_config_response.py +0 -0
  50. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/__init__.py +0 -0
  51. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/config_parser.py +0 -0
  52. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/etl_util.py +0 -0
  53. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/exceptions.py +0 -0
  54. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/restrict_config_parser.py +0 -0
  55. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/runner.py +0 -0
  56. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/settings.py +0 -0
  57. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/trans_comp/__init__.py +0 -0
  58. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/trans_comp/trans_base.py +0 -0
  59. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/trans_comp/trans_csv.py +0 -0
  60. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/trans_comp/trans_json.py +0 -0
  61. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/trans_comp/trans_kv.py +0 -0
  62. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/trans_comp/trans_lookup.py +0 -0
  63. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/trans_comp/trans_mv.py +0 -0
  64. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/trans_comp/trans_regex.py +0 -0
  65. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/trans_comp/trans_set_field.py +0 -0
  66. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/transform/__init__.py +0 -0
  67. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/transform/condition_list.py +0 -0
  68. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/transform/condition_transform.py +0 -0
  69. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/transform/condition_util.py +0 -0
  70. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/transform/transform_base.py +0 -0
  71. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/transform/transform_list.py +0 -0
  72. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/etl_core/transform/transform_meta.py +0 -0
  73. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/export_response.py +0 -0
  74. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/ext/__init__.py +0 -0
  75. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/ext/jupyter_magic.py +0 -0
  76. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/ext/syslogclient.py +0 -0
  77. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/external_store_config.py +0 -0
  78. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/external_store_config_response.py +0 -0
  79. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/getcontextlogsresponse.py +0 -0
  80. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/gethistogramsrequest.py +0 -0
  81. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/gethistogramsresponse.py +0 -0
  82. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/getlogsrequest.py +0 -0
  83. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/getlogsresponse.py +0 -0
  84. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/histogram.py +0 -0
  85. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/index_config.py +0 -0
  86. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/index_config_response.py +0 -0
  87. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/ingestion_response.py +0 -0
  88. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/job.py +0 -0
  89. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/listlogstoresrequest.py +0 -0
  90. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/listlogstoresresponse.py +0 -0
  91. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/listtopicsrequest.py +0 -0
  92. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/listtopicsresponse.py +0 -0
  93. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/log_logs_pb2.py +0 -0
  94. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/log_logs_raw_pb2.py +0 -0
  95. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/logclient_core.py +0 -0
  96. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/logexception.py +0 -0
  97. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/logger_hanlder.py +0 -0
  98. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/logitem.py +0 -0
  99. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/logrequest.py +0 -0
  100. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/logresponse.py +0 -0
  101. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/logstore_config_response.py +0 -0
  102. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/logtail_config_detail.py +0 -0
  103. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/logtail_config_response.py +0 -0
  104. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/machine_group_detail.py +0 -0
  105. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/machinegroup_response.py +0 -0
  106. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/metering_mode_response.py +0 -0
  107. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/odps_sink.py +0 -0
  108. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/oss_sink.py +0 -0
  109. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/pluralize.py +0 -0
  110. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/project_response.py +0 -0
  111. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/proto.py +0 -0
  112. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/pulllog_response.py +0 -0
  113. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/putlogsrequest.py +0 -0
  114. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/putlogsresponse.py +0 -0
  115. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/queriedlog.py +0 -0
  116. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/rebuild_index_response.py +0 -0
  117. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/resource_params.py +0 -0
  118. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/resource_response.py +0 -0
  119. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/scheduled_sql.py +0 -0
  120. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/scheduled_sql_response.py +0 -0
  121. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/shard_response.py +0 -0
  122. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/shipper_config.py +0 -0
  123. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/shipper_response.py +0 -0
  124. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/sink.py +0 -0
  125. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/sql_instance_response.py +0 -0
  126. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/store_view.py +0 -0
  127. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/store_view_response.py +0 -0
  128. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/substore_config_response.py +0 -0
  129. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/tag_response.py +0 -0
  130. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/topostore_params.py +0 -0
  131. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/topostore_response.py +0 -0
  132. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun/log/util.py +0 -0
  133. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun_log_python_sdk.egg-info/dependency_links.txt +0 -0
  134. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun_log_python_sdk.egg-info/requires.txt +0 -0
  135. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/aliyun_log_python_sdk.egg-info/top_level.txt +0 -0
  136. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/setup.cfg +0 -0
  137. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/setup.py +0 -0
  138. {aliyun_log_python_sdk-0.9.27 → aliyun_log_python_sdk-0.9.28}/tests/test_alert.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aliyun-log-python-sdk
3
- Version: 0.9.27
3
+ Version: 0.9.28
4
4
  Summary: Aliyun log service Python client SDK
5
5
  Home-page: https://github.com/aliyun/aliyun-log-python-sdk
6
6
  Author: Aliyun
@@ -35,7 +35,12 @@ from .common_response import *
35
35
  from .external_store_config_response import *
36
36
  from .proto import LogGroupRaw as LogGroup
37
37
  from .rebuild_index_response import *
38
-
38
+ from .deletelogsrequest import *
39
+ from .deletelogssresponse import *
40
+ from .getdeletelogsstatusrequest import *
41
+ from .getdeletelogsstatusresponse import *
42
+ from .listdeletelogsstasksrequest import *
43
+ from .listdeletelogsstasksresponse import *
39
44
  # logging handler
40
45
  from .logger_hanlder import SimpleLogHandler, QueuedLogHandler, LogFields, UwsgiQueuedLogHandler
41
46
  from .metering_mode_response import GetLogStoreMeteringModeResponse, \
@@ -26,7 +26,7 @@ class LogHubConfig(object):
26
26
  cursor_start_time=None, security_token=None, max_fetch_log_group_size=None, worker_pool_size=None, shared_executor=None,
27
27
  cursor_end_time=None, credentials_refresher=None,
28
28
  auth_version=AUTH_VERSION_1, region='', query=None,
29
- accept_compress_type=None):
29
+ accept_compress_type=None, processor=None):
30
30
  """
31
31
 
32
32
  :param endpoint:
@@ -49,6 +49,7 @@ class LogHubConfig(object):
49
49
  :param auth_version: only support AUTH_VERSION_1 and AUTH_VERSION_4
50
50
  :param region: region of project
51
51
  :param query: the SPL query, such as *| where a = 'xxx'
52
+ :param processor: the consume processor which contains SPL, such as consume-processor-1
52
53
  :type accept_compress_type: string
53
54
  :param accept_compress_type: The compression type used for logs retrieved from sls.
54
55
  Supported types include 'lz4' and 'zstd'. If you choose 'zstd', ensure the `zstd` library is installed via pip. The default value is 'lz4'.
@@ -77,3 +78,4 @@ class LogHubConfig(object):
77
78
  self.region = region
78
79
  self.query = query
79
80
  self.accept_compress_type = accept_compress_type
81
+ self.processor = processor
@@ -179,5 +179,5 @@ class ConsumerClient(object):
179
179
  def get_end_cursor(self, shard_id):
180
180
  return self.mclient.get_end_cursor(self.mproject, self.mlogstore, shard_id).get_cursor()
181
181
 
182
- def pull_logs(self, shard_id, cursor, end_cursor=None, count=1000, query=None):
183
- return self.mclient.pull_logs(self.mproject, self.mlogstore, shard_id, cursor, count, compress=True, end_cursor=end_cursor, query=query, accept_compress_type=self.accept_compress_type)
182
+ def pull_logs(self, shard_id, cursor, end_cursor=None, count=1000, query=None, processor=None):
183
+ return self.mclient.pull_logs(self.mproject, self.mlogstore, shard_id, cursor, count, compress=True, end_cursor=end_cursor, query=query, accept_compress_type=self.accept_compress_type, processor=processor)
@@ -2,6 +2,7 @@
2
2
 
3
3
  import copy
4
4
  import logging
5
+ from platform import processor
5
6
  import time
6
7
 
7
8
  from .checkpoint_tracker import ConsumerCheckpointTracker
@@ -30,7 +31,7 @@ class ShardConsumerWorkerLoggerAdapter(logging.LoggerAdapter):
30
31
 
31
32
  class ShardConsumerWorker(object):
32
33
  def __init__(self, log_client, shard_id, consumer_name, processor, cursor_position, cursor_start_time,
33
- max_fetch_log_group_size=1000, executor=None, cursor_end_time=None, query=None):
34
+ max_fetch_log_group_size=1000, executor=None, cursor_end_time=None, query=None, consume_processor=None):
34
35
  self.log_client = log_client
35
36
  self.shard_id = shard_id
36
37
  self.consumer_name = consumer_name
@@ -64,6 +65,7 @@ class ShardConsumerWorker(object):
64
65
  self.last_success_fetch_time_with_data = 0
65
66
  self.save_last_checkpoint = False
66
67
  self.query = query
68
+ self.consume_processor = consume_processor
67
69
  self.logger = ShardConsumerWorkerLoggerAdapter(
68
70
  logging.getLogger(__name__), {"shard_consumer_worker": self})
69
71
 
@@ -121,7 +123,7 @@ class ShardConsumerWorker(object):
121
123
  is_generate_fetch_task = True
122
124
  fetch_size = self.last_fetch_size
123
125
  fetch_count = self.last_fetch_count
124
- if self.query:
126
+ if self.query or self.consume_processor:
125
127
  fetch_size = self.rawSizeBeforeQuery
126
128
  fetch_count = self.rawLogGroupCountBeforeQuery
127
129
 
@@ -138,7 +140,8 @@ class ShardConsumerWorker(object):
138
140
  self.executor.submit(consumer_fetch_task,
139
141
  self.log_client, self.shard_id, self.next_fetch_cursor,
140
142
  max_fetch_log_group_size=self.max_fetch_log_group_size,
141
- end_cursor=self.fetch_end_cursor, query=self.query)
143
+ end_cursor=self.fetch_end_cursor, query=self.query,
144
+ consume_processor=self.consume_processor)
142
145
  else:
143
146
  self.fetch_data_future = None
144
147
  else:
@@ -187,18 +187,18 @@ def consumer_initialize_task(processor, consumer_client, shard_id, cursor_positi
187
187
  return TaskResult(e)
188
188
 
189
189
 
190
- def consumer_fetch_task(loghub_client_adapter, shard_id, cursor, max_fetch_log_group_size=1000, end_cursor=None, query=None):
190
+ def consumer_fetch_task(loghub_client_adapter, shard_id, cursor, max_fetch_log_group_size=1000, end_cursor=None, query=None, consume_processor=None):
191
191
  exception = None
192
192
 
193
193
  for retry_times in range(3):
194
194
  try:
195
- response = loghub_client_adapter.pull_logs(shard_id, cursor, count=max_fetch_log_group_size, end_cursor=end_cursor, query=query)
195
+ response = loghub_client_adapter.pull_logs(shard_id, cursor, count=max_fetch_log_group_size, end_cursor=end_cursor, query=query, processor=consume_processor)
196
196
  fetch_log_group_list = response.get_loggroup_list()
197
197
  next_cursor = response.get_next_cursor()
198
198
  raw_size = response.get_raw_size()
199
199
  raw_size_before_query = 0
200
200
  raw_log_group_count_before_query = 0
201
- if query:
201
+ if query or consume_processor:
202
202
  raw_size_before_query = max(response.get_raw_size_before_query(), 0)
203
203
  raw_log_group_count_before_query = max(response.get_raw_log_group_count_before_query(), 0)
204
204
  logger.debug("shard id = %s cursor = %s next cursor = %s size: %s",
@@ -198,6 +198,7 @@ class ConsumerWorker(Thread):
198
198
  executor=self._executor,
199
199
  cursor_end_time=self.option.cursor_end_time,
200
200
  max_fetch_log_group_size=self.option.max_fetch_log_group_size,
201
- query=self.option.query)
201
+ query=self.option.query,
202
+ consume_processor=self.option.processor)
202
203
  self.shard_consumers[shard_id] = consumer
203
204
  return consumer
@@ -0,0 +1,113 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ from .logrequest import LogRequest
8
+ from .util import parse_timestamp
9
+
10
+ class DeleteLogsRequest(LogRequest):
11
+ """ The request used to get histograms of a query from log.
12
+
13
+ :type project: string
14
+ :param project: project name
15
+
16
+ :type logstore: string
17
+ :param logstore: logstore name
18
+
19
+ :type fromTime: int/string
20
+ :param fromTime: the begin time or format of time in readable time like "%Y-%m-%d %H:%M:%S<time_zone>" e.g. "2018-01-02 12:12:10+8:00" e.g. "2018-01-02 12:12:10", also support human readable string, e.g. "1 hour ago", "now", "yesterday 0:0:0", refer to https://aliyun-log-cli.readthedocs.io/en/latest/tutorials/tutorial_human_readable_datetime.html
21
+
22
+ :type toTime: int/string
23
+ :param toTime: the end time or format of time in readable time like "%Y-%m-%d %H:%M:%S<time_zone>" e.g. "2018-01-02 12:12:10+8:00" e.g. "2018-01-02 12:12:10", also support human readable string, e.g. "1 hour ago", "now", "yesterday 0:0:0", refer to https://aliyun-log-cli.readthedocs.io/en/latest/tutorials/tutorial_human_readable_datetime.html
24
+
25
+ :type topic: string
26
+ :param topic: topic name of logs
27
+
28
+ :type query: string
29
+ :param query: user defined query
30
+ """
31
+
32
+ def __init__(self, project=None, logstore=None, fromTime=None, toTime=None, topic=None, query=None):
33
+ LogRequest.__init__(self, project)
34
+ self.logstore = logstore
35
+ self.fromTime = parse_timestamp(fromTime)
36
+ self.toTime = parse_timestamp(toTime)
37
+ self.topic = topic
38
+ self.query = query
39
+
40
+ def get_logstore(self):
41
+ """ Get logstore name
42
+
43
+ :return: string, logstore name.
44
+ """
45
+ return self.logstore if self.logstore else ''
46
+
47
+ def set_logstore(self, logstore):
48
+ """ Set logstore name
49
+
50
+ :type logstore: string
51
+ :param logstore: logstore name
52
+ """
53
+ self.logstore = logstore
54
+
55
+ def get_topic(self):
56
+ """ Get topic name
57
+
58
+ :return: string, topic name
59
+ """
60
+ return self.topic if self.topic else ''
61
+
62
+ def set_topic(self, topic):
63
+ """ Set topic name
64
+
65
+ :type topic: string
66
+ :param topic: topic name
67
+ """
68
+ self.topic = topic
69
+
70
+ def get_from(self):
71
+ """ Get begin time
72
+
73
+ :return: int, begin time
74
+ """
75
+ return self.fromTime
76
+
77
+ def set_from(self, fromTime):
78
+ """ Set begin time
79
+
80
+ :type fromTime: int
81
+ :param fromTime: begin time
82
+ """
83
+ self.fromTime = fromTime
84
+
85
+ def get_to(self):
86
+ """ Get end time
87
+
88
+ :return: int, end time
89
+ """
90
+ return self.toTime
91
+
92
+ def set_to(self, toTime):
93
+ """ Set end time
94
+
95
+ :type toTime: int
96
+ :param toTime: end time
97
+ """
98
+ self.toTime = toTime
99
+
100
+ def get_query(self):
101
+ """ Get user defined query
102
+
103
+ :return: string, user defined query
104
+ """
105
+ return self.query
106
+
107
+ def set_query(self, query):
108
+ """ Set user defined query
109
+
110
+ :type query: string
111
+ :param query: user defined query
112
+ """
113
+ self.query = query
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ from .logresponse import LogResponse
8
+ from .histogram import Histogram
9
+ from .util import Util
10
+ import json
11
+
12
+
13
+ class DeleteLogsResponse(LogResponse):
14
+ """ The response of the DeleteLogs API from log.
15
+
16
+ :type resp: dict
17
+ :param resp: DeleteLogsResponse HTTP response body
18
+
19
+ :type header: dict
20
+ :param header: DeleteLogsResponse HTTP response header
21
+ """
22
+ def __init__(self, resp, header):
23
+ LogResponse.__init__(self, header, resp)
24
+ self.taskid = resp.get('taskId')
25
+
26
+ def get_taskid(self):
27
+ return self.taskid
28
+
29
+ def log_print(self):
30
+ print('DeleteLogsResponse:')
31
+ print('headers:', self.get_all_headers())
32
+ print('taskid:', self.taskid)
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ from .logrequest import LogRequest
8
+ from .util import parse_timestamp
9
+
10
+ class GetDeleteLogsStatusRequest(LogRequest):
11
+ """ The request used to get histograms of a query from log.
12
+
13
+ :type project: string
14
+ :param project: project name
15
+
16
+ :type logstore: string
17
+ :param logstore: logstore name
18
+
19
+ :type taskid: string
20
+ :param taskid: delete query taskid
21
+
22
+ """
23
+
24
+ def __init__(self, project=None, logstore=None, taskid=None):
25
+ LogRequest.__init__(self, project)
26
+ self.logstore = logstore
27
+ self.taskid = taskid
28
+ def get_logstore(self):
29
+ """ Get logstore name
30
+
31
+ :return: string, logstore name.
32
+ """
33
+ return self.logstore if self.logstore else ''
34
+
35
+ def set_logstore(self, logstore):
36
+ """ Set logstore name
37
+
38
+ :type logstore: string
39
+ :param logstore: logstore name
40
+ """
41
+ self.logstore = logstore
42
+
43
+ def get_taskid(self):
44
+ """ Get taskid name
45
+
46
+ :return: string, taskid name.
47
+ """
48
+ return self.taskid if self.taskid else ''
49
+
50
+ def set_taskid(self, taskid):
51
+ """ Set taskid name
52
+
53
+ :type taskid: string
54
+ :param taskid: taskid name
55
+ """
56
+ self.taskid = taskid
57
+
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ from .logresponse import LogResponse
8
+
9
+ class GetDeleteLogsStatusResponse(LogResponse):
10
+ """ The response of the GetDeleteLogsStatus API from log.
11
+
12
+ :type resp: dict
13
+ :param resp: GetDeleteLogsStatusResponse HTTP response body
14
+
15
+ :type header: dict
16
+ :param header: GetDeleteLogsStatusResponse HTTP response header
17
+ """
18
+
19
+ def __init__(self, resp, header):
20
+ LogResponse.__init__(self, header, resp)
21
+ self.process = resp['progress']
22
+
23
+ def is_completed(self):
24
+ """ Check if the histogram is completed
25
+
26
+ :return: bool, true if this histogram is completed
27
+ """
28
+ return self.process == 100.0
29
+
30
+ def get_process(self):
31
+ return self.process
32
+
33
+ def log_print(self):
34
+ print('GetDeleteLogsStatusResponse:')
35
+ print('headers:', self.get_all_headers())
36
+ print('progress:', self.process)
37
+
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ from .logrequest import LogRequest
8
+
9
+
10
+ class ListDeleteLogsTasksRequest(LogRequest):
11
+ """ The request used to list delete logs tasks from log.
12
+
13
+ :type project: string
14
+ :param project: project name
15
+
16
+ :type logstore: string
17
+ :param logstore: logstore name
18
+ """
19
+
20
+ def __init__(self, project=None, logstore=None):
21
+ LogRequest.__init__(self, project)
22
+ self.logstore = logstore
23
+
24
+ def get_logstore(self):
25
+ """ Get logstore name
26
+
27
+ :return: string, logstore name.
28
+ """
29
+ return self.logstore if self.logstore else ''
30
+
31
+ def set_logstore(self, logstore):
32
+ """ Set logstore name
33
+
34
+ :type logstore: string
35
+ :param logstore: logstore name
36
+ """
37
+ self.logstore = logstore
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ from .logresponse import LogResponse
8
+ from .util import Util
9
+ import json
10
+
11
+
12
+ class ListDeleteLogsTasksResponse(LogResponse):
13
+ """ The response of the ListDeleteLogsTasks API from log.
14
+
15
+ :type resp: dict
16
+ :param resp: ListDeleteLogsTasksResponse HTTP response body
17
+
18
+ :type header: dict
19
+ :param header: ListDeleteLogsTasksResponse HTTP response header
20
+ """
21
+
22
+ def __init__(self, resp, header):
23
+ LogResponse.__init__(self, header, resp)
24
+ self.count = resp.get('count', 0)
25
+ self.total = resp.get('total', 0)
26
+ self.task_list = resp.get('tasks', [])
27
+
28
+
29
+ def is_completed(self):
30
+ """ Check if the request is completed
31
+
32
+ :return: bool, true if this request is completed
33
+ """
34
+ # 根据实际数据,当所有任务都完成时(进度为100%)表示完成
35
+ if not self.task_list:
36
+ return False
37
+ return all(task.get('progress', 0) == 100 for task in self.task_list)
38
+
39
+ def get_task_list(self):
40
+ return self.task_list
41
+
42
+ def get_count(self):
43
+ return self.count
44
+
45
+ def get_total(self):
46
+ return self.total
47
+
48
+ def log_print(self):
49
+ print('ListDeleteLogsTasksResponse:')
50
+ print('headers:', self.get_all_headers())
51
+ print('count:', self.count)
52
+ print('total:', self.total)
53
+ print('task_list:', self.task_list)
@@ -25,7 +25,10 @@ from .getlogsrequest import *
25
25
  from .cursor_response import GetCursorResponse
26
26
  from .cursor_time_response import GetCursorTimeResponse
27
27
  from .gethistogramsresponse import GetHistogramsResponse
28
+ from .deletelogssresponse import DeleteLogsResponse
28
29
  from .getlogsresponse import GetLogsResponse
30
+ from .getdeletelogsstatusresponse import GetDeleteLogsStatusResponse
31
+ from .listdeletelogsstasksresponse import ListDeleteLogsTasksResponse
29
32
  from .getcontextlogsresponse import GetContextLogsResponse
30
33
  from .index_config_response import *
31
34
  from .ingestion_response import *
@@ -554,6 +557,79 @@ class LogClient(object):
554
557
  (resp, header) = self._send("GET", project, None, resource, params, headers)
555
558
  return GetHistogramsResponse(resp, header)
556
559
 
560
+ def delete_logs(self, request):
561
+ """ delete logs of requested query from log service.
562
+ Unsuccessful operation will cause an LogException.
563
+
564
+ :type request: DeleteLogsRequest
565
+ :param request: the DeleteLogsRequest request parameters class.
566
+
567
+ :return: DeleteLogsResponse
568
+
569
+ :raise: LogException
570
+ """
571
+ headers = {}
572
+ params = {}
573
+ if request.get_topic() is not None:
574
+ params['topic'] = request.get_topic()
575
+ if request.get_from() is not None:
576
+ params['from'] = request.get_from()
577
+ if request.get_to() is not None:
578
+ params['to'] = request.get_to()
579
+ if request.get_query() is not None:
580
+ params['query'] = request.get_query()
581
+
582
+ params['accurate'] = True
583
+ params['type'] = 'logs'
584
+ logstore = request.get_logstore()
585
+ project = request.get_project()
586
+ resource = "/logstores/" + logstore + "/deletelogtasks"
587
+ body_str = six.b(json.dumps(params))
588
+ headers["x-log-bodyrawsize"] = str(len(body_str))
589
+ (resp, header) = self._send("POST", project, body_str, resource, None, headers)
590
+ return DeleteLogsResponse(resp, header)
591
+
592
+ def get_delete_logs_status(self, request):
593
+ """ Get get_delete_logs_status of requested logstore from log service.
594
+ Unsuccessful operation will cause an LogException.
595
+
596
+ :type request: GetDeleteLogsStatusRequest
597
+ :param request: the GetDeleteLogsStatusRequest request parameters class.
598
+
599
+ :return: GetDeleteLogsStatusResponse
600
+
601
+ :raise: LogException
602
+ """
603
+ headers = {}
604
+ params = {}
605
+ params['taskId'] = request.get_taskid()
606
+ params['type'] = 'deletelogtasks'
607
+ logstore = request.get_logstore()
608
+ project = request.get_project()
609
+ resource = "/logstores/" + logstore + "/deletelogtasks/" + request.get_taskid()
610
+ (resp, header) = self._send("GET", project, None, resource, params, headers)
611
+ return GetDeleteLogsStatusResponse(resp, header)
612
+
613
+ def list_delete_logs_tasks(self, request):
614
+ """ List delete logs tasks of requested logstore from log service.
615
+ Unsuccessful operation will cause an LogException.
616
+
617
+ :type request: ListDeleteLogsTasksRequest
618
+ :param request: the ListDeleteLogsTasks request parameters class.
619
+
620
+ :return: ListDeleteLogsTasksResponse
621
+
622
+ :raise: LogException
623
+ """
624
+ headers = {}
625
+ params = {}
626
+ params['type'] = 'deletelogtasks'
627
+ logstore = request.get_logstore()
628
+ project = request.get_project()
629
+ resource = "/logstores/" + logstore + "/deletelogtasks"
630
+ (resp, header) = self._send("GET", project, None, resource, params, headers)
631
+ return ListDeleteLogsTasksResponse(resp, header)
632
+
557
633
  def get_log(self, project, logstore, from_time, to_time, topic=None,
558
634
  query=None, reverse=False, offset=0, size=100, power_sql=False, scan=False, forward=True, accurate_query=True, from_time_nano_part=0, to_time_nano_part=0):
559
635
  """ Get logs from log service.
@@ -1099,7 +1175,7 @@ class LogClient(object):
1099
1175
  """
1100
1176
  return self.get_cursor(project_name, logstore_name, shard_id, "end")
1101
1177
 
1102
- def pull_logs(self, project_name, logstore_name, shard_id, cursor, count=None, end_cursor=None, compress=None, query=None, accept_compress_type=None):
1178
+ def pull_logs(self, project_name, logstore_name, shard_id, cursor, count=None, end_cursor=None, compress=None, query=None, accept_compress_type=None, processor=None):
1103
1179
  """ batch pull log data from log service
1104
1180
  Unsuccessful operation will cause an LogException.
1105
1181
 
@@ -1125,12 +1201,15 @@ class LogClient(object):
1125
1201
  :param compress: if use zip compress for transfer data, default is True
1126
1202
 
1127
1203
  :type query: string
1128
- :param query: the SPL query, such as *| where a = 'xxx'
1204
+ :param query: the SPL query, such as *| where a = 'xxx', use processor instead
1129
1205
 
1130
1206
  :type accept_compress_type: string
1131
1207
  :param accept_compress_type: The compression type used for logs retrieved from sls.
1132
1208
  Supported types include 'lz4' and 'zstd'. If you choose 'zstd', ensure the `zstd` library is installed via pip. The default value is 'lz4'.
1133
1209
 
1210
+ :type processor: string
1211
+ :param processor: the consume processor which contains SPL, such as consume-processor-1, prefer to use the processor instead of query
1212
+
1134
1213
  :return: PullLogResponse
1135
1214
 
1136
1215
  :raise: LogException
@@ -1162,6 +1241,8 @@ class LogClient(object):
1162
1241
  params['query'] = query
1163
1242
  if end_cursor:
1164
1243
  params['end_cursor'] = end_cursor
1244
+ if processor:
1245
+ params['processor'] = processor
1165
1246
  (resp, header) = self._send("GET", project_name, None, resource, params, headers, "binary")
1166
1247
  raw_size = int(Util.h_v_t(header, 'x-log-bodyrawsize'))
1167
1248
  if raw_size <= 0:
@@ -1170,7 +1251,7 @@ class LogClient(object):
1170
1251
  raw_data = Compressor.decompress_response(header, resp)
1171
1252
  return PullLogResponse(raw_data, header)
1172
1253
 
1173
- def pull_log(self, project_name, logstore_name, shard_id, from_time, to_time, batch_size=None, compress=None, query=None, accept_compress_type=None):
1254
+ def pull_log(self, project_name, logstore_name, shard_id, from_time, to_time, batch_size=None, compress=None, query=None, accept_compress_type=None, processor=None):
1174
1255
  """ batch pull log data from log service using time-range
1175
1256
  Unsuccessful operation will cause an LogException. the time parameter means the time when server receives the logs
1176
1257
 
@@ -1197,6 +1278,9 @@ class LogClient(object):
1197
1278
 
1198
1279
  :type query: string
1199
1280
  :param query: the SPL query, such as *| where a = 'xxx'
1281
+
1282
+ :type processor: string
1283
+ :param processor: the consume processor which contains SPL, such as consume-processor-1, prefer to use the processor instead of query
1200
1284
 
1201
1285
  :type accept_compress_type: string
1202
1286
  :param accept_compress_type: The compression type used for logs retrieved from sls.
@@ -1212,7 +1296,7 @@ class LogClient(object):
1212
1296
  while True:
1213
1297
  res = self.pull_logs(project_name, logstore_name, shard_id, begin_cursor,
1214
1298
  count=batch_size, end_cursor=end_cursor, compress=compress, query=query,
1215
- accept_compress_type=accept_compress_type)
1299
+ accept_compress_type=accept_compress_type, processor=processor)
1216
1300
 
1217
1301
  yield res
1218
1302
  next_cursor = res.get_next_cursor()
@@ -1222,7 +1306,7 @@ class LogClient(object):
1222
1306
  begin_cursor = next_cursor
1223
1307
 
1224
1308
  def pull_log_dump(self, project_name, logstore_name, from_time, to_time, file_path, batch_size=None,
1225
- compress=None, encodings=None, shard_list=None, no_escape=None, query=None):
1309
+ compress=None, encodings=None, shard_list=None, no_escape=None, query=None, processor=None):
1226
1310
  """ dump all logs seperatedly line into file_path, file_path, the time parameters are log received time on server side.
1227
1311
 
1228
1312
  :type project_name: string
@@ -1257,11 +1341,14 @@ class LogClient(object):
1257
1341
 
1258
1342
  :type query: string
1259
1343
  :param query: the SPL query, such as *| where a = 'xxx'
1260
-
1344
+
1261
1345
  :type accept_compress_type: str
1262
1346
  :param accept_compress_type: The compression type used for logs retrieved from sls.
1263
1347
  Supported types include 'lz4' and 'zstd'. If you choose 'zstd', ensure the `zstd` library is installed via pip. The default value is 'lz4'.
1264
1348
 
1349
+ :type processor: string
1350
+ :param processor: the consume processor which contains SPL, such as consume-processor-1, prefer to use the processor instead of query
1351
+
1265
1352
  :return: LogResponse {"total_count": 30, "files": {'file_path_1': 10, "file_path_2": 20} })
1266
1353
 
1267
1354
  :raise: LogException
@@ -1272,7 +1359,7 @@ class LogClient(object):
1272
1359
 
1273
1360
  return pull_log_dump(self, project_name, logstore_name, from_time, to_time, file_path,
1274
1361
  batch_size=batch_size, compress=compress, encodings=encodings,
1275
- shard_list=shard_list, no_escape=no_escape, query=query)
1362
+ shard_list=shard_list, no_escape=no_escape, query=query, processor=processor)
1276
1363
 
1277
1364
  def create_logstore(self, project_name, logstore_name,
1278
1365
  ttl=30,
@@ -429,9 +429,9 @@ def get_encoder_cls(encodings):
429
429
 
430
430
  def dump_worker(client, project_name, logstore_name, from_time, to_time,
431
431
  shard_id, file_path,
432
- batch_size=None, compress=None, encodings=None, no_escape=None, query=None):
432
+ batch_size=None, compress=None, encodings=None, no_escape=None, query=None, processor=None):
433
433
  res = client.pull_log(project_name, logstore_name, shard_id, from_time, to_time, batch_size=batch_size,
434
- compress=compress, query=query)
434
+ compress=compress, query=query, processor=processor)
435
435
  encodings = encodings or ('utf8', 'latin1', 'gbk')
436
436
  ensure_ansi = not no_escape
437
437
 
@@ -475,7 +475,7 @@ def dump_worker(client, project_name, logstore_name, from_time, to_time,
475
475
 
476
476
 
477
477
  def pull_log_dump(client, project_name, logstore_name, from_time, to_time, file_path, batch_size=None, compress=None,
478
- encodings=None, shard_list=None, no_escape=None, query=None):
478
+ encodings=None, shard_list=None, no_escape=None, query=None, processor=None):
479
479
  cpu_count = multiprocessing.cpu_count() * 2
480
480
 
481
481
  shards = client.list_shards(project_name, logstore_name).get_shards_info()
@@ -488,7 +488,7 @@ def pull_log_dump(client, project_name, logstore_name, from_time, to_time, file_
488
488
  with ProcessPoolExecutor(max_workers=worker_size) as pool:
489
489
  futures = [pool.submit(dump_worker, client, project_name, logstore_name, from_time, to_time,
490
490
  shard_id=shard, file_path=file_path.format(shard),
491
- batch_size=batch_size, compress=compress, encodings=encodings, no_escape=no_escape, query=query)
491
+ batch_size=batch_size, compress=compress, encodings=encodings, no_escape=no_escape, query=query, processor=processor)
492
492
  for shard in target_shards]
493
493
 
494
494
  for future in as_completed(futures):
@@ -1,4 +1,4 @@
1
- __version__ = '0.9.27'
1
+ __version__ = '0.9.28'
2
2
 
3
3
  import sys
4
4
  OS_VERSION = str(sys.platform)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aliyun-log-python-sdk
3
- Version: 0.9.27
3
+ Version: 0.9.28
4
4
  Summary: Aliyun log service Python client SDK
5
5
  Home-page: https://github.com/aliyun/aliyun-log-python-sdk
6
6
  Author: Aliyun
@@ -13,11 +13,15 @@ aliyun/log/consumer_group_response.py
13
13
  aliyun/log/credentials.py
14
14
  aliyun/log/cursor_response.py
15
15
  aliyun/log/cursor_time_response.py
16
+ aliyun/log/deletelogsrequest.py
17
+ aliyun/log/deletelogssresponse.py
16
18
  aliyun/log/etl_config_response.py
17
19
  aliyun/log/export_response.py
18
20
  aliyun/log/external_store_config.py
19
21
  aliyun/log/external_store_config_response.py
20
22
  aliyun/log/getcontextlogsresponse.py
23
+ aliyun/log/getdeletelogsstatusrequest.py
24
+ aliyun/log/getdeletelogsstatusresponse.py
21
25
  aliyun/log/gethistogramsrequest.py
22
26
  aliyun/log/gethistogramsresponse.py
23
27
  aliyun/log/getlogsrequest.py
@@ -27,6 +31,8 @@ aliyun/log/index_config.py
27
31
  aliyun/log/index_config_response.py
28
32
  aliyun/log/ingestion_response.py
29
33
  aliyun/log/job.py
34
+ aliyun/log/listdeletelogsstasksrequest.py
35
+ aliyun/log/listdeletelogsstasksresponse.py
30
36
  aliyun/log/listlogstoresrequest.py
31
37
  aliyun/log/listlogstoresresponse.py
32
38
  aliyun/log/listtopicsrequest.py