在整理Java LockSupport.park()的东东。看到了个"Spurious wakeup"。又一次梳理下。 首先来个《UNIX环境高级编程》里的样例: [cpp] view plaincopy #include <pthread.h> struct msg { struct msg *m ...
分类:
其他好文 时间:
2017-04-29 11:00:00
阅读次数:
302
map(func):对DStream中的所有的元素进行func转换生成新的DStream flatMap(func):和map方法类似,先对DStream中的元素进行func运算,然后压平,就是说,如果有一个元素是集合或者数组,那么会被拆成一个一个的元素 filter(func):对DStream中 ...
分类:
其他好文 时间:
2017-04-28 13:37:05
阅读次数:
152
地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3960 题目: Japari Park is a large zoo home to extant species, endangered species, extinc ...
分类:
其他好文 时间:
2017-04-25 23:33:52
阅读次数:
367
Japari Park is a large zoo home to extant species, endangered species, extinct species, cryptids and some legendary creatures. Due to a mysterious sub ...
分类:
其他好文 时间:
2017-04-23 18:05:40
阅读次数:
192
一、概述 谈到并发,不得不谈ReentrantLock;而谈到ReentrantLock,不得不谈AbstractQueuedSynchronized(AQS)! 类如其名,抽象的队列式的同步器,AQS定义了一套多线程访问共享资源的同步器框架,许多同步类实现都依赖于它,如常用的ReentrantLo ...
分类:
编程语言 时间:
2017-04-23 16:46:55
阅读次数:
267
Japari Park is a large zoo home to extant species, endangered species, extinct species, cryptids and some legendary creatures. Due to a mysterious sub ...
分类:
其他好文 时间:
2017-04-23 01:06:43
阅读次数:
194
QQpet exploratory park QQpet exploratory park Today, more and more people begin to raise a QQpet. You can get a lot of pleasure from it, although it d ...
分类:
其他好文 时间:
2017-04-22 17:30:41
阅读次数:
231
作为互联网公司,网站监测日志当然是数据的最大来源。我们目前的规模也不大,每天的日志量大约1TB。后续90%以上的业务都是需要基于日志来完 成,之前,业务中对实时的要求并不高,最多也就是准实时(延迟半小时以上),因此,我们使用Flume将数据收集到HDFS,然后进行清洗和分析。 后来,根据业务需要,我 ...
分类:
其他好文 时间:
2017-04-17 09:27:12
阅读次数:
137
1 下载 2 配置,建立.vimrc,写入以下内容 set nocompatible " be iMproved, required filetype off " required " set the runtime path to include Vundle and initialize set ...
分类:
系统相关 时间:
2017-04-16 12:16:05
阅读次数:
237
Scala的Actor类似于Java中的多线程编程。但是不同的是,Scala的Actor提供的模型与多线程有所不同。Scala的Actor尽可能地避免锁和共享状态,从而避免多线程并发时出现资源争用的情况,进而提升多线程编程的性能。此外,Scala Actor的这种模型还可以避免死锁等一系列传统多线程 ...
分类:
其他好文 时间:
2017-04-15 01:02:59
阅读次数:
205