JPA SequenceGenerator with allocationSize 1 performance tuning

I had a blog last year about fixing the sequence number going wild by setting the allocationSize to 1. Overall it solves the inconsistency problem if you are using a sequence with ‘INCREMENT BY’ value 1 in database. Issue One problem comes up today is I am facing some performance issue with the above setting when I…

Generate Large file via Hive JDBC

Recently in our project, we have a requirement of generating comparatively large file via Hive JDBC for web app user to download, by large I mean millions of rows. Since our previous use case are all small files containing less than maybe 50000 rows, our approach is grabbing them all into memory and dump into file….

OSX auto cleanup tmp ignore dir

Was putting some project related configs into the OS X /tmp directory, but found it was deleted. Turns out OS X has system scheduled cleanup job for the tmp dir. The config is under ‘/etc/defaults/periodic.conf‘. I was first trying to leverage the provided ‘daily_clean_tmps_ignore’ parameter to exclude my directory but found not working, have to…