把CDH搭建起来了,跑其中的例子程序word-count。在控制台界面一直显示map 0% ?reduce 0% , 通过web页面查看job的状态一直是run,但是map没有执行。感觉是是资源的分配有问题。接着查看了任务的日志。 2014-07-04...
分类:
其他好文 时间:
2014-07-21 10:27:54
阅读次数:
822
原帖地址:http://www.oschina.net/question/1397765_159365 快速排序算法的基本特性: 时间复杂度:O(N * logN) 堆排序为不稳定排序,不适合记录较少的排序。 var arr = [],
count = 100,
i = 0,
parentIndex...
分类:
其他好文 时间:
2014-07-21 10:21:26
阅读次数:
207
select?sku,COUNT(sku)?cc?from?sales_flat_order_item?where?order_id?in(SELECT?entity_id?from?sales_flat_order?where?state?in(‘complete‘,‘processing‘))?GROUP?BY?sku?ORDER?BY?cc?D...
分类:
数据库 时间:
2014-07-21 10:08:17
阅读次数:
250
【Interface Property】 Properties can be declared on aninterface (C# Reference). 按如下形式实现interfac来避免冲突。 在没有interface前缀的情况下,编译器不会报错,2个interface引用同一...
分类:
其他好文 时间:
2014-07-21 10:03:52
阅读次数:
253
当该字段存在大量值为null或空的记录,容易发生数据倾斜;解决思路:count distinct时,将值为空的情况单独处理,如果是计算count distinct,可以不用处理,直接过滤,在最后结果中加1;如果还有其他计算,需要进行group by,可以先将值为空的记录单独处理,再和其他计算结果进行...
分类:
其他好文 时间:
2014-07-20 22:18:35
阅读次数:
1404
count(distinct key)案例explain select count(distinct session_id) from trackinfo where ds=' 2013-07-21' ;STAGE DEPENDENCIES: Stage-1 is a root stage St.....
分类:
其他好文 时间:
2014-07-20 22:16:56
阅读次数:
347
---------------loop循环定义变量--------------------declare cursor c1 is select * from emp;# rec emp%rowtype;# i numeber:=1; # v_count number;begin# select count(*) into v_count from emp;#(1) open c1; loop...
分类:
数据库 时间:
2014-07-20 00:33:20
阅读次数:
334
search_n
----------------------------------------------------------------------------------------
描述:在序列[first, last) 所涵盖的区间中,查找"连续 count 个符合条件之元素"所形成的子序列,
并返回迭代器 last
思路:
1.首先找出 value 第一次出现点
2.该出现点的后面是否连续出现 count - 1 个 value
3.如果是,找到了,如果不是,在当前元素后的区间重新找...
分类:
其他好文 时间:
2014-07-19 23:31:25
阅读次数:
355
__int64 CountOne(__int64 n)
{
__int64 count =0;
if (n ==0)
count =0;
else if (n >1&& n <10)
count =1;
else
{
__int64 highest = n;
__int64 bit =0;
...
分类:
其他好文 时间:
2014-07-19 23:27:20
阅读次数:
307
链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4675
题目大意:
在一个平面上有 n (1
解题思路:
由于n很小,可以对整个图进行压缩,只要不改变每条边的相对位置,对答案没有影响。
可以将这些矩形的坐标离...
分类:
其他好文 时间:
2014-07-19 23:22:29
阅读次数:
400