I was looking for how to kill a topology from a storm bolt in storm 1.2.1
in my scala project.
From this answer, I wrote following code to do it:
private def shutTopology(){
import org.apache.storm.utils.Utils
import org.apache.storm.utils.NimbusClient
val conf = Utils.readStormConfig
val nimbusClient =
NimbusClient.getConfiguredClient(conf).getClient
nimbusClient.deactivate(topology_name)
}
But it given following error in line: val conf = Utils.readStormConfig
, How to resolve this?
Error:(46, 17) package daemon contains object and package with same name: nimbus
one of them needs to be removed from classpath
val conf = Utils.readStormConfig
I get above error by compiling via both sbt
and mvn
. I see some description for this here but not much help on how to resolve this.
Edit:
Based on the answer here, I was able to compile this in sbt
using following scalac
options:
"-Yresolve-term-conflict:object"
I am stil not able to get this done how to resolve this error when compiling with maven.