摘要: 在安装完hadoop后跑example,结果抛出异常java.lang.OutOfMemoryError: Java heap space下面是在stackoverflow上看到的解决办法:1、don't forget to execute "ssh localhost" first. Believe or not! No ssh would throw an error message on Java heap space as well(我就是因为这个原因抛异常)2、For anyone using RPM or DEB packages, the docume 阅读全文
posted @ 2013-04-01 17:28 mender 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 在opensuse中安装hadoop抛异常:ERROR security.UserGroupInformation: PriviledgedActionException as:hadoop cause:java.net.UnknownHostException: hadoop: hadoop解决办法:将/etc/HOSTNAME里的主机复制到/etc/hosts中,注意格式例如HOSTNAME中为:hadoop则在hosts中添加:192.168.186.136 hadoop(格式:ip hostname) 阅读全文
posted @ 2013-04-01 15:53 mender 阅读(778) 评论(0) 推荐(1) 编辑
摘要: 复试终于结束了,唉。。一言难尽 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 void test1_1_swap(char *pa, char *pb) 5 { 6 //由于传入的实参是数组地址,它是一个char* const类型, 7 //即数组的首地址是无法被修改的,所以这种直接交换首地址的方法是不可行的 8 //char *temp; 9 //temp = pa; 10 //pa = pb; 11 //pb = temp; 12 ... 阅读全文
posted @ 2013-03-22 17:50 mender 阅读(478) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main() 5 { 6 int i = 1, j = 1; 7 for(; i <= 5; i++) 8 { 9 for(j = 1; j <= 5 - i; j++)10 {11 printf("%s", " ");12 }13 for(j = 1; j <= 2 * i - 1; j++)14 {15 printf("%s", "*... 阅读全文
posted @ 2013-03-17 23:19 mender 阅读(120) 评论(0) 推荐(0) 编辑
摘要: C语言中sizeof是一个运算符,strlen是string.h中的库函数sizeof计算的是变量申请的内存空间大小,strlen计算的是数组从第一个位置到'\0'所占的内存大小 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 5 void fun(char* a) 6 { 7 printf("fun:: sizeof(a) = %d\tstrlen(a) = %d\n", sizeof(a), strlen(a)); 8 int i = 阅读全文
posted @ 2013-03-17 21:29 mender 阅读(149) 评论(0) 推荐(0) 编辑