Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure functions Azure blob触发器动态路径不工作_Azure Functions_Azure Blob Trigger - Fatal编程技术网

Azure functions Azure blob触发器动态路径不工作

Azure functions Azure blob触发器动态路径不工作,azure-functions,azure-blob-trigger,Azure Functions,Azure Blob Trigger,我使用捕获事件从Eventhub检索事件到存储容器。但在捕获事件中,我选择blob文件路径格式作为 {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second} 现在如何在blog触发器中给出动态blob路径 我写的如下 @FunctionName("AzureBlogTriggerFn5") public void blobHandler( @BlobTri

我使用捕获事件从Eventhub检索事件到存储容器。但在捕获事件中,我选择blob文件路径格式作为

{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}
现在如何在blog触发器中给出动态blob路径

我写的如下

@FunctionName("AzureBlogTriggerFn5")
    public void blobHandler(
            @BlobTrigger(name = "content", path = "uts-blobcontainer-nb-dev/uts-eventhubns/uts-nb-eventhub/{partition}/{yyyy}/{MM}/{dd}/{HH}/{mm}/{ss}/{fileName}", dataType = "binary", connection = "AzureWebJobsStorage") byte[] content,
            @BindingName("fileName") String fileName,
            final ExecutionContext context
    ) throws StorageException, IOException, URISyntaxException, InvalidKeyException, InterruptedException {
        context.getLogger().info("Java Blob trigger function processed a blob. Name: " + fileName + "\n  Size: " + content.length + " Bytes");
我有以下错误

**2019-12-19T15:05:52.576 [Error] Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.DecompressServiceFunctionNB'. System.Private.CoreLib: An item with the same key has already been added. Key: mm.**

请建议我,如何在Azure中的blogtrigger中为分区ID、年、月、日、时、分、秒提供动态路径?我相信错误是因为同时具有“MM”和“MM”

使用时,键可以是任何字符串。在你的情况下,像这样的东西应该起作用

path = "uts-blobcontainer-nb-dev/uts-eventhubns/uts-nb-eventhub/{partitionId}/{year}/{month}/{day}/{hour}/{minute}/{second}/{fileName}"
And bind the ones you require in your function.