(1)在shell下,操作hadoop目录,批量命名或删除,最终的命令sed的正则贪婪替换,看下面的脚本:
Java代码
# 遍历 hadoop 目录下的文件名 for line in `hadoop fs -ls /user/d1 | gawk '{ print $8 }' ` do #echo $line; #将2级目录下的文...
分类:
系统相关 时间:
2015-04-08 09:18:20
阅读次数:
190
I Hate It
Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 44713 Accepted Submission(s): 17548
Problem Description
很多学校流行一种比较的习惯。...
分类:
其他好文 时间:
2015-04-08 09:18:02
阅读次数:
181
??
A+B Coming
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 6464 Accepted Submission(s): 4248
Problem Description
Many classmates...
分类:
其他好文 时间:
2015-04-08 09:17:56
阅读次数:
117
前言:为了能够找一个代表我从零开始的诗词,我挖空心思去找,然而怎么也找不到一个贴合我心意的,被迫上了度娘也不曾找到。真想把小学一年级的语文课本拿出来好好的通读一遍,肯定能找到答案。
好了,既然找不到也不必耿耿于怀了。今天读了《高效能程序员的修炼》第四章,发现自己好烂,如果按照作者的看法,我是无论如何都入不了他的法眼,于是乎,我告诉自己,从零开始,把作者提出的面试题按照Java来写...
分类:
编程语言 时间:
2015-04-08 09:16:37
阅读次数:
276
??
Rank
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4160 Accepted Submission(s): 1616
Problem Description
Jackson wants to know...
分类:
其他好文 时间:
2015-04-08 09:16:06
阅读次数:
191
1.Two Num
2.Add Two Numbers
3.Longest Substring Without Repeating Characters...
分类:
编程语言 时间:
2015-04-08 09:14:09
阅读次数:
200
Fibonacci String
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4102 Accepted Submission(s): 1396
Problem Description
After lit...
分类:
其他好文 时间:
2015-04-08 09:12:44
阅读次数:
118
又一道DFS题,题意如下:
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
For example:
Given the below binary tree and sum
= 22,
5
...
分类:
其他好文 时间:
2015-04-08 09:12:40
阅读次数:
116
同步的前提
必须要有两个或以上的线程
必须是所有的线程使用同一个锁
这样保证同步中只能有一个线程在运行
同步的优点解决了多线程的安全问题同步的缺点多个线程判断锁,较为耗费资源class ThreadDemo1 {
public static void main(String[] args) {
Ticket tic = new Ticket();
Threa...
分类:
编程语言 时间:
2015-04-08 09:12:33
阅读次数:
149
一道DFS的题目,题意如下:
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent
a number.
An example is the root-to-leaf path 1->2->3 which represents the number 1...
分类:
其他好文 时间:
2015-04-08 09:12:29
阅读次数:
107