摘要: 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 阅读(2044) 评论(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 阅读(1052) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.lovelucy.info/understanding-scopes-in-angularjs.html JavaScript 的原型链继承 假设父类 parentScope 有如下成员属性 aString, aNumber, anArray, anObject, 以及 阅读全文
posted @ 2016-11-22 18:58 bonelee 阅读(652) 评论(0) 推荐(0) 编辑
摘要: 比如我们现在有这样一个文件,data.json: 它的第一行定义了_index,_type,_id等信息;第二行定义了字段的信息。 然后执行命令: 阅读全文
posted @ 2016-11-20 21:27 bonelee 阅读(2487) 评论(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 阅读(2342) 评论(0) 推荐(0) 编辑
摘要: 对bulk request的处理流程: 1、遍历所有的request,对其做一些加工,主要包括:获取routing(如果mapping里有的话)、指定的timestamp(如果没有带timestamp会使用当前时间),如果没有指定id字段,在action.bulk.action.allow_id_g 阅读全文
posted @ 2016-11-18 19:51 bonelee 阅读(2285) 评论(0) 推荐(0) 编辑
摘要: 对bulk request的处理流程: 1、遍历所有的request,对其做一些加工,主要包括:获取routing(如果mapping里有的话)、指定的timestamp(如果没有带timestamp会使用当前时间),如果没有指定id字段,在action.bulk.action.allow_id_g 阅读全文
posted @ 2016-11-17 21:16 bonelee 阅读(15332) 评论(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 阅读(1293) 评论(0) 推荐(0) 编辑
摘要: channel是golang中很重要的概念,配合goroutine是golang能够方便实现并发编程的关键。channel其实就是传统语言的阻塞消息队列,可以用来做不同goroutine之间的消息传递,由于goroutine是轻量级的线程能够在语言层面调度,所以channel在golang中也常被用 阅读全文
posted @ 2016-11-12 11:20 bonelee 阅读(7341) 评论(0) 推荐(0) 编辑
摘要: 对Java程序员来说,我们对面向对象的编程(OOP)自然都是烂熟于胸的,但语言也极大地影响了我们构建面向对象应用程序的方式。(现在的OOP已经和Alan Kay当初创造这个词时候的初衷大不相同了,他的主要思想是采用消息传递并消灭所有状态数据(他认为,系统是由一些类似于生物细胞那样的对象构成的,这些对 阅读全文
posted @ 2016-11-12 10:47 bonelee 阅读(2991) 评论(0) 推荐(0) 编辑