Liran Zelkha has posted comments on this change.

Change subject: core: monitoring - Create a VM manager to co-ordinate 
monitoring and commands
......................................................................


Patch Set 8:

(8 comments)

http://gerrit.ovirt.org/#/c/28173/8/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java:

Line 126:             }
Line 127:         }
Line 128: 
Line 129:         removeMemoryVolumes();
Line 130:         ResourceManager.getInstance().onVmDelete(getVmId());
Injection
Line 131:         return true;
Line 132:     }
Line 133: 
Line 134:     private void removeMemoryVolumes() {


http://gerrit.ovirt.org/#/c/28173/8/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java:

Line 263:         }
Line 264:     }
Line 265: 
Line 266:     private void cacheVds() {
Line 267:         vds = DbFacade.getInstance().getVdsDao().get(getVdsId());
Inject
Line 268:         setMonitoringNeeded();
Line 269:     }
Line 270: 
Line 271:     @OnTimerMethodAnnotation("vmsMonitoring")


Line 712: 
Line 713:     public void dispose() {
Line 714:         log.info("vdsManager::disposing");
Line 715:         SchedulerUtilQuartzImpl.getInstance().deleteJob(onTimerJobId);
Line 716:         
SchedulerUtilQuartzImpl.getInstance().deleteJob(vmsMonitoringJobId);
Inject
Line 717:         if (VdsServerWrapper.class.isInstance(vdsProxy)) {
Line 718:             XmlRpcUtils.shutDownConnection(((VdsServerWrapper) 
vdsProxy).getHttpClient());
Line 719:         } else {
Line 720:             ((JsonRpcVdsServer) vdsProxy).close();


Line 901:         mBeforeFirstRefresh = value;
Line 902:     }
Line 903: 
Line 904:     public int getMemCommited() {
Line 905:         return this.memCommited.get();
no need for this
Line 906:     }
Line 907: 
Line 908:     public int getVmsCoresCount() {
Line 909:         return this.vmsCoresCount.get();


Line 905:         return this.memCommited.get();
Line 906:     }
Line 907: 
Line 908:     public int getVmsCoresCount() {
Line 909:         return this.vmsCoresCount.get();
no need for this
Line 910:     }


http://gerrit.ovirt.org/#/c/28173/8/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmManager.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmManager.java:

Line 72:     private VmNetworkStatisticsDao getVmNetworkStatisticsDao() {
Line 73:         return db().getVmNetworkStatisticsDao();
Line 74:     }
Line 75: 
Line 76:     protected DbFacade db() {
Inject
Line 77:         return DbFacade.getInstance();
Line 78:     }


http://gerrit.ovirt.org/#/c/28173/8/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmsMonitoring.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmsMonitoring.java:

Line 124:         UNCHANGEABLE_FIELDS_BY_VDSM = 
Collections.unmodifiableList(tmpList);
Line 125:     }
Line 126: 
Line 127:     public VmsMonitoring(VdsManager vdsManager) {
Line 128:         //TODO this query for vds is heavy and redundant -
How often is this called? 
The performance should be the responsibility of the DAO, not VmsMonitoring
Line 129:         //TODO vds will be changed to VdsStatic or even a mini view 
entity -
Line 130:         //TODO there is no need to fetch the whole entity,
Line 131:         //TODO this means removing VDS from parameters classes of 
VdsBrokerCommands
Line 132:         vds = getDbFacade().getVdsDao().get(vdsManager.getVdsId());


Line 128:         //TODO this query for vds is heavy and redundant -
Line 129:         //TODO vds will be changed to VdsStatic or even a mini view 
entity -
Line 130:         //TODO there is no need to fetch the whole entity,
Line 131:         //TODO this means removing VDS from parameters classes of 
VdsBrokerCommands
Line 132:         vds = getDbFacade().getVdsDao().get(vdsManager.getVdsId());
Inject
Line 133:         this.vdsManager = vdsManager;
Line 134:         this.vmDict = 
getDbFacade().getVmDao().getAllRunningByVds(vds.getId());
Line 135:         vmManagers = new HashMap<>(vmDict.size()); // max size is the 
one's that in the db
Line 136:     }


-- 
To view, visit http://gerrit.ovirt.org/28173
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54c6091a3996c23a4b70c7ef89412d34f1b58e34
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskri...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to