How to deploy Spark Streaming application?
<p>I need to deploy a Spark Streaming application on Linux server.</p>

<p>Can anyone provide the steps to how to deploy and what code modification require before deploy?</p>

<pre><code>class JavaKafkaWordCount11 {
    public static void main(String[] args) {
        StreamingExamples.setStreamingLogLevels();

        SparkConf sparkConf = new SparkConf()
                .setAppName("JavaKafkaWordCount11")
                .setMaster("local[*]");
        sparkConf.set("spark.streaming.concurrentJobs", "20");

        JavaStreamingContext jssc = new JavaStreamingContext(sparkConf, new Duration(1500));

        Map&lt;String, Integer&gt; topicMap = new HashMap&lt;&gt;();
        topicMap.put("TopicQueue", 20);
        JavaPairReceiverInputDStream&lt;String, String&gt; messages =
                KafkaUtils.createStream(jssc, "x.xx.xxx.xxx:2181", "1", topicMap);
        JavaDStream&lt;String&gt; lines = messages.map(new Function&lt;Tuple2&lt;String, String&gt;, String&gt;() {
            @Override
            public String call(Tuple2&lt;String, String&gt; tuple2) {
                return tuple2._2();
            }
        });
        lines.foreachRDD(rdd -&gt; {
            if (rdd.count() &gt; 0) {
                List&lt;String&gt; strArray = rdd.collect();
                getProcessResult(strArray);
            }
        });
    }
}
</code></pre>