Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed the problem with NullPointerException masking the actual proble…

…m with the connection.

git-svn-id: https://hadoopdb.svn.sourceforge.net/svnroot/hadoopdb/trunk@22 2ab80ee8-dcc6-4802-a23e-3bfff869ab2a
  • Loading branch information...
commit f4ed1e394b35d4e7995fe336be90ca9f2021452d 1 parent 44057bb
kbajda authored
View
5 src/java/edu/yale/cs/hadoopdb/connector/AbstractDBRecordReader.java
@@ -161,8 +161,11 @@ protected Connection getConnection(DBInputSplit dbSplit) {
LOG.info("Data locality failed for " + localHostAddr);
chunk_host = chunk.getAnyHost(avoid_host);
} else {
- if (avoid_host != chunk.getHost(localHostAddr))
+ if (avoid_host != chunk.getHost(localHostAddr)) {
chunk_host = chunk.getHost(localHostAddr);
+ } else {
+ chunk_host = chunk.getAnyHost(avoid_host);
+ }
}
LOG.info("Task from " + localHostAddr + " is connecting to chunk "
+ chunk.getId() + " on host " + chunk_host.getHost()
Please sign in to comment.
Something went wrong with that request. Please try again.