摘要: 一、静态导入1.导入类的静态属性importstaticjava.lang.System.out;out.println("haha");2.导入类的静态方法import static java.lang.Math.*;//导入Math类的所有静态成员int num = abs(-10);二、基本数... 阅读全文
posted @ 2014-05-18 19:17 baoendemao 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 01packagecom.test;0203importjava.util.ArrayList;04importjava.util.Iterator;05importjava.util.List;0607publicclassT {0809publicstaticvoidmain(String[] ... 阅读全文
posted @ 2014-05-18 19:07 baoendemao 阅读(620) 评论(0) 推荐(1) 编辑
摘要: public class ArrayListDemo { public static void main(String args[]){ List list = new ArrayList(); list.add("luojiahui"); list.add("luojiafeng"); ... 阅读全文
posted @ 2014-05-18 17:01 baoendemao 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 今天在写MapReduce中的reduce函数时,碰到个问题,特此记录一下:voidreduce(key,Iterablevalues,...){for(*v:values){//做第一遍遍历}for(*v:values){//做第二遍遍历}}以上代码本以为可以直接通过,但是问题却出现了,就是在第二... 阅读全文
posted @ 2014-05-18 17:00 baoendemao 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 目前为止知道MapReduce有三种路径输入方式。1、第一种是通过一下方式输入:FileInputFormat.addInputPath(job, new Path(args[0]));FileInputFormat.addInputPath(job, new Path(args[1]));File... 阅读全文
posted @ 2014-05-18 14:35 baoendemao 阅读(179) 评论(0) 推荐(0) 编辑