摘要: Angular什么时候不会自动为我们$apply呢? 这是Angular新手共同的痛处。为什么我的jQuery不会更新我绑定的东西呢?因为jQuery没有调用$apply,事件没有进入angular context,$digest循环永远没有执行。 我们来看一个有趣的例子: 假设我们有下面这个dir 阅读全文
posted @ 2016-11-25 11:37 bonelee 阅读(617) 评论(0) 推荐(0)
摘要: 转自:http://www.angularjs.cn/A0a6 Angular用户都想知道数据绑定是怎么实现的。你可能会看到各种各样的词汇:$watch,$apply,$digest,dirty-checking... 它们是什么?它们是如何工作的呢?让我们从头开始吧。 浏览器事件循环和Angula 阅读全文
posted @ 2016-11-25 11:34 bonelee 阅读(325) 评论(0) 推荐(0)
摘要: spark-2.0.0-bin-hadoop2.6/bin/spark-shell --jars elasticsearch-hadoop-5.0.1/dist/elasticsearch-spark-20_2.11-5.0.1.jar 注意版本对应关系! 可以看到ES请求data/test/3中i 阅读全文
posted @ 2016-11-24 19:57 bonelee 阅读(2059) 评论(0) 推荐(0)
摘要: 转自:http://www.lovelucy.info/understanding-scopes-in-angularjs.html angularjs 中的scope继承关系 ng-include 假设在我们的 controller 中, $scope.myPrimitive = 50; $sco 阅读全文
posted @ 2016-11-22 18:59 bonelee 阅读(1065) 评论(0) 推荐(0)
摘要: 转自:http://www.lovelucy.info/understanding-scopes-in-angularjs.html JavaScript 的原型链继承 假设父类 parentScope 有如下成员属性 aString, aNumber, anArray, anObject, 以及 阅读全文
posted @ 2016-11-22 18:58 bonelee 阅读(665) 评论(0) 推荐(0)
摘要: 比如我们现在有这样一个文件,data.json: 它的第一行定义了_index,_type,_id等信息;第二行定义了字段的信息。 然后执行命令: 阅读全文
posted @ 2016-11-20 21:27 bonelee 阅读(2528) 评论(0) 推荐(0)
摘要: http://www.cnblogs.com/bonelee/p/6078947.html 里分析了ES bulk实现,其中路由代码: ShardId shardId = clusterService.operationRouting().indexShards(clusterState, conc 阅读全文
posted @ 2016-11-18 19:54 bonelee 阅读(2364) 评论(0) 推荐(0)
摘要: 对bulk request的处理流程: 1、遍历所有的request,对其做一些加工,主要包括:获取routing(如果mapping里有的话)、指定的timestamp(如果没有带timestamp会使用当前时间),如果没有指定id字段,在action.bulk.action.allow_id_g 阅读全文
posted @ 2016-11-18 19:51 bonelee 阅读(2331) 评论(0) 推荐(0)
摘要: 对bulk request的处理流程: 1、遍历所有的request,对其做一些加工,主要包括:获取routing(如果mapping里有的话)、指定的timestamp(如果没有带timestamp会使用当前时间),如果没有指定id字段,在action.bulk.action.allow_id_g 阅读全文
posted @ 2016-11-17 21:16 bonelee 阅读(15423) 评论(1) 推荐(0)
摘要: http://www.jianshu.com/p/cccc56e39429/comments/2022782 和 https://github.com/elastic/elasticsearch-hadoop/issues/745 都有提到通过自定义Spark Partitioner提升es-had 阅读全文
posted @ 2016-11-12 18:06 bonelee 阅读(1306) 评论(0) 推荐(0)