首页 \ 问答 \ 当将一个巨大的文件加载到hadoop集群时,如果客户端在将数据传输到datanode时失败了会发生什么?(when loading a huge file into hadoop cluster , what happends if the client failed while transfering data to datanodes?)

当将一个巨大的文件加载到hadoop集群时,如果客户端在将数据传输到datanode时失败了会发生什么?(when loading a huge file into hadoop cluster , what happends if the client failed while transfering data to datanodes?)

例如,文件是1280MB,hdfs块是128MB,当发生时会发生什么
客户端只转移了3个区块然后失败了? NameNode获取3个块的文件或删除3个块吗?


for example,the file is 1280MB and the hdfs block is 128MB,what happends when the
client only transfered 3 blocks and then failed? does the NameNode obtain a file of 3 blocks or delete the 3 blocks ?


原文:https://stackoverflow.com/questions/32689281
更新时间:2022-11-27 20:11

最满意答案

你究竟想在这里完成什么? 这听起来像是在存储过程中构建一个XML字段,并且它与DataTable完全一样,只需要一个XML字段。 这是预期的行为。 所以我想上面评论中提到的最大的问题是,如果你想让数据成为代码中的表,为什么数据首先形成为XML?

您可以做的一件事是使用LINQ to XML (或一些类似的XML DOM解析方法)来查询返回的结果,以便从返回的字段中获取所需的数据。 它应该感觉相当简单,因为你期望使用表数据,而LINQ对它有“SQL感觉”。

但是,在这个问题中你可能忽略的一个重点是表和XML之间的结构差异。 表是关系型的,XML是分层的。 它们旨在以完全不同的方式表示数据。 话虽这么说,返回的XML完全有可能无法直接转换为单个DataTable对象。 它可能不代表数据表。


What exactly are you trying to accomplish here? It sounds like you're building an XML field in the stored procedure and it's being placed in your DataTable exactly as that, a single XML field. This is expected behavior. So I guess the biggest question, as asked in comments above, is why is the data being formed into XML in the first place if you want it to be a table in the code?

One thing you could do is use LINQ to XML (or some similar approach for XML DOM parsing) to query into the returned results to get the data you need out of the returned fields. It should feel fairly straightforward since you're expecting to be working with table data and LINQ has that "SQL feel" to it.

One important point you may be missing in this question, however, is the structural difference between tables and XML. Tables are relational, XML is hierarchical. They're designed to represent data in entirely different ways. That being said, it's entirely possible that the XML being returned can't be directly translated into a single DataTable object. It just might not represent a table of data.

相关问答

更多
  • 不需要c \来做到这一点。 你可以通过XSL文件来做到这一点 No need for c\ to do this. you can do it via an XSL file
  • 我猜你要么使用Entity Framework 1,要么你没有在Entity Framework 4中启用延迟加载。 在您的课程中,您期望加载Itens集合。 情况并非总是如此,因为只有在从数据库中检索出Formulario对象时显式急切加载时才会加载该集合。 你需要添加两行代码,一切都应该是好的: if(!Itens.IsLoaded) Itens.Load(); List itens = Itens.ToList(); I'm guessing you're either usi ...
  • 你的假设是正确的。 SqlXml的构造函数将XmlReader的内容存储在内存流中。 它不包含对传入的XmlReader的引用。 反编译的SqlXml构造函数: public SqlXml(XmlReader value) { if (value == null) { this.SetNull(); return; } this.m_fNotNull = true; this.firstCreateReader = true; ...
  • 最后经过大量的思考和调整......结果证明是MARS配置的问题!! MARS在我们最新的重构代码(我认为EF的默认行为)中打开,因为它在Linq中不存在于sql连接字符串中。 一旦我们删除“MultipleActiveRecordSets = True;” 从连接字符串它工作正常。 不知道为什么删除MARS有效。 希望它能帮助将来遇到类似问题的人。 Finally after lots of pondering and tweaking... It turned out to be issue with ...
  • 这里问题的一个部分是ADO.NET是一个抽象的提供者模型。 我们不知道具体实现(特定的ADO.NET提供者)在处理方面需要什么。 当然,我们可以合理地假定需要处理连接和交易,但命令? 也许。 读者? 可能的原因很大程度上是因为其中一个命令标记选项允许您将连接的生命周期与读取器相关联(因此连接在读取器关闭时关闭,这应该在逻辑上延伸到处置)。 总的来说,我认为这可能很好。 大多数情况下,人们不会手工搞乱ADO.NET,任何ORM工具(或者微型ORM工具,比如“Dapper”)都可以为您解决这个问题,而无需担心。 ...
  • 该视频向您展示了如何从XML文档启用智能感知。 我广泛使用它。 希望它有助于: http : //www.asp.net/learn/linq-videos/video-216.aspx 然后,您可以使用已经选择的项目列表来排除结果集中的项目。 This video shows you how to enable intellisense from XML documents. I use this extensively. Hopefully it helps: http://www.asp.net/le ...
  • 你究竟想在这里完成什么? 这听起来像是在存储过程中构建一个XML字段,并且它与DataTable完全一样,只需要一个XML字段。 这是预期的行为。 所以我想上面评论中提到的最大的问题是,如果你想让数据成为代码中的表,为什么数据首先形成为XML? 您可以做的一件事是使用LINQ to XML (或一些类似的XML DOM解析方法)来查询返回的结果,以便从返回的字段中获取所需的数据。 它应该感觉相当简单,因为你期望使用表数据,而LINQ对它有“SQL感觉”。 但是,在这个问题中你可能忽略的一个重点是表和XML之 ...
  • 我被迫创建“数据传输对象”来去除不需要传输的关系和数据。 而你认为这是坏事? 相反,正是如此设计的ASP.NET MVC应用程序应该如何工作:它应该使用视图模型。 而且不仅适用于返回JSON而且适用于所有操作的操作。 您应该避免将EF模型传递给视图。 观点永远不应该知道EF的存在。 视图模型是专门为满足视图要求而设计的类。 因此,控制器查询存储库以获取模型(EF),将其映射到视图模型并将其传递给要显示的视图。 要简化模型和视图模型之间的映射,可以使用AutoMapper 。 I've been forced ...
  • 当物体不再被使用以及垃圾收集器看起来合适时,物体将被清理干净。 有时,您可能需要将对象设置为null以使其超出范围(例如,您不再需要其值的静态字段),但总体上通常不需要设置为null 。 关于处理对象,我同意@Andre。 如果对象是IDisposable , 最好在不再需要它时将其处理掉 ,特别是如果对象使用非托管资源。 不处理非托管资源会导致内存泄漏 。 一旦程序离开using语句的范围,就可以使用using语句自动处理对象。 using (MyIDisposableObject obj = new M ...
  • 无论你做出什么选择都应该使用XmlReader。 不要强制SQL Server将XML序列化为文本格式。 更新: SQL Server以高效的二进制格式存储XML。 SqlXml.CreateReader从该二进制格式创建XmlNode对象。 否则,必须将高效的XML序列化为字符串,并且必须再次解析它。 Whatever choice you make should use an XmlReader. Don't force SQL Server to serialize the XML into text ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。