protected TextArrayWritable queryHosts(ContentSource cs) throws IOException { return queryHosts(cs, null, null); }
@Override public void checkOutputSpecs(JobContext context) throws IOException, InterruptedException { String[] hosts = conf.getStrings(OUTPUT_HOST); if (hosts == null || hosts.length == 0) { throw new IllegalStateException(OUTPUT_HOST + " is not specified."); } for (int i = 0; i < hosts.length; i++) { try { ContentSource cs = InternalUtilities.getOutputContentSource(conf, hosts[i]); checkOutputSpecs(conf, cs); return; } catch (Exception ex) { if (ex.getCause() instanceof ServerConnectionException) { LOG.warn("Unable to connect to " + hosts[i] + " to query destination information"); continue; } else { throw new IOException(ex); } } } // No usable output hostname found at this point throw new IOException("Unable to query destination information," + " no usable hostname found"); }