Skip to content

Commit

Permalink
Align eventhub package folder names with package name (Azure#8813)
Browse files Browse the repository at this point in the history
  • Loading branch information
weshaggard authored Dec 3, 2019
1 parent abc5dfd commit 2b8a6ed
Show file tree
Hide file tree
Showing 121 changed files with 74 additions and 85 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
displayName: 'Install All Packages'
inputs:
scriptPath: 'scripts/dev_setup.py'
arguments: '--exceptionlist=azure-eventhubs,azure-eventhubs-checkpointstoreblob-aio'
arguments: '--exceptionlist=azure-eventhub,azure-eventhub-checkpointstoreblob-aio'

- pwsh: |
cd $(Build.SourcesDirectory)/doc/sphinx
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ The libraries released in the November 2019 GA release:

The libraries released in the November 2019 preview:
- [azure-cosmos](./sdk/cosmos/azure-cosmos)
- [azure-eventhubs](./sdk/eventhub/azure-eventhubs)
- [azure-eventhub](./sdk/eventhub/azure-eventhub)
- [azure-storage-file-share](./sdk/storage/azure-storage-file-share)

> NOTE: If you need to ensure your code is ready for production use one of the stable, non-preview libraries.
### Client: Previous Versions
Last stable versions of packages that have been provided for usage with Azure and are production-ready. These libraries provide you with similar functionalities to the Preview ones as they allow you to use and consume existing resources and interact with them, for example: upload a blob. They might not implement the [guidelines](https://azure.github.io/azure-sdk/python_introduction.html) or have the same feature set as the Novemeber releases. They do however offer wider coverage of services.
Last stable versions of packages that have been provided for usage with Azure and are production-ready. These libraries provide you with similar functionalities to the Preview ones as they allow you to use and consume existing resources and interact with them, for example: upload a blob. They might not implement the [guidelines](https://azure.github.io/azure-sdk/python_introduction.html) or have the same feature set as the Novemeber releases. They do however offer wider coverage of services.

### Management
Libraries which enable you to provision specific resources. They are responsible for directly mirroring and consuming Azure service's REST endpoints. The management libraries use the `azure-mgmt-<service name>` convention for their package names.
Expand Down
19 changes: 4 additions & 15 deletions doc/sphinx/generate_versioned_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@

LANDING_PAGE_LOCATION = "ref/{}.rst"

PACKAGE_REDIRECTIONS = {
"azure-eventhubs": "azure-eventhub",
"azure-eventhubs-checkpointstoreblob-aio": "azure-eventhub-checkpointstoreblob-aio",
"azure-eventhubs-checkpointstoreblob": "azure-eventhub-checkpointstoreblob"
}

def read_config_file(config_path=CONFIG_FILE):
with open(CONFIG_FILE, "r") as f:
return json.load(f)
Expand All @@ -116,11 +110,6 @@ def get_repo_packages(base_dir):

packages = [p for p in packages if check_package_against_omission(p)]

for redirection in PACKAGE_REDIRECTIONS:
if redirection in packages:
packages.remove(redirection)
packages.append(PACKAGE_REDIRECTIONS[redirection])

return sorted(packages)

def write_landing_pages(categorized_menu_items):
Expand Down Expand Up @@ -182,18 +171,18 @@ def get_categorized_menu_items(package_names):
print(pkg_meta["category"])
print(pkg_meta["service_name"])
print(categorized_menu_items[pkg_meta["service_name"]])

exit(1)

else:
categorized_menu_items["Other"]["Other"].append(pkg)

return categorized_menu_items

def create_docs_folder():
# delete existing
shutil.rmtree(docs_folder, ignore_errors=True)

# recreate
os.mkdir(docs_folder)
os.mkdir(os.path.join(docs_folder, 'ref'))
Expand Down Expand Up @@ -231,7 +220,7 @@ def create_docs_folder():

# write all the landing pages that will reach out to the appropriate location
write_landing_pages(categorized_menu_items)

# write the ToC
write_toc_tree(categorized_menu_items)

Expand Down
2 changes: 1 addition & 1 deletion packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
| [`azure-cosmos`]( sdk/cosmos/azure-cosmos/setup.py )| [Readme](sdk/cosmos/azure-cosmos/README.md) | [Changelog](sdk/cosmos/azure-cosmos/changelog.md) | [PyPI]( https://pypi.org/project/azure-cosmos ) |
| [`azure-devtools`]( tools/azure-devtools/setup.py )| [Readme](tools/azure-devtools/README.rst) | N/A | [PyPI]( https://pypi.org/project/azure-devtools ) |
| [`azure-eventgrid`]( sdk/eventgrid/azure-eventgrid/setup.py )| [Readme](sdk/eventgrid/azure-eventgrid/README.rst) | [Changelog](sdk/eventgrid/azure-eventgrid/HISTORY.rst) | [PyPI]( https://pypi.org/project/azure-eventgrid ) |
| [`azure-eventhub`]( sdk/eventhub/azure-eventhubs/setup.py )| [Readme](sdk/eventhub/azure-eventhubs/README.md) | N/A | [PyPI]( https://pypi.org/project/azure-eventhub ) |
| [`azure-eventhub`]( sdk/eventhub/azure-eventhub/setup.py )| [Readme](sdk/eventhub/azure-eventhub/README.md) | N/A | [PyPI]( https://pypi.org/project/azure-eventhub ) |
| [`azure-graphrbac`]( sdk/graphrbac/azure-graphrbac/setup.py )| [Readme](sdk/graphrbac/azure-graphrbac/README.rst) | [Changelog](sdk/graphrbac/azure-graphrbac/HISTORY.rst) | [PyPI]( https://pypi.org/project/azure-graphrbac ) |
| [`azure-identity`]( sdk/identity/azure-identity/setup.py )| [Readme](sdk/identity/azure-identity/README.md) | N/A | [PyPI]( https://pypi.org/project/azure-identity ) |
| [`azure-keyvault`]( sdk/keyvault/azure-keyvault/setup.py )| [Readme](sdk/keyvault/azure-keyvault/README.md) | N/A | [PyPI]( https://pypi.org/project/azure-keyvault ) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ This release has trivial internal changes only. No feature changes.

- `BlobPartitionManager` that uses Azure Blob Storage Block Blob to store EventProcessor checkpoint data

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhubs-checkpointstoreblob-aio/HISTORY.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/HISTORY.png)
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Azure EventHubs Checkpoint Store is used for storing checkpoints while processing events from Azure Event Hubs.
This Checkpoint Store package works as a plug-in package to `EventHubConsumerClient`. It uses Azure Storage Blob as the persistent store for maintaining checkpoints and partition ownership information.

Please note that this is an async library, for sync version of the Azure EventHubs Checkpoint Store client library, please refer to [azure-eventhubs-checkpointstoreblob](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhubs-checkpointstoreblob).
Please note that this is an async library, for sync version of the Azure EventHubs Checkpoint Store client library, please refer to [azure-eventhub-checkpointstoreblob](./).

[Source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhubs-checkpointstoreblob-aio) | [Package (PyPi)](https://pypi.org/project/azure-eventhub-checkpointstoreblob-aio/) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/5.0.0b6/azure.eventhub.aio.html#azure.eventhub.aio.CheckpointStore) | [Azure Eventhubs documentation](https://docs.microsoft.com/en-us/azure/event-hubs/) | [Azure Storage documentation](https://docs.microsoft.com/en-us/azure/storage/)
[Source code](./) | [Package (PyPi)](https://pypi.org/project/azure-eventhub-checkpointstoreblob-aio/) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/5.0.0b6/azure.eventhub.aio.html#azure.eventhub.aio.CheckpointStore) | [Azure Eventhubs documentation](https://docs.microsoft.com/en-us/azure/event-hubs/) | [Azure Storage documentation](https://docs.microsoft.com/en-us/azure/storage/)

## Getting started

Expand All @@ -29,23 +29,23 @@ $ pip install --pre azure-eventhub-checkpointstoreblob-aio

### Checkpointing

Checkpointing is a process by which readers mark or commit their position within a partition event sequence.
Checkpointing is the responsibility of the consumer and occurs on a per-partition basis within a consumer group.
This responsibility means that for each consumer group, each partition reader must keep track of its current position
Checkpointing is a process by which readers mark or commit their position within a partition event sequence.
Checkpointing is the responsibility of the consumer and occurs on a per-partition basis within a consumer group.
This responsibility means that for each consumer group, each partition reader must keep track of its current position
in the event stream, and can inform the service when it considers the data stream complete. If a reader disconnects from
a partition, when it reconnects it begins reading at the checkpoint that was previously submitted by the last reader of
that partition in that consumer group. When the reader connects, it passes the offset to the event hub to specify the
location at which to start reading. In this way, you can use checkpointing to both mark events as "complete" by
downstream applications, and to provide resiliency if a failover between readers running on different machines occurs.
It is possible to return to older data by specifying a lower offset from this checkpointing process. Through this
that partition in that consumer group. When the reader connects, it passes the offset to the event hub to specify the
location at which to start reading. In this way, you can use checkpointing to both mark events as "complete" by
downstream applications, and to provide resiliency if a failover between readers running on different machines occurs.
It is possible to return to older data by specifying a lower offset from this checkpointing process. Through this
mechanism, checkpointing enables both failover resiliency and event stream replay.

### Offsets & sequence numbers
Both offset & sequence number refer to the position of an event within a partition. You can think of them as a
client-side cursor. The offset is a byte numbering of the event. The offset/sequence number enables an event consumer
(reader) to specify a point in the event stream from which they want to begin reading events. You can specify a
timestamp such that you receive events enqueued only after the given timestamp. Consumers are responsible for
storing their own offset values outside of the Event Hubs service. Within a partition, each event includes an offset,
Both offset & sequence number refer to the position of an event within a partition. You can think of them as a
client-side cursor. The offset is a byte numbering of the event. The offset/sequence number enables an event consumer
(reader) to specify a point in the event stream from which they want to begin reading events. You can specify a
timestamp such that you receive events enqueued only after the given timestamp. Consumers are responsible for
storing their own offset values outside of the Event Hubs service. Within a partition, each event includes an offset,
sequence number and the timestamp of when it was enqueued.

## Examples
Expand All @@ -58,7 +58,7 @@ The easiest way to create a `EventHubConsumerClient` is to use a connection stri
from azure.eventhub.aio import EventHubConsumerClient
eventhub_client = EventHubConsumerClient.from_connection_string("my_eventhub_namespace_connection_string", "my_consumer_group", eventhub_name="my_eventhub")
```
For other ways of creating a `EventHubConsumerClient`, refer to [EventHubs library](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhubs) for more details.
For other ways of creating a `EventHubConsumerClient`, refer to [EventHubs library](../azure-eventhub) for more details.

### Consume events using a `BlobCheckpointStore` to do checkpoint
```python
Expand Down Expand Up @@ -108,7 +108,7 @@ Refer to [Logging](#logging) to enable loggers for related libraries.
## Next steps

### Examples
- [./samples/event_processor_blob_storage_example.py](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhubs-checkpointstoreblob-aio/samples/event_processor_blob_storage_example.py) - EventHubConsumerClient with blob checkpoint store example
- [./samples/event_processor_blob_storage_example.py](./samples/event_processor_blob_storage_example.py) - EventHubConsumerClient with blob checkpoint store example

### Documentation

Expand All @@ -135,4 +135,4 @@ When you submit a pull request, a CLA-bot will automatically determine whether y
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhubs-checkpointstoreblob-aio/README.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/README.png)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-e ../../../tools/azure-sdk-tools
../../core/azure-core
-e ../../storage/azure-storage-blob
../azure-eventhubs
../azure-eventhub
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
license='MIT License',
author='Microsoft Corporation',
author_email='[email protected]',
url='https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhubs-checkpointstoreblob-aio',
url='https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio',
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Language :: Python',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

- `BlobPartitionManager` that uses Azure Blob Storage Block Blob to store EventProcessor checkpoint data

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhubs-checkpointstoreblob/HISTORY.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhub-checkpointstoreblob/HISTORY.png)
Loading

0 comments on commit 2b8a6ed

Please sign in to comment.