Mac 上安装 Hadoop 运行 WordCount Example


Coder Life

直接用 Homebrew 安装

然后编辑 /usr/local/Cellar/x.x.x/libexec/etc/haddop-env.sh

(对应 Java 1.7 )

否则在 macOS 上会报 “Unable to load realm info from SCDynamicStore”

example 的 jar 文件在 /usr/local/Cellar/x.x.x/libexec/share/hadoop/mapreduce 下

进入目录之后

创建一个文件夹用于输入

把文本文件放入里面或者输入

运行

然后查看结果

Don’t Take History as Nothing


English Diary

People might admire other people aroud him with a bit better than himself at some point, but have no sense to who are the best in the world.

Someone better than him told him something and he took them like the Bible. But he would never spend any time to read what who are the best in world had written.

Most of people know and adore Steve Jobs. But they might don’t have the same sense to people like Edison, Cai Lun, Watt.

Imagine that, If we were living in a world without paper and electric. Then someone invented these. How much admiration would you give to them? I believe that would not be less than how much you gave to Steve Jobs.

Just because before we borned. These already exists. So we may not have that feeling. But if you want to learn something, you must bring yourself to that situation. And let yourself to feel the moment, to feel how great that had been.

Then you will know, there are so much knowleges and examples of great successes in history, far more than a Steve Jobs story or someone who you know and better than you can bring to you. As long as you don’t take history as nothing.

Riyueming Zhang vs. Zhang Riyueming


English Diary

In the past, I have given myself some English names.

The first one, ‘Dragon’. It’s in my fifth year of my primary school. I enrolled an out-school english lecture. And the teacher has given me a name – ‘David’. I didn’t like it at all. The first thing after I came home was looking up the English word of 龍, and it was ‘Dragon’. So the second day I told my teacher that I wanted this name.

In my high school, I prefered the name ‘Peter Chang’. After that, I created an onomatopoeia word of my Chinese name – ‘Evamin’.

When it was my sophomore year, I created another code – ‘sowicm’. And it could be registered anywhere without conflict. And I filled profiles with ‘Sowicm Right’. So I became the ‘Mr. Right’. : )

The last one I used was ‘Tony Zhang’. But when I was doing some serious researches, I figured out that I can only use ‘Riyueming Zhang’ or ‘Zhang Riyueming’ as the name. It’s my legal English name, for now. And I know I don’t have to pick another extra English name instead of this.

But ‘Riyueming Zhang’ and ‘Zhang Riyueming’, which one is more proper?

In the past, my answer would be the first, ‘Riyueming Zhang’. But this time, I did a lot of research on this.

Most of Chinese professors I known chose the first form: ‘Given name, Family name’. But what is not the same as the past is that Chinese culture being popular now. And anyone have been with Chinese people or have basic knowledge of Chinese culture should know that Chinese name is in the form ‘Family name, Given name’. So, using that should be totally ok. And it keeps consistent with pronunciation from Chinese.

And the key factor in fact, is that when western presses publish reports about Xi Jinping they are using ‘Xi Jinping’ instead of ‘Jinping Xi’. So I decided to follow the leadership of our national leader. : )

Writing is Hard to be continuous


English Diary

What if it is true that there is nothing being worth to written?

And what if you want to write but have no idea about what to be written?

So I think maybe I’ll stop enforcing myself to write an entry everyday, because most of these maybe garbages.

But I also know that if I stop it then it’s high probably I wouldn’t write anything for a long time.

It’s a hard choice. But I write my consideration down to finished this entry. So I have another chance to rethink about that. : )

Three photos on my wall


English Diary

I put three photos on my wall first time in my life.

Here are these photos:
Why would I select these?

The first photo is of Gandhi. He was a such person who lead a revolution and changed the world with his thick body.
The second photo is of Einstein. He fought for his research conclusions. But in this photo, he didn’t look at the front. It make me think, by now, people who has successes in academic would not give me a look.
The third photo is of Jobs. Everyone knows what he did. But why I select this photo of him? Because it’s before he had his complete success. And he was handing his first Macintosh and look at front. It seems like he is asking me: when will your first robotic come out?
So, all of these photos has their very meaning for me. I put these on wall to remind myself.

I Am Making Progress


English Diary

Today I woke up at 5 o’clock, and did my morning run.

And I talked with 5 people about studying abroad.

I wish I could start these 5 years over. There are some people I shouldn’t know. And there are other people I should know earlier.

Today I also talked with my father. There are many hardly crossable gap between people produced inadvertently, unintentionaly, coincidentally.

Almost forgotten, I also ordered three posters of Einstein, Jobs and Gandhi respectively. I selected their photos by myself.

Writing in English is difficult to me. It seems like I wrote nothing for 5 days after second English entry.

I am taking baby steps but I am making progress.

Amazing day


English Diary

This day is an amazing day. It is hot. A week ago some girls concerned they may be not allowed to dress in short in this summmer. But now, they find the hot weather hard to cope. However, I prefer it instead of the rainy.

I woke up at 5 o’clock. After washing, I went out and did my morning run and showered. I didn’t morning run for more than 5 years.

After breakfast, I dictated TPO listening for one hour and recited 140 words.

I also read two sections of one chapter of my professional book until ten.

Then I drove out.

This afternoon, I watched an open course about TPO speaking, then continued read the book, almost finish that chapter.

After my dinner, my friend and I picked one topic to do oral practice to each other.

And now, I’m writing my English article. While I have finished this, I’ll do a push-up exercise and plank exercise. And then I have finished all of my plans of this day.

So I call it an amazing day.