首页 文章

顶点故障触发快速作业中止 - 数据提取期间抛出异常

提问于
浏览
2

我正在运行数据湖分析工作,在提取期间我收到错误 . 我在我的脚本TEXT提取器和我自己的提取器中使用 . 我尝试从包含两个以空格字符分隔的列的文件中获取数据 . 当我在本地运行我的脚本时,一切正常,但是当我尝试使用我的DLA帐户运行脚本时 . 我只有在尝试从包含数千行(但只有36 MB数据)的文件中获取数据时才遇到问题,对于较小的文件,一切都能正常工作 . 我注意到当顶点的总数大于提取节点的顶点时抛出异常 . 我更好地遇到了这个问题,使用其他“大”文件(.csv,.tsv)和提取器 . 有人能告诉我发生了什么吗?

错误信息:

顶点故障触发了快速作业中止 . 顶点失败:SV1_Extract [0] [0],错误:顶点用户代码错误 . Vertex因失败快速错误而失败

脚本代码:

@result =
EXTRACT s_date string,
        s_time string
FROM @"/Samples/napis.txt"
//USING USQLApplicationTest.ExtractorsFactory.getExtractor();
USING Extractors.Text(delimiter:' ');

OUTPUT @result
TO @"/Out/Napis.log"
USING Outputters.Csv();

代码背后:

[SqlUserDefinedExtractor(AtomicFileProcessing = true)]
public class MyExtractor : IExtractor
{
    public override IEnumerable<IRow> Extract(IUnstructuredReader input, IUpdatableRow output)
    {
        using (StreamReader sr = new StreamReader(input.BaseStream))
        {
            string line;
            // Read and display lines from the file until the end of 
            // the file is reached.
            while ((line = sr.ReadLine()) != null)
            {
                string[] words = line.Split(' ');
                int i = 0;
                foreach (var c in output.Schema)
                {
                    output.Set<object>(c.Name, words[i]);
                    i++;
                }

                yield return output.AsReadOnly();
            }
        }
    }
}

public static class ExtractorsFactory
{
    public static IExtractor getExtractor()
    {
        return new MyExtractor();
    }
}

部分示例文件:

...
str1 str2
str1 str2
str1 str2
str1 str2
str1 str2
...

在作业资源中,我发现jobError消息:

“输入流中意外的列数 . ” - “description”:“第1行输入记录中的意外列数 . \ n预期2列 - 处理1列中的1列 . ” - “分辨率”:“检查输入错误或使用\“silent \”切换忽略输入中的over(under)-sized行 . \ n忽略“无效”行可能会影响作业结果 .

但我再次检查了文件,我没有看到错误的列数 . 是否可能由错误的文件拆分和分发引起错误?我读到大文件可以并行提取 . 抱歉我的英语不好 .

1 回答

  • 0

    这里回答了同样的问题:https://social.msdn.microsoft.com/Forums/en-US/822af591-f098-4592-b903-d0dbf7aafb2d/vertex-failure-triggered-quick-job-abort-exception-thrown-during-data-extraction?forum=AzureDataLake .

    摘要:

    我们目前遇到大文件的问题,如果使用“错误”工具上传文件,则行与文件范围边界不对齐 . 如果您通过Visual Studio或Powershell命令将其作为面向行的文件上载,则应将其对齐(如果行分隔符为CR或LF) . 如果您没有使用“正确”上传工具,则内置提取器将显示您报告的行为,因为它当前假定记录边界与我们将文件拆分为并行处理的范围对齐 . 我们正在努力进行一般修复 .

    如果您在使用AtomicFileProcessing = true的自定义提取器中看到类似的错误消息并且应该对分割不敏感,请将您的工作链接发送给我,以便我可以提交事件并让工程团队审核您的案例 .

相关问题