hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Streckfus, William [USA]" <streckfus_will...@bah.com>
Subject RE: DBOutputFormat - Communications link failure
Date Tue, 14 Apr 2009 21:23:18 GMT
Responding to this for archiving purposes...

After being stuck for a couple hours I then realized that localhost meant a
different machine as it ran on different reducers :). Thus, replacing that
with the IP address did the trick.

-----Original Message-----
From: Streckfus, William [USA] [mailto:streckfus_william@bah.com] 
Sent: Tuesday, April 14, 2009 4:45 PM
To: core-user@hadoop.apache.org
Subject: DBOutputFormat - Communications link failure

Hey guys,
I'm trying my hand at outputting into a MySQL table but I'm running into a
"Communications link failure" during the reduce (in the
getRecordReader() method of DBOutputFormat to be more specific). Google
tells me this seems to happen when a SQL server drops the client (usually
after a period of time) but I'm wondering why that would be the case here. I
also threw in a cookie cutter connection at the beginning of my driver and
that seems to be connecting fine:

Connection conn = null;
try {
    conn = DriverManager.getConnection("jdbc:mysql://localhost/wiki",
"user", "pass");
    System.out.println ("Database connection established");
} catch (Exception e) {

Here's the main snippet:
        conf.setOutputKeyClass(TermFrequencyWritable.class); // My

        DBConfiguration.configureDB(conf, "com.mysql.jdbc.Driver",
"jdbc:mysql://localhost/wiki", "user", "pass");
        DBOutputFormat.setOutput(conf, "table", "word", "docid",
Has anyone encountered this before or know where this is going wrong?
- Bill

View raw message