title: Apache Beam KafkaIO - Set truststore file(jks) location in Kafka consumer properties
body: <p>I am running Apache Beam Java APP in Spark Client mode using Yarn.
  On Spark submit, the jks file is getting copied to working directory of the Spark executors.
  But the reference to this path in Apache Beam KafkaIO config parameter is not working.</p>
  <p>jks file is getting copied to this Spark executor working directory :
  /users/&lt;&gt;/.staging/application-&lt;&gt;/myapp1.jks (this is hadoop fs path)</p>
  <p>In Java Apache Beam Kafka IO</p>
  <pre><code>Map&lt;String, Object&gt; props = new HashMap&lt;String, Object&gt;
  props.put(&quot;auto.offset.reset&quot;,&quot;earliest&quot;);
  props.put(&quot;enable.auto.commit&quot;,true);
  props.put(&quot;session.timeout.ms&quot;,&quot;60000&quot;);
  props.put(&quot;max.poll.records&quot;,&quot;100&quot;);
  props.put(&quot;ssl.key.passwords&quot;,&quot;mypassword&quot;);
  props.put(&quot;security.protocol&quot;,&quot;SSL&quot;);
  props.put(&quot;ssl.keystore.location&quot;,&quot;/users/&lt;user-id&gt;/.staging/application-&lt;id&gt;/myapp1.jks&quot;);
  //even tried &quot;file:/users/&lt;user-id&gt;/.staging/application-&lt;id&gt;/myapp1.jks&quot;,
  //even tried &quot;maprfs:/users/&lt;user-id&gt;/.staging/application-&lt;id&gt;/myapp1.jks&quot;, 
  //even tried directly myapp1.jks, 
  //even tried ./myapp1.jks
  
  
  PCollection&lt;String&gt; pCollection1 = pipeline.apply(KafkaIO.&lt;String, String&gt;read().withBootstrapServers(bootstrapServer)
  .withTopic(topicName)
  .withConsumerConfigUpdates(props)
  .withKeyDeserializer(StringDeserializer.class)
  .withValueDeserializer(StringDeserializer.class)
  </code></pre>
  <p>Every time KafkaIO tries to open the connection, it fails with below error:</p>
  <pre><code>org.apache.kafka.common.KafkaException: Failed to load SSL keystore myapp1.jks of type JKS
  ...
  ...
  Caused by: java.io.FileNotFoundException: myapp1.jks(No such file or directory)
  at java.io.FileInputStream.open0(Native Method)
  </code></pre>
  <p>Any pointers will be useful.</p>