首页 \ 问答 \ Hadoop namenode高可用性(Hadoop namenode High Availability)

Hadoop namenode高可用性(Hadoop namenode High Availability)

我有一个关于名称节点高可用性的问题。 名称节点非常重要,因为它存储了所有元数据,如果它已关闭,整个Hadoop集群也将关闭。 那么有没有什么好的方法来接近名称节点High Availability,例如,当主名称节点失败时,可以接管备份名称节点? (现在我使用Hadoop 1.1.2)


I have a question about the name node High Availability. Name node is so important because it stores all the metadata, if it is down, the whole Hadoop Cluster will be down as well. So is there any good way to approach the name node High Availability, for example there is backup name node that can take over when the primary name node fails? (now I use Hadoop 1.1.2)


原文:https://stackoverflow.com/questions/18194675
更新时间:2023-09-24 10:09

最满意答案

您将需要使用INSERT INTO...SELECT FROM而不是INSERT INTO..VALUES

INSERT INTO customer_entity_int (attribute_id, entity_type_id, entity_id, `value`)
SELECT 14, entity_type_id, entity_id, `value`
FROM customer_entity_int
WHERE attribute_id = 13
  AND entity_id NOT IN (SELECT entity_id
                        FROM customer_entity_int
                        WHERE attribute_id = 14)

您可以在attribute_id列表的SELECT列表中包含静态值


You will want to use INSERT INTO...SELECT FROM instead of the INSERT INTO..VALUES:

INSERT INTO customer_entity_int (attribute_id, entity_type_id, entity_id, `value`)
SELECT 14, entity_type_id, entity_id, `value`
FROM customer_entity_int
WHERE attribute_id = 13
  AND entity_id NOT IN (SELECT entity_id
                        FROM customer_entity_int
                        WHERE attribute_id = 14)

You can include a static value in your SELECT list for your attribute_id

相关问答

更多
  • 尝试这个 INSERT INTO g8_list_exec (g8_task_id,g8_tmpl_id,g8_chk_id) SELECT g8_rec_id,g8_tmpl_uid,'ik_862' FROM g8_list_add_task WHERE g8_tmpl_uid = 'oe_507'; Try this INSERT INTO g8_list_exec (g8_task_id,g8_tmpl_id,g8_chk_id) SELECT g8_rec_id,g8_tmpl_uid,'i ...
  • 从MySQL文档 : 尽管InnoDB在内部支持大于65,535字节的行大小,但MySQL本身对所有列的总大小强加了行大小限制为65,535 假设你有8列,每列包含5000个字符,那么这需要的最小内存量为40KB,假设每个字符只有1个字节(根据你使用的编码,它可能超过这个数量)。 但是,您也可能超过MySQL规定的限制。 我将您的问题视为更多的设计问题,特别是您试图将过多的数据塞入单个记录中。 您可以考虑通过将单个列或列的子集作为其自己的单独表来更改您的设计。 关于INSERT语句,执行批量INSERT没有 ...
  • 您可以在Access的查询设计器中构建查询,然后在设计视图中单击功能区上的“运行”。 (寻找红色的解释点。) 如果您想从代码执行此操作,则可以使用DAO数据库对象或ADO CurrentProject.Connection对象的.Execute方法。 Dim strInsert As String strInsert = "INSERT INTO tbl_UserPurchase (ID, Name)" & vbCrLf & _ "VALUES(321, 'Joe');" CurrentDb.Exe ...
  • 正如另一位用户所说,MySQL中有一种机制可以使缓存保持最新状态。 当您执行影响先前在缓存中存储的结果的INSERT时,必须更新它以反映新插入或删除,以便稍后再次处理该SELECT时再次创建。 我怀疑这就是你所看到的。 另一种可能性,虽然更明显,并且希望不是您的问题,但如果您使用显示并自动更新表的工具执行此INSERT,则可能在INSERT之后发出SELECTS。 As another user stated, there is a mechanism in MySQL which keeps the ca ...
  • DbEntityManager有一个insert方法。 插入和更新由DbSqlSession根据DbEntity的getPersistantState进行管理。 您只需提供必须以insert和update为前缀的对应映射。 例如,请参阅内置实体。 The DbEntityManager has an insert method. The insert and update is than managed by the DbSqlSession based on the getPersistantState ...
  • 毕竟,我找不到两个选择查询的逻辑解释。 我发现最好的是在没有手动更改数据库的情况下摆脱这两个选择,如此处所述。 因此,为了摆脱这些选择,有人应该首先以不同的方式设置域类(没有约束,但有映射)。 class Myclass { String dscr static mapping = { dscr unique: true } } 然后为了保护你的代码免受异常的影响,因为现在hibernate不检查唯一性,你应该插入这样的新元素: try { def a = ...
  • 您将需要使用INSERT INTO...SELECT FROM而不是INSERT INTO..VALUES : INSERT INTO customer_entity_int (attribute_id, entity_type_id, entity_id, `value`) SELECT 14, entity_type_id, entity_id, `value` FROM customer_entity_int WHERE attribute_id = 13 AND entity_id NOT IN ...
  • 2000个插入查询一小时约为每1.5秒一次。 这对任何现代设备上运行的任何数据库都不是一个严重的负载。 唯一的例外是插入非常长,例如存储兆字节长度的blob或插入,这些blob或插入可能具有执行复杂工作的长触发链。 我怀疑尝试优化应用程序的这个方面还为时过早。 您应该能够为每个操作单独插入而不影响性能。 这也将简化应用程序。 通过不使用缓存,您不必担心与缓存保持一致性,如果应用程序端失败该怎么办,如果在前一个缓存更新之前发生第二次缓存更新,该怎么办,等等。 在实际更新缓存时,您也不必担心如何处理缓存。 我应 ...
  • 那是因为你可能有Book 1..n Chapter , cascade设置为(至少) PERSIST 。 这意味着无论何时保存书籍,其所有章节都会被保存。 所以你实际上是想两次保存这些章节。 你不需要第二次保存(在第二个例子中) 第一个例子就是这样工作的,因为章节已经与会话相关联(也许你没有覆盖hashCode()和equals()方法),而save()根本没有做任何事情。 但这些都是猜测。 你必须展示你的映射。 That's because you probably have Book 1..n Chap ...
  • 根据MySQL INSERT计划,我们有以下问题花费时间: - Connecting - Sending query to server - Parsing query - Inserting row (1 × size of row) - Inserting indexes: (1 × number of indexes) - Closing 因此,多次插入会更快,因为它将生成Connecting , Sending query to server , Parsing query ,仅Closing开 ...

相关文章

更多

最新问答

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