启用 Data Lake Gen2 的 Azure 事件中心捕获到存储

Azure Event Hubs Capture to Storage with Data Lake Gen2 enabled

我正在尝试使用事件中心的捕获功能在启用了 Data Lake Storage Gen2 的存储帐户 v2 中进行存储。 在门户中,选择存储帐户后,容器未显示,我无法创建新容器。 在 Azure CLI 中,我 运行 以下命令:

az eventhubs eventhub update -n hubtest --namespace-name #removed# -g #removed# --enable-capture True --capture-interval 300 --capture-size-limit 262144000 --storage-account #removed# --blob-container #removed# --destination-name capturetest

我收到以下错误:

'NoneType' object has no attribute 'enabled'
Traceback (most recent call last):File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 206, in invoke cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in execute raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 386, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 379, in _run_job six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 356, in _run_job result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 171, in __call__ return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 477, in handler instance = custom_function(instance=instance, **custom_func_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/eventhubs/custom.py", line 112, in cli_eheventhub_update instance.capture_description.enabled = enabled
AttributeError: 'NoneType' object has no attribute 'enabled'

我可以重现您的问题,它似乎不支持使用 Data Lake Gen2 启用 Azure Event Hubs Capture,请记住 Data Lake Gen2 处于预览状态。

看到这个link:https://docs.microsoft.com/en-gb/azure/storage/blobs/data-lake-storage-upgrade?toc=%2fazure%2fstorage%2fblobs%2ftoc.json#azure-ecosystem

只要您首先创建您的 Azure 存储帐户 Data Lake Storage Gen2 - 请参阅下面门户中的图像:

[在存储帐户上启用 Data Lake Storage Gen2] https://i.stack.imgur.com/J55kC.png

然后您可以只使用 'Azure Storage' 作为捕获提供程序并继续 select 存储帐户容器 - 请参阅下面门户中的图像: [存储帐户selection] https://i.stack.imgur.com/FhI1x.png

* 如果您还没有配置容器,作为 selection 处理步骤的一部分,系统会要求您进行配置。

我知道这是个老问题,但我今天需要这样做。希望对你有帮助。

参考: https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-capture-enable-through-portal

Event Hub Capture is now supported on Azure Data Lake Storage Gen 2