On Tue, Dec 9, 2008 at 4:56 PM, Brett Henderson <span dir="ltr"><<a href="mailto:brett@bretth.com">brett@bretth.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Karl Newman wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The SRTM data has no timestamps, which is causing the problem. So you only need to set enableDateParsing=false for that file. It might be good to show a warning if an entity has no timestamp attribute in the XML. I propose adding the following lines in BaseElementProcessor.java:<br>
<br>
+ private static final Logger log = Logger.getLogger(BaseElementProcessor.class.getName());<br>
<br>
...<br>
<br>
protected TimestampContainer createTimestampContainer(String data) {<br>
if (enableDateParsing) {<br>
+ if (data == null || data == "") {<br>
+ log.warning("Element missing timestamp attribute.");<br>
+ }<br>
return new UnparsedTimestampContainer(timestampFormat, data);<br>
} else {<br>
return dummyTimestampContainer;<br>
}<br>
}<br>
</blockquote></div>
Cool, I agree that this is the place to do it. It avoids subsequently fail 3 tasks down the pipeline because input data was dodgy.<br>
<br>
I'd rather not just log a warning though because nobody reads them and it's going to fail anyway. I'd prefer to just make it abort at that point.</blockquote><div><br>The reason I went with a warning instead of an exception is that I thought there were some possible downstream tasks that didn't need the timestamps. But that's an oddball file that doesn't have timestamps, anyway, so maybe an exception is the right way to go.<br>
<br>Karl<br></div></div>