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 ...
-
存储过程中的错误处理(Error handling in stored procedures)[2022-04-19]
关闭这一点,因为我发现每个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时,这必定会失败... 您可以将参 ...
-
存储过程错误处理 - 清理但返回原始错误(Stored Procedure Error Handling - Clean up but return original error)[2023-05-29]
请尝试以下代码段。 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 ... -
存储过程错误处理(stored procedure error handling)[2023-11-13]
批处理(存储过程)在到达不存在的表(这是延迟名称解析 )时正在中止,因此ROLLBACK未执行。 来自MSDN / BOL : 编译和语句级重新编译错误 如果错误发生在与TRY ... CATCH结构相同的执行级别,则TRY ... CATCH将不会处理两种类型的错误: 编译错误,例如阻止批处理执行的语法错误。 在语句级重新编译期间发生的错误,例如由于延迟名称解析导致编译后发生的对象名称解析错误。 当包含TRY ... CATCH构造的批处理,存储过程或触发器生成这些错误之一时,TRY ... CATCH构 ... -
是的,未处理的错误将卷起堆栈。 如果在主例程(或当前事件处理例程)中没有错误处理,那么错误将卷入VBA本身,这会导致程序中止,或重置主机应用程序内的VBA环境。 (你不想那样)。 我可以想到两个明显的例外:一个虚幻和一个真实: 1)如果VBA是通过意料之外的事件路径进入的,而不是通过主例程,它可能会出现你的主例程错误处理程序被错误返回绕过,但实际上,它是另一个线程,所以当它从一个事件处理程序中汇总起来,它独立于您的Main例程的主线程而转到VBA。 2)VBA错误处理不能捕获所有的错误,特别是大多数FATA ...
-
复杂的错误处理(Complex error handling)[2023-11-15]
我建议只对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 ...