ITeye博客

Huangchp

hcp1101 · 共 4 篇文章

Mac OS 系统安装Hadoop

最近在学习Hadoop,在学习伪分布式,单节点配置时总是报下面的错误。 2013-03-17 15:14:27,166 WARN org.apache.hadoop.hdfs.DFSClient: DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /tmp/hadoop-huang/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1 at org.apache…

2013-03-17 15:52 · hadoop · 评论(0)

erlang第一次接触

今天第一次接触Erlang,先说说它的安装吧,Windows系统不用多说,主要说说非Windows系统的安装 1.下载Erlang源码,我使用的是R15B03版本。 2.将该包解压,通过命令行进入该目录。 3.执行以下命令: $./configure $ make $ sudo make install 4.在控制台输入erl,如果进入表示安装成功。 5.退出,使用control+c,选择a退出。

2013-02-26 17:38 · Erlang · 评论(0)

替换对象中为空的属性值

之前在做REST方面的开发,数据传输格式使用JSON,遇到一些很麻烦的事:接收的数据并非标准格式的JSON或者不知道标准格式,比如:{"id":null, "name":null},这样在JSON与对象的相互转换就会出现异常,所以我想在对象转换前后将对象中的属性值替换,变产生了以下代码。 public static Object checkObjectFieldValue(Object obj) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (obj != nul…

2013-02-22 17:12 · Java · 评论(0)

接触IOS的第一个组件UILabel

1.text:设置标签显示文本。 2.attributedText:设置标签属性文本。 NSString *text = @"first"; NSMutableAttributedString *textLabelStr = [[nsmutableattributedstring alloc] initWithString:text]; [textlabelstr setattributes:@{nsforegroundcolorattributename : [uicolor lightgraycolor], NSFontAttributeName : [uifont systemfont…

2013-02-20 11:54 · IOS · 评论(0)