Posts Tagged ‘Java’

Install Hadoop with CDH4 MapReduce v1

A quick note for installing Hadoop with CDH4 MapReduce v1 on Ubuntu. Step 1: Add CDH4 repository Create a new file /etc/apt/sources.list.d/cloudera.list with the following contents: deb [arch=amd64] http://archive.cloudera.com/cdh4/<OS-release-arch><RELEASE>-cdh4 contrib deb-src http://archive.cloudera.com/cdh4/<OS-release-arch><RELEASE>-cdh4 contrib where: <OS-release-arch> is debian/squeeze/amd64/cdh , ubuntu/lucid/amd64/cdh , or ubuntu/precise/amd64/cdh , and <RELEASE> is the name of your distribution, which you can find …

Continue Reading...

JPA Repository – makes your data access layer easy

This is a small open source project I’ve created to implement repository programming model with JPA 2 and Specification pattern, it provides a simple and easy way to build the data access layer. The source code is hosted at GitHub https://github.com/duydo/jpa-repository, If you have any suggestion or feedback, don’t hesitate to drop me a line …

Continue Reading...

Effective JPA: Use Enumeration Effectively

How to persist an enumeration effectively? Here is my experience.

Continue Reading...

Fluent Interface

Recently, I’ve played with my own  framework. I found a new term, called “Fluent Interface“. There is a great article on bliki of Martin Fowler about this term, you can read it if you have not heard about it yet. The idea of  “Fluent Interface” is instead of returning void in  setter methods of an …

Continue Reading...

ByteTokenizer – a Java class util By Me

Vì nhu cầu để decode các gói tin của Yahoo Messenger nên mình viết thư viện ByteTokenize để sử dụng parse mảng các bytes (bytes array). Class ByteTokenizer tương tự như class java.util.StringTokenizer. ——————————————————————————– In order to decode Yahoo Messenger packet received from Yahoo Messenger server, I’ve coded class ByteTokenizer, as java.util.StringTokenizer class. This class …

Continue Reading...