Tuesday, January 11, 2011

How to avoid excessive logging when using Hive JDBC

By default, the Hive JDBC driver outputs a HUGE amount of log messages at the INFO log level.  That makes it very hard to track the log statements added by you.  I spent quite some time trying to change the log level to ERROR by tinkering with the hive-log4j.properties and hive-exec-log4j.properties files.   This approach was not successful. The Hive JDBC driver does not seem to read these log4j config files.  Hence, in order to change the log level, you must add the following lines near the beginning of your program:

from org.apache.log4j import Logger as Logger
from org.apache.log4j import Level as Level
rootLogger = Logger.getRootLogger()

Note: The above code is in Jython.  Something very similar will work in Java.

Sunday, January 02, 2011

Frync: My first android app

During my 5 years at grad school, I used to call a different friend almost every day during my 45-minute walks to and from my lab.  I used to be in touch with a lot of people, and it felt wonderful.  For the past 1.5 years, I have been working at a startup. I now find myself woefully out of sync with most of my friends.  The reason is simple: There are too many things going on all the time that I forget to call my friends (and relatives).

That was the motivation for writing my first Android app - Frync.  Frync stands for Friend Sync.  In Frync, you associate the contacts in your phone's address book with the frequency at which you wish to call them -- for example, Every Day, Every Week, Every Month, etc.  Frync automatically tracks your phone call activity, and reminds you to call the friends whom you have not talked to at the desired frequency.  You can install Frync from the Android market: market://details?id=danjo.frm.  Screenshots of Frync are at www.frync.com.

According to Techcrunch, The Phone Call is Dead (although Economist disagrees).  Text-based modes of communication like SMS, Tweets and Facebook messages are going to dominate the future.   In the future, I hope to expand Frync into a more powerful Friend Relationship Management tool that will help you to be in sync with friends across multiple modes of communication.