渴死的火烈鸟
standalone · 共 356 篇文章
Hadoop Research Topics
by Dhruba Borthakur Recently, I visited a few premier educational institutes in India, e.g. Indian Institute of Technology (IIT) at Delhi and Guwahati. Most of the undergraduate students at these two institutes are somewhat familiar with Hadoop and would like to work on Hadoop related projects as p…
2010-12-14 15:12 · 评论(0)
HDFS scalability: the limits to growth
Abstract: T**he Hadoop Distributed File Sys-**tem (HDFS) is an open source system currently being used in situations where massive amounts of data need to be processed. Based on experience with the largest deployment of HDFS, I provide an analysis of how the amount of RAM of a single namespace serv…
static synchronized methods?
Keep in mind that using synchronized on methods is really just shorthand (assume class is SomeClass): synchronized static void foo() { ... } is the same as static void foo() { synchronized(SomeClass.class) { ... } } and synchronized void foo() { ... } is the same as void foo() { synchronized(this) …
2010-11-16 21:41 · java · 评论(0)
set cpu performance mode
A cheap/dirty little hack to increase idle CPU frequency and increase performance in general (don't blame me when your battery runs dry in about 3 hours): (must have root first!) cat /proc/cpuinfo (use this to see cpu speed, you will see at idle its 162.54mhz) adb shell echo "performance" > /sys/de…
2010-11-15 14:38 · linux · 评论(0)
java question
1. what is error? what is exception? 2. String vs. StringBuffer vs. StringBuilder 3. final vs. finally vs. finalize 4. synchronized(a){ synchronized(b){ } } any problems? 5. way to avoid GC 6. way to avoid dead lock 7. Collection<?> vs. Collection<Object> 8. Design pattern in java library? pattern …
2010-11-12 11:23 · java · 评论(4)
hadoop-0.20.2+737 and hbase-0.20.6 not compatible?
master log里面发现 0 region servers, 0 dead, average load NaN regionserver hang住。 原因不明。
hbase master cannot start up
2010-10-06 15:21:44,704 INFO org.apache.hadoop.hbase.master.HMaster: vmName=Java HotSpot(TM) Client VM, vmVendor=Sun Microsystems Inc., vmVersion=16.3-b01 2010-10-06 15:21:44,704 INFO org.apache.hadoop.hbase.master.HMaster: vmInputArguments=[-Xmx1000m, -XX:+HeapDumpOnOutOfMemoryError, -XX:+UseConcM…
GC 知识
基本回收算法 引用计数(Reference Counting) 比较古老的回收算法。原理是此对象有一个引用,即增加一个计数,删除一个引用则减少一个计数。垃圾回收时,只用收集计数为0的对象。此算法最致命的是无法处理循环引用的问题。 标记-清除(Mark-Sweep) 此算法执行分两阶段。第一阶段从引用根节点开始标记所有被引用的对象,第二阶段遍历整个堆,把未标记的对象清除。此算法需要暂停整个应用,同时,会产生内存碎片。 复制(Copying) 此算法把内存空间划为两个相等的区域,每次只使用其中一个区域。垃圾回收时,遍历当前使用区域,把正在使用中的对象复制到另外一个区域中。此算法每次只处理正在使用…
2010-11-09 09:46 · java · 评论(0)
Ten Amazing Linux Commands
sudo !! 以 root 帐户执行上一条命令。 python -m SimpleHTTPServer 利用 Python 搭建一个简单的 Web 服务器,可通过 http://$HOSTNAME:8000 访问。 :w !sudo tee % 在 Vim 中无需权限保存编辑的文件。 cd - 更改到上一次访问的目录。 ^foo^bar 将上一条命令中的 foo 替换为 bar,并执行。 cp filename{,.bak} 快速备份或复制文件。 mtr google.com traceroute + ping。 !whatever:p 搜索命令历史,但不执行。 $ssh-copy-id …
2010-11-08 22:42 · linux · 评论(0)
static nested class vs. inner class
http://articles.techrepublic.com.com/5100-10878_11-5815620.html
2010-11-03 22:37 · java · 评论(2)
The 'static' keyword in java
1. When a variable is defined 'static', it's called a "class variable', that is, all the objects of that class own that variable. A class variable can be accessed with the class, without creating objects of the class. 2. When a method is defined 'static', it can be called with class without need to…
2010-11-03 22:36 · java · 评论(0)
Explain final, finally, finalize
final is a keyword for class, methods, variable. A final class is a class which cannot be subclassed. A final method cannot be overrided. A final variable is not changable after it's initialized. finalize() method is used just before an object is destroyed and can be called just prior to garbage co…
2010-11-03 21:53 · java · 评论(0)
计算数组元素的乘积
Given an array a[i], your task is to generate an array b[i], b[i] is the product of the numbers in the array except the i th number. My solution: DP problem? Define two functions: f(i)=a[0]*a[1]*a[2]*...*a[i-1] g(i)=a[i+1]*a[i+2]*...*a[n-1] So b[i]=f(i)*g(i) Then f(0)=1 f(1)=a[0] f(i+1)=f(i)*a[i] F…
2010-11-03 20:56 · algorithm · 评论(0)