Saturday, March 27, 2010

Google leaves, who cares?


For the Google and China's fight, what's your opinion?

I have nothing to say. Google is a quite well company, my cell phone's operating system is Google's system. But for this, if you are a person who has a little sensitivity to news and politics, you will know whatever you said is nothing. Moreover, you probably has a bad ending, you are lucky if they just delete your post... Google quit from China, and go to HongKong, even go back US. But as a writer, if he said some truth, he is forced to quit, moreover, where can he go?

Actually, no matter what's the reason why Google made that decision, there is an unwise action. Google said, "I don't want to be censored on some sensitive contents any more..". BTW, the mentioned contents here, is not exactly the porn. Government never be sensitive to porn. Moreover, I guess many government officers' glans already became numb... What does this "sensitive" means is those contents that are threat to government's control. But, so called opened Internet and Internet freedom, in today's China society, who cares? This point for moving peoples, for arousing pity, may work for normal peoples, but can not work for chinese...

Twenty million netizens in China, suppose Google ask us if you like to read the search results without censorship, I guess there would be twenty million minus wumao commentors liking it. Just like shopping, everyone like getting more with same price, nobody hates buy 1 get 2 free product...However, if Baidu gave 10 RMB to each netizen and asking you to use a new browser which can block Google, also this is totally comply with China law, I guess most of them will like Baidu finally...Do Chinese pursue those dangerous general values? um...Chinese may pursue something, but those things are on a convenient occasion...Chinese have more important things to pursue, they are pursuing buying house, pursuing a higher level solider in a game. That's because, we have too much pressure, we have no time pursuing ideal, it is enough to just live, to avoid hungry. Is there any differences between eating on one's knees and eating with standing? Google over-evaluates the positions of freedom, truth, justice,...in Chinese netizens. I like finding a 100 bill more than others, except finding two 100 bills...

To be honest, it is better for Google to say I am framed by CCTV to explain their quit...The reasons that Google threw out, are not accept by most of Chinese, and can't arouse pity from most of Chinese.. 

Tuesday, March 23, 2010

The Cove: I'll never complain American bloody pork


The Cove,

An amazing documentary film...

A real record of Japanese slaughter on lovely dolphin...

An adventure shoot in the Japanese restricted area...

A voice calling for human's original reaction...

A biography of several heroes...

....

I love this film, and I will never complain that American killing animals without letting blood. The dolphins are as clever as a 3 year old child, and lovely, and ever saved many human's lives... So, when we saw human killing them cruelly in cold blood, we feel sorry...Similarly, I never eat dog's meat, many Chinese eat dogs and think it is delicious, as an aphrodisiac...I don't dare to eat so lovely animal...

Sigh, pig is in some sense lovely too... why we eat it every day?


Monday, March 22, 2010

bye bye Google

Today, Google shut down google.cn website and redirect the traffic to google.com.hk, another google search website located in Hong Kong. Google said this is for skirt Chinese government's censorship, but apparently, google.com.hk will be blocked in China mainland very soon. I have no doubt about this. Moreover, Google's action may make China's government angry and have an escalation of the conflict, which may result in complete blocking of Google's services, including Gmail...

As a Chinese, I can't say China's government did evil... But to be honest, I have to admit that China's government have done a lot to maintain and consolidate its rein.

To be loyal to my country I say:Google is just an Internet company, you have to comply with China's law, you can not violate your written promise when you coming into China. If you want to take a place in China's market, you have to follow China Party's leadership, you can earn money, but you can not earn too much, can not earn more than Chinese's local company. BTW, any foreign Internet companies never have a happy ending in China when they have Chinese rivals, Yahoo was taken over by Alibaba, Microsoft's MSN was beaten by QQ, ebay and amazon have a little market in China, while every Chinese know Taobao. Now, it is your turn, Google, you are a threat to Baidu, you must go out of China.

Many Chinese said Google is supported by USA's government. I don't deny this. Every big cooperation has to have good relationship with their government, just like Baidu, QQ, Alibaba with China's government. But it is not necessary to make this as political issue. Google wants money, and also wants a good environment to earn money, so they must be friend with government. The same thing in China.

Ok, As Chinese I have to support my country. But as a netizen, as a human being, I have to love Google more....

Saturday, March 20, 2010

Hadoop tips

1. Hadoop Core provides several mechanisms for setting the classpath for your application:

  • You can set up a fixed base classpath by altering hadoop-env.sh, via the HADOOP_CLASSPATHenvironment variable (on all of your machines) or by setting that environment variable in the runtime environment for the user that starts the Hadoop servers.

  • You may run your jobs via the bin/hadoop jar command and supply a -libjars argument with a list of JARs.
  • The DistributedCache object provides a way to add files or archives to your runtime classpath.
2.--deleteOutput, which must be the last argument, causes the output directory to be deleted before the job is started. This is convenient when running the job multiple times.
3.Configuration.get("slave.host.name") can get the hostname on each tasktracker.
   if (job.get("slave.host.name") != null) {
       this.hostname = job.get("slave.host.name");
     }

     if (hostname == null) {
       try {
this.hostname =
DNS.getDefaultHost
(job.get("mapred.tasktracker.dns.interface","default"),
job.get("mapred.tasktracker.dns.nameserver","default"));
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
     }

Thursday, March 11, 2010

Legend of Love Story

I really love this song... by Li Jian or Faye Wong...

只是因为在人群中多看了你一眼
Just because the one more glance I took of you in the crowd

再也没能忘掉你容颜
I haven't since been able to forget your face

梦想着偶然能有一天再相见
From then on I began to think about you alone

从此我开始孤单思念
Wishing for another chance encounter someday

想你时你在天边
When I'm thinking about you, you are far far away

想你时你在眼前
When I'm thinking about you, you are before my eyes

想你时你在脑海
When I'm thinking about you, you are in my heart

想你时你在心田
When I'm thinking about you, you are in my mind

宁愿相信我们前世有约
I'd rather believe that we had a past life promise

今生的爱情故事不会再改变
And this life our love story will not change

宁愿用这一生等你发现
I'd rather spend my whole life waiting for you to realize

我一直在你身旁从未走远
That I've been always by your side and never away



Wednesday, March 10, 2010

Image thinking and Concept thinking

These days, my boss and I have discussed some times for a particular problem... But, we always have different thinking directions even though have the same goal, which results in many confusions of both of us...

Today, an idea flashed in my mind... maybe we have different thinking ways... My boss is a computer science professor who is quite good at math, even has some talent, while I am, I think, just a common student who has no talent on anything...So, the gap between us, I guess is that, I am using image thinking (visual thinking), while my professor is using concept thinking (abstract thinking).

For a particular algorithm, I must translate this algorithm to have a physical meaning for understanding it. But my professor can just read these symbols or some math formulation to have a abstract overall view of this algorithm. For example, considering the pagerank algorithm, I understand it by make the nodes like a water bucket and make the links like water pipes, then I can imagine when pagerank running, it is just like water moving or transferring from one bucket to another. But my professor will have an overall view based on the math, which I can't describe, because it is beyond my thinking knowledge/scale...

For designing an algorithm, I prefer to a heuristic way, maybe my boss will prefer a math way to derive it from another idea...

I am not quite sure that my image thinking is bad... Oh, I remember that when I was in middle school, my physics is much better than math, perhaps top 1 on physics in class but just top 10 on math in class... But I have to admit that most people have image thinking, which means concept thinking people is much more precious...and have some advantages in many fields..

Saturday, March 6, 2010

Hadoop notes

How to debug hadoop programs?
See http://wiki.apache.org/hadoop/HowToDebugMapReducePrograms
http://hadoop.apache.org/common/docs/r0.20.0/mapred_tutorial.html#IsolationRunner
and
http://hadoop.apache.org/common/docs/r0.20.0/mapred_tutorial.html#Debugging


Hadoop performance analysis tool.
Currently there are 2 ways to analyze performance of hadoop cluster and jobs

1. Hadoop Vaidya: is a performance diagnostic tool for hadoop jobs which
executes a set of rules against the job counters and gives a report of
performance improvement areas as a result. But Hadoop Vaidya is a separate
contrib module and has a limited set of rules as of now.

2. Hadoop Metrics(used with Ganglia or Nagios): All Hadoop daemons expose
runtime metrics which are then analyzed by some cluster monitoring system
like Ganglia or Nagios. Hadoop Metrics has a lot of dependencies on third
party libraries and limited number of metrics as of now.


3. Gang lia http://ganglia.sourceforge.net/


Number of Map tasks
Setting the number of map tasks (mapred.map.tasks or JobConf.setNumMapTasks()) does not guarantee that number of maps in the job will be set to that. It will only be used as a hint. Number of maps is decided by your InputFormat. You should implement InputFormat.getSplits() to define how the input should be split. The fact is "number of splits is equal to the number of maps".
If you are using default InputFormat (i.e. TextInputFormat), number of maps is decided by DFS block size. If you use NLineInputFormat with mapred.line.input.format.
linespermap=1, number of maps will be number of lines in the file.
More details @
http://hadoop.apache.org/common/docs/r0.20.0/api/org/apache/hadoop/mapred/JobConf.html#setNumMapTasks%28int%29

Thursday, March 4, 2010

i am shocked...

The main task in this paper (MapReduce Online) involved tokenizing and sorting a 5.5 GB file. Hadoop had to use 60 (seriously, 60!) nodes to do this in 900 seconds. The techniques introduced in the paper allowed Hadoop to do this in 600 seconds. But does anyone else think they can write a C program that runs on a single node that runs in half the time on 1/60th of the machines?