Split a large text file on a delimiter using Spark
<p>I have text file where entries (log events) are not split by new lines. Unfortunately everything is over a single line:</p>
<blockquote>
<p>Info|[Log] iffidfdfdfdfdfd
testst ddedede dede  dedededed
warning|[Log] etststs dedessdsds
trtrtrtrtrtrtrtr
Error| [Log]  tetdtetdetddeded
dededededededed    dedededededededede</p>
</blockquote>
<p>My goal is to split this one huge line into different lines per log event:</p>
<blockquote>
<p>Info|[Log] iffidfdfdfdfdfd testst ddedede dede  dedededed</p>
<p>warning|[Log] etststs dedessdsds trtrtrtrtrtrtrtr</p>
<p>Error| [Log] tetdtetdetddeded dededededededed dedededededededede</p>
</blockquote>