RHEL上的Hadoop Start-dfs.sh奇怪的行为(Hadoop on RHEL Start-dfs.sh Strange Behavior)
我试图在Pseudo-Distributed模式下在RHEL上设置Hadoop。 一切似乎都运行正常,除了每次使用start-dfs.sh启动HDFS时,命令窗口都会挂起
"Starting namenode, ...".
所以,我必须使用“control + c”来结束这个命令然后继续
"localhost: starting secondarynamenode, ..." and "localhost: starting datanode,...".
它只是逐行运行,我必须使用“enter”键来保持它运行下一个命令。 但一旦完成,系统似乎工作正常。 这发生在bin文件夹中的所有其他脚本中,例如stop-dfs.sh。 那么,我认为这与RHEL和脚本有关?
谁能告诉我如何解决这个问题?
非常感谢。
I am trying to set up Hadoop on a RHEL in Pseudo-Distributed mode. Everything seems working fine except that every time I start HDFS by using start-dfs.sh, the command window hang at
"Starting namenode, ...".
So, I have to use "control + c" to end this command and it then continues to
"localhost: starting secondarynamenode, ..." and "localhost: starting datanode,...".
It just runs line by line and I have to use the "enter" key to keep it run the next command. But once it's done, the system seems to work fine. And this happens to all the other script in the bin folder such as stop-dfs.sh. So, I would assume this is related to RHEL and scripting?
Can anybody tell me how to fix this issue?
Many thanks.
原文:https://stackoverflow.com/questions/17534930
最满意答案
将您的模型Pocket更改为
class Pocket include Mongoid::Document field :title, type: String embeds_many :coins, cascade_callbacks: true accepts_nested_attributes_for :coins end
它会工作正常。
change your model Pocket to
class Pocket include Mongoid::Document field :title, type: String embeds_many :coins, cascade_callbacks: true accepts_nested_attributes_for :coins end
it will work fine.
相关问答
更多-
在Mongoid中选择embeds_many和references_many(Choosing between embeds_many and references_many in Mongoid)[2022-12-05]
要注意的最重要的事情是MongoDB中每个文档的4 MB限制 - 通过使用引用而不是嵌入文档,可以降低文档的大小。 有关这些差异的其他信息可以在这里找到。 The most important thing to be aware of is the 4 MB limit for each document in MongoDB - by using references instead of embedding documents, you can keep the size of your documen ... -
Image模型的文档存储在Supplier模型的文档中。 所以基本上没有在mongo中创建名称images集合。 在你的mongo控制台中检查一下。 您将只有suppliers集合而没有images集合。 如果您想直接访问图像而无需访问特定图像,则可以执行此操作 Supplier.all.pluck(:images) #It will give you an array of all images 或者实现has_many class Supplier < User include Mongoid:: ...
-
将您的模型Pocket更改为 class Pocket include Mongoid::Document field :title, type: String embeds_many :coins, cascade_callbacks: true accepts_nested_attributes_for :coins end 它会工作正常。 change your model Pocket to class Pocket include Mongoid::Document fi ...
-
尝试这个: class Api::V1::SchoolsController < ApplicationController def create school = School.new(school_params) if school.save render json: school, status: 201, location: [:api, school] else render json: { errors: school.errors } ...
-
从错误到可读消息的转换由ActiveModel而不是Mongoid处理,并且嵌入模型被认为仅是属性本地化的属性。 在这种情况下,如果您在i18n文件中使用以下内容,您将通过修改human_attribute_name为figures属性返回的内容来获得单数形式而不是复数形式: en: mongoid: attributes: report: figures: Figure The translation from errors ...
-
Mongoid:嵌入文档中的embeds_one和_destroy参数(Mongoid: embeds_one and _destroy param at embedded documents)[2023-12-25]
我在mongoid来源找到了解决方案。 有代码检查embeds_one关系: def delete? destroyable? && !attributes[:id].nil? end mongoid-4.0.2 / lib目录/ mongoid /关系/建设者/ nested_attributes / one.rb:82 这意味着embeds_one只能理解:id doc identifier,而不是embeds_many,它允许您使用以下内容传递嵌入文档:_id doc i ... -
您是否尝试为Folio文档中的功能启用AutoSave true class Folio include Mongoid::Document include Mongoid::Timestamps::Updated accepts_nested_attributes_for :features , :autosave => true embedded_in :profile end have you tried enabling AutoSave true for features in ...
-
要使用您的示例跟进“构建子类”问题,您可以: list.items.build({ name: "Another Item" }, SpecialItem) 指定您希望Mongoid为您构建的(子)类。 To follow up on the "building a subclass" issue using your example, you can: list.items.build({ name: "Another Item" }, SpecialItem) To specify the ...
-
如何在Mongoid的继承模型中覆盖embeds_many?(how to overwrite embeds_many in inherited model in Mongoid?)[2023-05-13]
我不是百分百肯定,但我认为你只需将embeds_many :circles的行添加到浏览器模型中。 您不需要删除继承的关系。 由于Circle继承自Shape,因此圆圈将存储在存储在浏览器文档中“shapes”键中的数组中,它们只需将其_type属性设置为“Circle”。 换句话说,拥有embeds_many :shapes关系不会在数据库中创建任何嵌入许多圆的东西也无法创建。 但是,这意味着您可以使用Browser.frist.shapes等方法,但您可以忽略这些方法。 添加embeds_many :c ... -
fields_for with mongoid embeds_many嵌套文档(fields_for with mongoid embeds_many nested documents)[2022-07-15]
看起来这是修复: = f.fields_for :queries, query do |q| looks like this was the fix: = f.fields_for :queries, query do |q|