Skip to content

Conversation

@hustfxj
Copy link
Contributor

@hustfxj hustfxj commented Feb 5, 2016

  1. port cluster.clj to ClusterUtils/StormClusterState/StateStorage/ZKStateStorage/ZKStateStorageFactory
  2. Update all the callings to cluster
  3. Mock the java static functions for test purposes.

}

public StormClusterState mkStormClusterStateImpl(Object StateStorage, List<ACL> acls, ClusterStateContext context) throws Exception {
if (StateStorage instanceof StateStorage) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you rename StateStorage variable to stateStorage (camel case)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Conflicts:
	storm-core/src/clj/org/apache/storm/cluster.clj
	storm-core/src/clj/org/apache/storm/cluster_state/zookeeper_state_factory.clj
	storm-core/src/clj/org/apache/storm/command/dev_zookeeper.clj
	storm-core/src/clj/org/apache/storm/daemon/common.clj
	storm-core/src/clj/org/apache/storm/daemon/executor.clj
	storm-core/src/clj/org/apache/storm/daemon/nimbus.clj
	storm-core/src/clj/org/apache/storm/daemon/supervisor.clj
	storm-core/src/clj/org/apache/storm/stats.clj
	storm-core/src/clj/org/apache/storm/testing.clj
	storm-core/src/clj/org/apache/storm/thrift.clj
	storm-core/src/clj/org/apache/storm/util.clj
	storm-core/src/clj/org/apache/storm/zookeeper.clj
	storm-core/test/clj/integration/org/apache/storm/integration_test.clj
	storm-core/test/clj/org/apache/storm/cluster_test.clj
	storm-core/test/clj/org/apache/storm/nimbus_test.clj
	storm-core/test/clj/org/apache/storm/supervisor_test.clj
@hustfxj
Copy link
Contributor Author

hustfxj commented Feb 16, 2016

@revans2 @abhishekagarwal87 can you help review these commits ?

@zhuoliu
Copy link

zhuoliu commented Feb 16, 2016

We would also like @knusbaum to review this one.

(finally
(.shutdown blob-store)))
(FileUtils/moveDirectory (File. tmproot) (File. stormroot))
(try (FileUtils/moveDirectory (File. tmproot) (File. stormroot)) (catch Exception e))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we ignoring this exception now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I forget remove the “try”. It can't pass testing at "FileUtils/moveDirectory" because the windows operating system. I will ignore this exception per test.

@revans2
Copy link
Contributor

revans2 commented Feb 19, 2016

@hustfxj OK I will try to get through the entire thing today. So we can get it in soon.

public static List<ACL> mkTopoOnlyAcls(Map topoConf) throws NoSuchAlgorithmException {
List<ACL> aclList = null;
String payload = (String) topoConf.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD);
if (Utils.isZkAuthenticationConfiguredStormServer(topoConf)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be isZkAuthenticationConfiguredTopology not isZkAuthenticationConfiguredStormServer.
Original code is
(when (Utils/isZkAuthenticationConfiguredTopology topo-conf)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@revans2 Thank you. I have addressed your comments.

return executorWhb;
}

public IStormClusterState mkStormClusterStateImpl(Object stateStorage, List<ACL> acls, ClusterStateContext context) throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we split this and mkStormClusterState into two methods? The signature of each are different enough that having them be separate is preferable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. But it should be update into two methods after finishing some tests. Because it may happen some problems at tests when it has two methods.For example, (.mkStormClusterStateImpl (Mockito/verify cluster-utils (Mockito/times 1)) (Mockito/any) (Mockito/eq expected-acls) (Mockito/any))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK we can leave it for now. But please file a follow on JIRA so we can clean it up later.

@revans2
Copy link
Contributor

revans2 commented Feb 23, 2016

OK I made it all of the way through. Things look fairly good, but there are a few places that need to be updated/fixed.

@hustfxj
Copy link
Contributor Author

hustfxj commented Feb 24, 2016

@revans2 Thank you again. I have addressed your comments.

@revans2
Copy link
Contributor

revans2 commented Feb 24, 2016

+1 looks god to me. Did some manual testing and things look good.

@asfgit asfgit merged commit 0af6799 into apache:master Feb 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants