Reading / Writing in Java

Friends reading & writing operation in java is very easy. To write to a file : File f = new File(“/location/of/file.txt”); if(!f.exists()) { f.createNewFile(); } FileWriter fw = new FileWriter(f,true); //true meaning allow append BufferedWriter wr = new BufferedWriter(fw); wr.write(token); wr.close(); fw.close(); To read file: String data=””; String final_data=””; File f = new File(“/location/of/file.txt”); if (f.exists()) … More Reading / Writing in Java

BoneCP connection pooling – Some useful Tips

Friends , while developing an application which require high availability of application. It is often a requirement to use any kind of connection pooling. BoneCP connection pooling is a database connection pooling which has a good features that i have explained in my earlier post.There are some minor fine tuning require to work with BoneCP. … More BoneCP connection pooling – Some useful Tips

Pig – Functions

Friends , Functions in Pig come in four types 1. Eval function – A function that takes one or more expressions and returns another expression. – Some function are aggregate function like MAX – Some functions are algebraic, which means that the result of the function may be calculated incrementally. – In MapReduce term algebric … More Pig – Functions

Pig – A programmer friendly MapReduce tool

Pig raises the level of abstraction for processing large datasets. MapReduce allow you , to specify map function followed by reduce function , but working out how to fit your data processing into this pattern , which often require multiple MapReduce stages, can be a challange. Pig supports richer data structure, typically being multivalued & … More Pig – A programmer friendly MapReduce tool

Java8 new Features

Friends with introduction of java8 many new features has been added to it which has bring revolution to java language. The list is given below. Lambda Expression: You can find the good tutorial in below link – Default methods enable new functionality to be added to the interfaces of libraries and ensure binary compatibility … More Java8 new Features

Database Connection Pooling

 Friends in software engineering, a connection pool is a cache of database connections maintained so that the connections can be reused when future requests to the database are required. There are various types of Connection pooling. which are listed below. 1. DBCP2 Connection pooling 2. BoneCP 3. HikariCP 4. C3PO By … More Database Connection Pooling