简体   繁体   English

为什么azure数据工厂中的自定义.net活动永远不会完成

[英]Why custom .net activity in azure data factory never finishes

I have followed several tutorials, and actually had other activities running in azure data factory. 我已经学过几个教程,实际上还有其他活动在azure数据工厂中运行。 Now, this one in particular doesn't perform any action and yet it never finishes processing. 现在,这个特别是不执行任何操作,但它永远不会完成处理。 In the activity window, attempts, it shows the status: Running (0% complete) . 在活动窗口中,尝试,它显示状态:正在运行(0%完成)

I am looking at a reason and also, at understanding how does one know what is going on at this stage for the activity. 我正在寻找一个理由,并且在理解如何知道现阶段活动的进展情况。 Is there a way to debug this things? 有没有办法调试这个东西? I will include the source code, i'm sure is possible I am missing something: 我将包含源代码,我确信有可能我遗漏了一些东西:

   public class MoveBlobsToSQLActivity : IDotNetActivity
{
    public IDictionary<string, string> Execute(
               IEnumerable<LinkedService> linkedServices, IEnumerable<Dataset> datasets, Activity activity, IActivityLogger logger)
    {
        logger.Write("Start");

        //Get extended properties
        DotNetActivity dotNetActivityPipeline = (DotNetActivity)activity.TypeProperties;

        string sliceStartString = dotNetActivityPipeline.ExtendedProperties["SliceStart"];

        //Get linked service details
        Dataset inputDataset = datasets.Single(dataset => dataset.Name == activity.Inputs.Single().Name);
        Dataset outputDataset = datasets.Single(dataset => dataset.Name == activity.Outputs.Single().Name);

        /*
            DO STUFF
        */

        logger.Write("End");

        return new Dictionary<string, string>();
    }
}

Update 1: 更新1:

After finding this post and following the instructions on the github repo I was able to debug my activity. 在找到这篇文章并按照github repo上的说明 ,我能够调试我的活动。

It was erroring out here Dataset inputDataset = datasets.Single(dataset => dataset.Name == activity.Inputs.Single().Name); 这是错误的Dataset inputDataset = datasets.Single(dataset => dataset.Name == activity.Inputs.Single().Name); and I would have expected it to finish execution with an error, but in the debugger, it kept going and going to the same result until the pipeline timed out. 我本来希望它能完成一个错误的执行,但是在调试器中,它会继续运行,直到管道超时为止。 Weird. 奇怪的。 Removed the error but still the pipeline never finishes although the debugger does now :(. 删除了错误但仍然管道永远不会完成,虽然调试器现在做:(。

Update 2: 更新2:

Not sure that the data factory is using in any way my code from the custom activity. 不确定数据工厂是否以任何方式使用自定义活动中的代码。 I made changes: nothing, I deleted the zip file with the code: nothing, just says the activity is running. 我做了更改:没有,我用代码删除了zip文件:没有,只是说活动正在运行。 Nothing seems to change even if the supposed code is no longer there. 即使所谓的代码不再存在,似乎没有任何改变。 I am assuming it is cached somewhere. 我假设它被缓存在某个地方。

Could you share me the ADF runId, we can take a look what happen there. 你能和我分享一下ADF runId,我们可以看看那里发生了什么。 For your local test (#1), it is also strange for me. 对于你的本地测试(#1),对我来说也很奇怪。 It should not hang there. 它不应该挂在那里。 Btw, I think re-deploy pipeline will cancel the run and start new run with new properties. 顺便说一句,我认为重新部署管道将取消运行并使用新属性启动新运行。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM