title: Need Assistance regarding letter count in javardd
body: <p>I have to create a letter count program in java spark using JavaRDD just like java Wordcount. But I don't know how will be the split condition is used to separate/calculate the occurrence of each letter in a paragraph. Kindly help me with a working example in java spark thanks in advance. The working code for my javawordcount is given below...</p>
  
  <pre class="lang-java prettyprint-override"><code> JavaRDD&lt;String&gt; wordsFromFile = inputFile.flatMap(content -&gt; Arrays.asList(content.split(" ")));
  
          JavaPairRDD countData = wordsFromFile.mapToPair(t -&gt; new Tuple2(t, 1)).reduceByKey((x, y) -&gt; (int) x + (int) y);
  
  //The above condition is used for word count
  </code></pre>