首页 \ 问答 \ HDFS不会复制块(HDFS does not replicate blocks)

HDFS不会复制块(HDFS does not replicate blocks)

我最近安装了Hadoop(Cloudera)。 我在复制块下遇到错误(在Cloudera Manager中,这是安装的gui)。 所以,当我跑

hdfs dfsadmin -report

我明白了

Configured Capacity: 555730632704 (517.56 GB)
Present Capacity: 524592504832 (488.56 GB)
DFS Remaining: 524592193536 (488.56 GB)
DFS Used: 311296 (304 KB)
DFS Used%: 0.00%
Under replicated blocks: 5
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0

这意味着由于某种原因我的hdfs不会复制块。 从这里检查什么? 是否可能是我的HDFS Balancer的问题,我需要手动运行它?


I have recently installed Hadoop (Cloudera). I get an error that I have under replicated blocks (in Cloudera Manager which is a gui for the installation). So when I run

hdfs dfsadmin -report

I get

Configured Capacity: 555730632704 (517.56 GB)
Present Capacity: 524592504832 (488.56 GB)
DFS Remaining: 524592193536 (488.56 GB)
DFS Used: 311296 (304 KB)
DFS Used%: 0.00%
Under replicated blocks: 5
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0

Which means that for some reason my hdfs does not replicate the blocks. What to check from here? Is it possible that it is an issue with my HDFS Balancer and that I need to run it manually?


原文:https://stackoverflow.com/questions/46824383
更新时间:2022-10-08 08:10

最满意答案

请尝试以下代码段。

DECLARE @errNum int
DECLARE @rowCount int

BEGIN TRY
    INSERT INTO [TABLE] (COL1) VALUES ('1")
END TRY
BEGIN CATCH
    SET @errNum = @@ERROR
    SET @rowCount = @@ROWCOUNT
    RAISEERROR(@errNum)
END CATCH

Try the following snippet.

DECLARE @errNum int
DECLARE @rowCount int

BEGIN TRY
    INSERT INTO [TABLE] (COL1) VALUES ('1")
END TRY
BEGIN CATCH
    SET @errNum = @@ERROR
    SET @rowCount = @@ROWCOUNT
    RAISEERROR(@errNum)
END CATCH

相关问答

更多
  • 在每个存储过程中,您可以为您感兴趣的错误DECLARE ... HANDLER ,让他们将状态信息写入临时表; 该表随后可以被其他(外部)存储过程读取,以确定引发了哪些错误(如果有的话)。 Within each stored procedure, you can DECLARE ... HANDLER for the errors in which you're interested and have them write state information to a temporary table; t ...
  • 关闭这一点,因为我发现每个SP都必须有自己的错误处理,而外部SP调用多个SP不需要进行错误处理。 Closing this since I figured out that each SP had to have its own Error handling and the outside SP calling multiple SPs would not need to have error handling.
  • 尝试使用TRY CATCH并捕获您的错误,如下所示: BEGIN TRY delete from Test where ID = @ID END TRY BEGIN CATCH SET @ErrorMessage = ERROR_MESSAGE() SET @ErrorSeverity = ERROR_SEVERITY() SET @ErrorState = ERROR_STATE() RAISERROR(@ErrorMessage, @ErrorSe ...
  • next不会返回任何内容,因此这两个语句是相同的。 但第一个更短。 next doesn't return anything, so these two statements are identical. But the first one is shorter.
  • 在你的SP之上你有这个 ALTER PROCEDURE [dbo].[p_set_OPD_Registration] ( @name_pr VARCHAR(120) ,@age NUMERIC(20, 4) ,@v_out_result_num INT OUTPUT ,@v_out_result_msg VARCHAR(1000) OUTPUT ) 参数@age定义为NUMERIC(20,4) 。 当您尝试使用年龄的非数字值调用SP时,这必定会失败... 您可以将参 ...
  • 请尝试以下代码段。 DECLARE @errNum int DECLARE @rowCount int BEGIN TRY INSERT INTO [TABLE] (COL1) VALUES ('1") END TRY BEGIN CATCH SET @errNum = @@ERROR SET @rowCount = @@ROWCOUNT RAISEERROR(@errNum) END CATCH Try the following snippet. DECLARE @e ...
  • 批处理(存储过程)在到达不存在的表(这是延迟名称解析 )时正在中止,因此ROLLBACK未执行。 来自MSDN / BOL : 编译和语句级重新编译错误 如果错误发生在与TRY ... CATCH结构相同的执行级别,则TRY ... CATCH将不会处理两种类型的错误: 编译错误,例如阻止批处理执行的语法错误。 在语句级重新编译期间发生的错误,例如由于延迟名称解析导致编译后发生的对象名称解析错误。 当包含TRY ... CATCH构造的批处理,存储过程或触发器生成这些错误之一时,TRY ... CATCH构 ...
  • 是的,未处理的错误将卷起堆栈。 如果在主例程(或当前事件处理例程)中没有错误处理,那么错误将卷入VBA本身,这会导致程序中止,或重置主机应用程序内的VBA环境。 (你不想那样)。 我可以想到两个明显的例外:一个虚幻和一个真实: 1)如果VBA是通过意料之外的事件路径进入的,而不是通过主例程,它可能会出现你的主例程错误处理程序被错误返回绕过,但实际上,它是另一个线程,所以当它从一个事件处理程序中汇总起来,它独立于您的Main例程的主线程而转到VBA。 2)VBA错误处理不能捕获所有的错误,特别是大多数FATA ...
  • 我建议只对open进行单独的错误处理,因为之前和之后有不同的清理: bool connect() { try { m_acceptor.open( m_address.protocol() ); } catch( const boost::system::system_error& error ) { return false; } try { m_acceptor.set_option( tcp::acceptor::reuse_address(true) ...
  • 在您的代码中,您将引发严重性为10的错误。 RAISERROR('Already exists',5,1) 因此SQLConnection会将其视为InfoMessage而非异常。 当SQL Server返回严重性为10或更小的邮件时,会发生InfoMessage事件。 严重性介于11和20之间的消息会引发错误,严重性超过20的消息会导致连接关闭。 请点击这里 您可能希望在此处检查数据库错误严重性 你可以连接infomessage事件,如下所示: // Assumes that connection r ...

相关文章

更多

最新问答

更多
  • 获取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的基本操作命令。。。