You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by "Hannum, Daniel" <Da...@PremierInc.com> on 2017/05/08 13:08:47 UTC

Passing a JVM variable to a spout (or bolt)

Hi,

I see a lot of conflicting into online about this, so hopefully the experts can help. I have a secure KafkaSpout (version 1.1.0 of both Storm and storm-kafka-client) that can’t find it’s jaas.conf. The cluster itself is secure, has jaas.conf, all of that works fine. I think what I need is to be able to pass in a –D JVM parameter into a spout to point it to the jaas.conf file, but I don’t see how to do it. If I print java.security.auth.login.config from inside my spout, it’s null. supervisor.childopts does not work. I also see that Flux exists, but that looks like it’s for sending application properties, not JVM properties.

It’s also possible that I’m just using KafkaSpout wrong. I see this page

https://github.com/apache/storm/blob/master/docs/storm-kafka-client.md

But it doesn’t say how to read from a secure topic, so I’m troubleshooting myself and missing jaas.conf is the first problem I see.

Thanks for any help you can give.

Dan

Re: Passing a JVM variable to a spout (or bolt)

Posted by "Hannum, Daniel" <Da...@PremierInc.com>.
Thanks for taking the time to answer my dumb question! I missed that.

From: Paul Poulosky <pp...@yahoo-inc.com>
Reply-To: "user@storm.apache.org" <us...@storm.apache.org>, Paul Poulosky <pp...@yahoo-inc.com>
Date: Monday, May 8, 2017 at 9:31 AM
To: "user@storm.apache.org" <us...@storm.apache.org>
Subject: Re: Passing a JVM variable to a spout (or bolt)

Use the topology.worker.childopts setting to pass in jvm arguments

On Monday, May 8, 2017 8:09 AM, "Hannum, Daniel" <Da...@PremierInc.com> wrote:

Hi,

I see a lot of conflicting into online about this, so hopefully the experts can help. I have a secure KafkaSpout (version 1.1.0 of both Storm and storm-kafka-client) that can’t find it’s jaas.conf. The cluster itself is secure, has jaas.conf, all of that works fine. I think what I need is to be able to pass in a –D JVM parameter into a spout to point it to the jaas.conf file, but I don’t see how to do it. If I print java.security.auth.login.config from inside my spout, it’s null. supervisor.childopts does not work. I also see that Flux exists, but that looks like it’s for sending application properties, not JVM properties.

It’s also possible that I’m just using KafkaSpout wrong. I see this page

https://github.com/apache/storm/blob/master/docs/storm-kafka-client.md<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_storm_blob_master_docs_storm-2Dkafka-2Dclient.md&d=DwMFaQ&c=2Nw3fMGo2X8W9N0cgJ8QEE6dJUdSW43Zo0sycqQq3H0&r=qUxrE20KiMOUmgAziv_enaLH7wvWTKTNI8fz4O6YsA0&m=fZweREqdWZ3RjLUOj9hHPSB-bxylWvlLGwZL9DtUXzw&s=hkCTUFJU35ZNwxvkZrXdYgz_XMb0oj3RRkWQiisKzf4&e=>

But it doesn’t say how to read from a secure topic, so I’m troubleshooting myself and missing jaas.conf is the first problem I see.

Thanks for any help you can give.

Dan


Re: Passing a JVM variable to a spout (or bolt)

Posted by Paul Poulosky <pp...@yahoo-inc.com>.
Use the topology.worker.childopts setting to pass in jvm arguments 

    On Monday, May 8, 2017 8:09 AM, "Hannum, Daniel" <Da...@PremierInc.com> wrote:
 

  <!--#yiv7210917890 _filtered #yiv7210917890 {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv7210917890 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv7210917890 #yiv7210917890 p.yiv7210917890MsoNormal, #yiv7210917890 li.yiv7210917890MsoNormal, #yiv7210917890 div.yiv7210917890MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:Calibri;}#yiv7210917890 a:link, #yiv7210917890 span.yiv7210917890MsoHyperlink {color:#0563C1;text-decoration:underline;}#yiv7210917890 a:visited, #yiv7210917890 span.yiv7210917890MsoHyperlinkFollowed {color:#954F72;text-decoration:underline;}#yiv7210917890 span.yiv7210917890EmailStyle17 {font-family:Calibri;color:windowtext;}#yiv7210917890 span.yiv7210917890msoIns {text-decoration:underline;color:teal;}#yiv7210917890 .yiv7210917890MsoChpDefault {font-family:Calibri;} _filtered #yiv7210917890 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv7210917890 div.yiv7210917890WordSection1 {}-->Hi,    I see a lot of conflicting into online about this, so hopefully the experts can help. I have a secure KafkaSpout (version 1.1.0 of both Storm and storm-kafka-client) that can’t find it’s jaas.conf. The cluster itself is secure, has jaas.conf, all of that works fine. I think what I need is to be able to pass in a –D JVM parameter into a spout to point it to the jaas.conf file, but I don’t see how to do it. If I print java.security.auth.login.config from inside my spout, it’s null. supervisor.childopts does not work. I also see that Flux exists, but that looks like it’s for sending application properties, not JVM properties.    It’s also possible that I’m just using KafkaSpout wrong. I see this page    https://github.com/apache/storm/blob/master/docs/storm-kafka-client.md    But it doesn’t say how to read from a secure topic, so I’m troubleshooting myself and missing jaas.conf is the first problem I see.    Thanks for any help you can give.    Dan