首页 \ 问答 \ 当NameNode关闭时,hadoop作业会发生什么?(What happens to hadoop job when the NameNode is down?)

当NameNode关闭时,hadoop作业会发生什么?(What happens to hadoop job when the NameNode is down?)

在Hadoop 1.2.1中,我想知道对以下这些问题的一些基本理解

  1. 谁收到了hadoop的工作? 是NameNode还是JobTracker?

  2. 如果有人在NameNode关闭时提交Hadoop作业,会发生什么?hadoop作业是否失败? 还是进入Hold?

  3. 如果有人在JobTracker关闭时提交Hadoop作业,会发生什么? hadoop工作失败了吗? 还是进入Hold?


In Hadoop 1.2.1, I would like to know some basic understanding on these below questions

  1. Who receives the hadoop job? Is it NameNode or JobTracker?

  2. 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?

  3. 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
更新时间:2022-08-20 08:08

最满意答案

您需要通过自我实例化调用获取该函数的实例:

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 the window object

var 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 info

var 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; } ...
  • 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 ...
  • 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 => ...
  • 如果将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() {}没有定义任何内容 ,该函数将在 ...
  • 试试这个,在else中为“index”更改变量“statusIdValues”,为实际数组“statusIdValues”更改“array”,如下所示: $(document).ready(function () { var statusIdValues = []; $(':checkbox').change(function () { if ($(this).is(":checked")) { statusIdValues.push($(this).at ...
  • 问题出在您的.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 )然后将它放入传递 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)