Hi All,

I am newbie to Storm Community and intend to learn Storm and willing to
contribute to Storm development efforts.

I have done some initial ground work in terms of going through the
contribution documents (
https://storm.apache.org/contribute/Contributing-to-Storm.html). I have
also setup development environment on IntelliJ and trying to browse through
the codebase.

As a next step, I picked up a newbie task to work on. I am trying to work on
https://issues.apache.org/jira/browse/STORM-1985

Few questions on this tasks:
1. Do we need to create a standalone tool or add this feature to an
existing tool.
2. Please confirm if this feature is only applicable to HA Nimbus.

I am tried to come up with pseudo code to verify solution approach.

---------------------------------------------------------------------------------------------
Iterator<String> getCorruptTopologyList(boolean shouldKillCorrupt) {
Map conf = ConfigUtil.readStormConfig();
ClientBlobStore clientBlobStore = Utils.getClientBlobStore(conf);
Iterator<String> blobStoreTopologyIds = clientBlobStore.listKeys();
Set<String> activeTopologyIds = new HashSet<>(Zookeeper.getChildren(zk,
conf.get (Config.STORM_ZOOKEEPER_ROOT) + ClusterUtils.STORMS_SUBTREE,
false));
  Set<String> corruptTopologies =
differenceInTopologies(activeTopologyIds.iterator(),
blobStoreTopologyIds);

if(shouldKillCorrupt) {
Client client = NimbusClient.getConfiguredClient(conf).getClient();
                 Iterstor iter = corruptTopologies.iterator();
while(iter.hasNext()) {
client.killTopology(iter.next())
}
}
return corruptTopologies.iterator();
}
--------------------------------------
I appreciate if someone answer queries and guide me  on my approach for
this task.

Thanks,
--Kamal

Reply via email to