-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Eventhubs preview4 merge to master #7605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
634f495
[EventHubs] Eventhubs runtime metric (#7431)
yunhaoling 2ea6424
Eventhubs remove iot and linkredirect (#7450)
YijunXieMS f26de12
[EventHubs] Performance improvement (#7533)
yunhaoling 5e69da5
Small fix for missing annotation initialization (#7575)
yunhaoling e1b819f
Python EventHubs test code revamp (#7594)
YijunXieMS 12318d9
fix pylint error
d474be8
fix mypy error
7bed3fd
fix for 2.7
155d671
fix for 2.7
ecc950b
Sleep 300 seconds to test reconnect
3103954
Remove Pypy from eventhub live test
842b36f
Remove Pypy from eventhub live test
f5c6f9d
Add "Matrix:"
665ecdd
Fix bug passing timeout in seconds to uamqp
4bd1f6d
update checkpointstore HISTORY
c66ae08
[EventHubs] Update documentations (#7603)
yunhaoling File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix pylint error
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,12 +8,11 @@ | |
| import logging | ||
| import time | ||
| from typing import List | ||
| from distutils.version import StrictVersion | ||
|
|
||
| import uamqp # type: ignore | ||
| import uamqp | ||
| from uamqp import types, errors, utils # type: ignore | ||
| from uamqp import ReceiveClient, Source # type: ignore | ||
| import uamqp | ||
| from distutils.version import StrictVersion | ||
|
|
||
| from azure.eventhub.common import EventData, EventPosition | ||
| from azure.eventhub.error import _error_handler | ||
|
|
@@ -130,11 +129,11 @@ def _create_handler(self): | |
| if self._offset is not None: | ||
| source.set_filter(self._offset._selector()) # pylint:disable=protected-access | ||
|
|
||
| if StrictVersion(uamqp.__version__) < StrictVersion("1.2.3"): # backward compatible until uamqp 1.2.3 is released | ||
| if StrictVersion(uamqp.__version__) < StrictVersion("1.2.3"): # backward compatible until uamqp 1.2.3 released | ||
| desired_capabilities = {} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same to suggestion of logging a warning above |
||
| elif self._track_last_enqueued_event_properties: | ||
| symbol_array = [types.AMQPSymbol(self._receiver_runtime_metric_symbol)] | ||
| desired_capabilities = {"desired_capabilities": utils.data_factory(types.AMQPArray(symbol_array))} | ||
| symbol_array = [types.AMQPSymbol(self._receiver_runtime_metric_symbol)] | ||
| desired_capabilities = {"desired_capabilities": utils.data_factory(types.AMQPArray(symbol_array))} | ||
| else: | ||
| desired_capabilities = {"desired_capabilities": None} | ||
|
|
||
|
|
@@ -181,7 +180,7 @@ def _receive(self, timeout_time=None, max_batch_size=None, **kwargs): | |
| if data_batch: | ||
| self._offset = EventPosition(data_batch[-1].offset) | ||
|
|
||
| if self._track_last_enqueued_event_properties and len(data_batch): | ||
| if self._track_last_enqueued_event_properties and data_batch: | ||
| self._last_enqueued_event_properties = data_batch[-1]._get_last_enqueued_event_properties() # pylint:disable=protected-access | ||
|
|
||
| return data_batch | ||
|
|
@@ -253,7 +252,7 @@ def receive(self, max_batch_size=None, timeout=None): | |
|
|
||
| return self._receive_with_retry(timeout=timeout, max_batch_size=max_batch_size) | ||
|
|
||
| def close(self): | ||
| def close(self): # pylint:disable=useless-super-delegation | ||
| # type:() -> None | ||
| """ | ||
| Close down the handler. If the handler has already closed, | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.