Storm: how to define HDFS URI in HdfsBolt() with a HA HDFS
<p>I'm trying to use <code>HdfsBolt</code> to write the output of a Storm topology into a HA enabled HDFS. The topology definition is as follows:</p>

<pre><code>// Use pipe as record boundary
RecordFormat format = new DelimitedRecordFormat().withFieldDelimiter("|");
//Synchronize data buffer with the filesystem every 1000 tuples
SyncPolicy syncPolicy = new CountSyncPolicy(1000);
// Rotate data files when they reach five MB
FileRotationPolicy rotationPolicy = new FileSizeRotationPolicy(5.0f, FileSizeRotationPolicy.Units.MB);
// Use default, Storm-generated file names
FileNameFormat fileNameFormat = new DefaultFileNameFormat().withPath("/foo");

HdfsBolt hdfsBolt = new HdfsBolt()
      .withFsUrl("hdfs://devhdfs")
      .withFileNameFormat(fileNameFormat)
      .withRecordFormat(format)
      .withRotationPolicy(rotationPolicy)
      .withSyncPolicy(syncPolicy);
</code></pre>

<p>The problem is that <code>HdfsBolt</code> is not aware of the value of <code>hdfs://devhdfs</code> and that triggers a <code>java.net.UnknownHostException</code>:</p>

<pre><code>Caused by: java.lang.IllegalArgumentException: java.net.UnknownHostException: prehdfs
</code></pre>

<p>I have the original <em>core-site.xml</em> where that definition is present, but I don't know how to pass it to <code>HdfsBolt</code>. Any hints?</p>