当NameNode关闭时,hadoop作业会发生什么?(What happens to hadoop job when the NameNode is down?)
在Hadoop 1.2.1中,我想知道对以下这些问题的一些基本理解
谁收到了hadoop的工作? 是NameNode还是JobTracker?
如果有人在NameNode关闭时提交Hadoop作业,会发生什么?hadoop作业是否失败? 还是进入Hold?
如果有人在JobTracker关闭时提交Hadoop作业,会发生什么? hadoop工作失败了吗? 还是进入Hold?
In Hadoop 1.2.1, I would like to know some basic understanding on these below questions
Who receives the hadoop job? Is it NameNode or JobTracker?
What will happen if somebody submits a Hadoop job when the NameNode is down?Does the hadoop job fail? or Does it get in to Hold?
What will happen if somebody submits a Hadoop job when the JobTracker is down? Does the hadoop job fail? or Does it get in to Hold?
原文:https://stackoverflow.com/questions/36091380
最满意答案
您需要通过自我实例化调用获取该函数的实例:
var floatShareBar = (function() { var fShareBar = $('#article-share'); this.float = function() { console.log('float'); }; this.unfloat = function() { console.log("unfloat"); }; return this; })();
更新1:我修改它以在函数中创建一个对象来附加这些函数,因为在前面的例子中
this
引用了window
对象var floatShareBar = (function() { var fShareBar = $('#article-share'); var instance = {}; instance.float = function() { console.log('float'); }; instance.unfloat = function() { console.log("unfloat"); }; return instance; })();
更新2:您实际上也可以使用
new
关键字, 请在此处查看更多信息var floatShareBar = new (function() { var fShareBar = $('#article-share'); this.float = function() { console.log('float'); }; this.unfloat = function() { console.log("unfloat"); }; })();
You need to get an instance of that function with a self instantiating call:
var floatShareBar = (function() { var fShareBar = $('#article-share'); this.float = function() { console.log('float'); }; this.unfloat = function() { console.log("unfloat"); }; return this; })();
UPDATE 1: I modified it to create an object within the function to attach those functions to, since in the previous example
this
refers to thewindow
objectvar floatShareBar = (function() { var fShareBar = $('#article-share'); var instance = {}; instance.float = function() { console.log('float'); }; instance.unfloat = function() { console.log("unfloat"); }; return instance; })();
UPDATE 2: You can actually just use the
new
keyword as well, look here for more infovar floatShareBar = new (function() { var fShareBar = $('#article-share'); this.float = function() { console.log('float'); }; this.unfloat = function() { console.log("unfloat"); }; })();
相关问答
更多-
只是扩大FWH的答案。 当您创建一个类并将其分配给一个变量时,您可以使用$ variable-> function();从该类外调用该类中的任何函数。 但是,因为你在类内部,所以你不知道类被分配了什么,所以你必须使用$ this->关键字来访问任何类的属性。 一般的经验法则,如果你想像$ obj-> var那样访问它,可以用$ this->来访问它。 class myClass { function myFunc() { echo "Hi"; } funct ...
-
您需要通过自我实例化调用获取该函数的实例: var floatShareBar = (function() { var fShareBar = $('#article-share'); this.float = function() { console.log('float'); }; this.unfloat = function() { console.log("unfloat"); }; return this; } ...
-
未定义的javascript函数(undefined javascript function)[2021-03-17]
updateTotal是LabourItems一个函数,所以调用 LabourItems.updateTotal(object,total); 或(仅当从LabourItems任何其他函数或其实例调用时) this.updateTotal(object,total); 更新: var LabourItems = { rate: null, hours: null, total: null, init: function(object) { var rate = $(obj ... -
未定义的对象错误引用(undefined reference to object error)[2023-01-15]
Car的成员函数应该是纯虚拟的 ,而不是非虚拟声明: class Car { public: virtual ~Car() = default; // Virtual destructor virtual Part getEngine() = 0; virtual Part getWheels() = 0; virtual Part getBody() = 0; }; 这就是链接器错误的原因。 编译器期望Car的函数定义,因为函数不是纯虚函数,但它找不到它。 使用纯 ... -
由于您的控制器返回的列表又是客户端的数组,因此您需要使用其index访问其属性: - data[0].geo; $('.destination_type' + getIndex).val(data[0].type); $('.destination_geo' + getIndex).val(data[0].geo); 等等。 如果您只需要第一个对象,那么最好使用First或FirstOrDefault方法从服务器返回单个对象。 var dest = db.Destination.First(x => ...
-
传递给Javascript函数时,jQuery Object未定义(jQuery Object undefined when passed to Javascript function)[2023-12-26]
如果将handCanvasArray声明为全局,请尝试仅将currCanvasID传递给Animate()函数,然后直接从中引用handCanvasArray。 ķ If you declare your handCanvasArray as global, try to pass only a currCanvasID to your Animate() function and then reference the handCanvasArray directly from it. K -
您正尝试从您的HTML文档全局调用函数: onclick="plusSlides(-1)" 但是这些函数是在另一个函数内的封闭范围内定义的: $(document).ready(function() { //... function plusSlides(n) { showSlides(slideIndex += n); } //... }); 传递给document.ready处理程序的匿名function() {}没有定义任何内容 ,该函数将在 ...
-
jQuery数组未定义错误(jQuery Array Undefined Error)[2023-12-18]
试试这个,在else中为“index”更改变量“statusIdValues”,为实际数组“statusIdValues”更改“array”,如下所示: $(document).ready(function () { var statusIdValues = []; $(':checkbox').change(function () { if ($(this).is(":checked")) { statusIdValues.push($(this).at ... -
奇怪的未定义的jquery错误(Strange undefined jquery error)[2021-11-18]
问题出在您的.splice() 。 当您移除项目0时,所有内容都向上移动,因此您不再拥有项目1。 一般来说,您无法从列举的列表中删除项目(除非在添加或删除项目时采取措施调整当前索引,但是.. yuck)。 我建议使用像grep这样的过滤器函数: http://jsfiddle.net/DnN4a/ var newArr = $.grep(amount, function(item, idx) { return item.currency == currency || item.value == val ... -
您需要传递对该函数的引用,因此请更改此: error: errorFunction() 对此: error: errorFunction 当你把parens放在那里时,你实际上是立即调用函数并传递它的返回值。 没有parens,它只是对jQuery ajax基础结构稍后可以调用的函数的引用。 为了进一步了解发生了什么,你的代码error: errorFunction()立即调用errorFunction()没有参数(这是你在调试中看到的)然后从该函数中获取返回值( undefined )然后将它放入传递 ...