Skip to content

Removed unused code from the EngineHostDao Implementation - #942

Merged
asfgit merged 1 commit into
apache:masterfrom
rafaelweingartner:lrg-cs-hackday-011
Dec 2, 2015
Merged

asfgit merged 1 commit into
apache:masterfrom
rafaelweingartner:lrg-cs-hackday-011

Conversation

@cristofolini

Copy link
Copy Markdown
Contributor

After analysing the code within the EngineHostDaoImpl class, we noticed that methods:
countBy;
findByGuid;
findAndUpdateDirectAgentToLoad;
findAndUpdateApplianceToLoad;
markHostsAsDisconnected;
listAllUpAndEnabledNonHAHosts;
findLostHosts;
getRunningHostCounts;
getNextSequence;
countRoutingHostsByDataCenter;
updateResourceState;
findByTypeNameAndZoneId;
findHypervisorHostInCluster;
lockOneRandomRow;

And variables:
status_logger;
state_logger;

Have no usage. Thus, in order to clean up the code, we decided to remove them from EngineHostDaoImpl and its interface (EngineHostDao).
All of EngineHostDaoImpl's attributes were set to private, given that they are not accessed by any other class.

@wido

wido commented Oct 27, 2015

Copy link
Copy Markdown
Contributor

Based on the fact that all the code builds and the UnitTests are also running properly I can give this one a LGTM

@cristofolini
cristofolini force-pushed the lrg-cs-hackday-011 branch 2 times, most recently from 31a5d5a to 161412c Compare November 22, 2015 17:54
@cristofolini

Copy link
Copy Markdown
Contributor Author

I've pushed another commit to bring this PR up to date with the latest snapshot but it seems the Travis build had some issues sorting out some dependencies. What would be the best course of action at this point? Is a forced push in order, just to get the build started again, or is there a more "elegant" solution to this? :)

@DaanHoogland

Copy link
Copy Markdown
Contributor

@cristofolini you can force push, more important is that the regression suites are run on it. ping @remibergsma ?

@DaanHoogland

Copy link
Copy Markdown
Contributor

I had to run one test a couple of times it is bugging us lately:

942.network.results.txt
942.vpc.results.txt

Test destroy(expunge) Virtual Machine ... === TestName: test_09_expunge_vm | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 1 test in 534.295s

OK

LGTM

@yadvr

yadvr commented Dec 2, 2015

Copy link
Copy Markdown
Member

LGTM (only code review)

@remibergsma

Copy link
Copy Markdown
Contributor

@DaanHoogland That expunge issue is now resolved in the integration tests, my bad :-s

@asfgit
asfgit merged commit 4a34901 into apache:master Dec 2, 2015
asfgit pushed a commit that referenced this pull request Dec 2, 2015
Removed unused code from the EngineHostDao Implementation After analysing the code within the EngineHostDaoImpl class, we noticed that methods:
countBy;
findByGuid;
findAndUpdateDirectAgentToLoad;
findAndUpdateApplianceToLoad;
markHostsAsDisconnected;
listAllUpAndEnabledNonHAHosts;
findLostHosts;
getRunningHostCounts;
getNextSequence;
countRoutingHostsByDataCenter;
updateResourceState;
findByTypeNameAndZoneId;
findHypervisorHostInCluster;
lockOneRandomRow;

And variables:
status_logger;
state_logger;

Have no usage. Thus, in order to clean up the code, we decided to remove them from EngineHostDaoImpl and its interface (EngineHostDao).
All of EngineHostDaoImpl's attributes were set to private, given that they are not accessed by any other class.

* pr/942:
  Removed unused code from the EngineHostDao Implementation.

Signed-off-by: Remi Bergsma <github@remi.nl>
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