Nowadays we are familiar with the forward and backward function of browser, but may be little of us know the real algorithm of it. In a recent project, I have to simulate a forward-backward function for our ajax based web application. So I spend some time on the forward-backward algorithm of Chrome. Read the rest of this entry »
Posted by Wayne Wan in open source on 06-12-2011
Today, Spring AOP is widely used in transaction manage, but I found something that I had never noticed yet.
The situation was : I have a service class named KeywordExtendService , there are 2 methods in it named: "start" and "service". the service method will invoke the start method. but I config the pointcut like : execution(* com.waynewan.KeywordExtendService .start(..)) . and the transaction propagation level is "REQUIRED", so this means if there is an transaction it will use the exist one, if not it will create one. but the result is not as I guessed. when the start method invoked in the service method(no transaction configuration), there is no transaction start. Read the rest of this entry »
Posted by Wayne Wan in hadoop on 28-11-2011
During my installing of hadoop on my laptop which was based on windows7, I encountered some problems which cost me couple of hours, so I plan to write it down.
The standard process was :
- install Cygwin(must enable openSSH feature when installing).
- download Hadoop package from official site, and extract it.(PS: in my laptop, I must extract it in the directory which cygwin located, or hadoop namenode would not be started. )
- set environment variables: JAVA_HOME, HADOOP_INSTALL, add %HADOOP_INSTALL%/bin to PATH.
- open %HADOOP_INSTALL%/conf/hadoop-env.sh, add "export JAVA_HOME=***", add "export HADOOP_INSTALL=**".
- then open Cygwin terminal, type "hadoop version", if no error found ,then it's ok. if error found , check your HADOOP_INSTALL, and PATH setting.(PS: be ware of the JAVA_HOME, it is recommended that this path should not include " "(space)).
- modity core-site.xml, hdfs-site.xml, mapred-site.xml using below content:
<?xml version="1.0"?>
<!– core-site.xml –>
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost/</value>
</property>
</configuration>
<?xml version="1.0"?>
<!– hdfs-site.xml –>
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
<?xml version="1.0"?>
<!– mapred-site.xml –>
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>localhost:8021</value>
</property>
</configuration>
- configuring SSH using command: ssh-host-config , select not create private privilege account(may not the same word, but seems like it.).
then generate a new SSH key (so we can login without password, the same as hadoop running on it) .
% ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
% cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
Test with : ssh localhost ( before we can login , we must start the cygwin ssh service firstly. )
- initialize hadoop namenode using : hadoop namenode -format. if you can find "tmp/hadoop-*/dfs/name" in the directory which hadoop located, then congratulations.
- run start-all.sh (it will start namenode, jobtracker, secondary namenode, datanode). using jps command to verify if these deamon process were started successfully. also can check it by http://localhost:50030/ for the jobtracker, http://localhost:50070/ for the namenode.
In my laptop, I must change the cygwin service configuration, I must change the service logon role. (using the account which was in administrator group)
. . u
Posted by Wayne Wan in websphere on 14-07-2011
Today, when I perform the serviceDeploy on our mediation project I encountered a strange problem.I could serviceDeploy successfully manually, but not able to do it by hudson. When I used hudson to generate ear package automatically, I got deployment failed from the console, then I tried to find more details, after hours and hours later, I found there was an parameter I could used to trace the problem like the parameter of serviceDeploy.bat has.(The parameter was 'keep' ). After I turned on this switch, I found "com.ibm.etools.rmic.RMICException", the whole stacktrace were: Read the rest of this entry »
Posted by Wayne Wan in websphere on 24-02-2011
Quick post… If you are not familiar with WebSphere at first you might get confused with its concepts: cell, deployment manager, node, node agent, cluster, server, …
First of all, lets start with the concept of a Cell:
A Cell is a virtual unit that is built of a Deployment Manager and one or more nodes. I guess a picture will help making things clearer: Read the rest of this entry »
Posted by Wayne Wan in About Work, websphere on 12-01-2011
JDBCProvider向Websphere Message Broker(WMB)中需要操作数据库的node提供数据库连接服务,JDBCProvider作为一个服务被注册到指定的broker中。
这里需要涉及到的几条命令有:
- mqsideleteconfigurableservice, 用于删除一个可配置的服务对象。
例如:mqsideleteconfigurableservice MB7BROKER -c JDBCProviders -o SIMPLERROUTEDB
表示从MB7BROKER这个broker中删除type为JDBCProviders的服务(configurable service)中的名为SIMPLERROUTEDB可配置对象(configurable service object).
- mqsicreateconfigurableservice,用于创建一个可配置的服务对象(configurable service)
例如: Read the rest of this entry »
Posted by Wayne Wan in English Study on 10-07-2010
sporting house 妓院(不是“体育室”)
dead president 美钞(上印有总统头像)(并非“死了的总统”)
lover 情人(不是“爱人”)
busboy 餐馆勤杂工(不是“公汽售票员”)
busybody 爱管闲事的人(不是“大忙人”)
dry goods (美)纺织品;(英)谷物(不是“干货”)
heartman 换心人(不是“有心人”)
mad doctor 精神病科医生(不是“发疯的医生”)
eleventh hour 最后时刻(不是“十一点”)
blind date (由第三者安排的)男女初次会面(并非“盲目约会”或“瞎约会”)
Read the rest of this entry »
Posted by Wayne Wan in Java Foundation on 03-07-2010
Posted by Wayne Wan in OS Related on 22-05-2010
RPM 是 Red Hat Package Manager 的缩写,本意是Red Hat 软件包管理,顾名思义是Red Hat 贡献出来的软件包管理;在Fedora
、Redhat、Mandriva、SuSE、YellowDog等主流发行版本,以及在这些版本基础上二次开发出来的发行版采用;
RPM包里面都包含什么?里面包含可执行的二进制程序,这个程序和Windows的软件包中的.exe文件类似是可执行的;RPM包中还包括程序运行时所
需要的文件,这也和Windows的软件包类似,Windows的程序的运行,除了.exe文件以外,也有其它的文件;
一个RPM
包中的应用程序,有时除了自身所带的附加文件保证其正常以外,还需要其它特定版本文件,这就是软件包的依赖关系;依赖关系并不是Linux特有的,
Windows操作系统中也是同样存在的;比如我们在Windows系统中运行3D游戏,在安装的时候,他可能会提示,要安装Direct 9
;Linux和Windows原理是差不多的; Read the rest of this entry »
Posted by Wayne Wan in OS Related on 22-05-2010
如果在安装系统的时候是全安装,则NFS是会被直接装好的,若无法确定系统是否已经安装NFS服务器,可用用rpm命令查看是否安装portmap跟nfs-utils,如下:rpm -qa | grep portmap ,rpm -qa | grep nfs ,更精确的查询是:rpm -q portmap,rpm -q nfs-utils。若提示not installed则必须自己手动安装了。 Read the rest of this entry »