Gilad Chaplik has posted comments on this change.

Change subject: engine: show the errors from external scheduler in the event log
......................................................................


Patch Set 3:

(5 comments)

if you let me I'd to verify as well :)

http://gerrit.ovirt.org/#/c/24662/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/BalanceResult.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/BalanceResult.java:

Line 6: import java.util.LinkedList;
Line 7: import java.util.List;
Line 8: 
Line 9: /**
Line 10:  * Created by jmoskovc on 2/18/14.
it's not common to add author :)
Line 11:  */
Line 12: public class BalanceResult extends SchedulerResult {
Line 13:     private Pair<List<Guid>, Guid> balanceResult = null;
Line 14:     private List<Guid> underUtilizedHosts = null;


Line 12: public class BalanceResult extends SchedulerResult {
Line 13:     private Pair<List<Guid>, Guid> balanceResult = null;
Line 14:     private List<Guid> underUtilizedHosts = null;
Line 15:     private Guid vmToMigrate = null;
Line 16:     private Pair<List<Guid>, Guid> balancingData = null;
minor: no need to assign refernce objects with null
Line 17: 
Line 18:     public void addHost(Guid host) {
Line 19:         if (underUtilizedHosts == null) {
Line 20:             underUtilizedHosts = new LinkedList<>();


Line 16:     private Pair<List<Guid>, Guid> balancingData = null;
Line 17: 
Line 18:     public void addHost(Guid host) {
Line 19:         if (underUtilizedHosts == null) {
Line 20:             underUtilizedHosts = new LinkedList<>();
in general, it's more common to use arraylist.
Line 21:         }
Line 22: 
Line 23:         underUtilizedHosts.add(host);
Line 24:     }


http://gerrit.ovirt.org/#/c/24662/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerBrokerImpl.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerBrokerImpl.java:

Line 79: 
Line 80:             XmlRpcClient client = new XmlRpcClient();
Line 81:             client.setConfig(config);
Line 82:             Object xmlRpcStruct = client.execute(FILTER, 
createFilterArgs(filterNames, hostIDs, vmID, propertiesMap));
Line 83:             return 
ExternalSchedulerBrokerObjectBuilder.getFilteringResult(xmlRpcStruct).getHosts();
does getFilterResult() null safe?
Line 84: 
Line 85:         } catch (XmlRpcException e) {
Line 86:             log.error("Could not communicate with the external 
scheduler while filtering", e);
Line 87:             auditLogFailedToConnect();


http://gerrit.ovirt.org/#/c/24662/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/SchedulerResult.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/SchedulerResult.java:

Line 13:     private int resultCode = 0;
Line 14:     private LinkedList<String> errorMessages = null;
Line 15: 
Line 16:     public Map<String, List<String>> getPluginErrors() {
Line 17:         return this.pluginErrors;
personally I think that 'this' is redundant
Line 18:     }
Line 19: 
Line 20:     public void addPluginErrors(String pluginName, String 
errorMessage) {
Line 21:         if (pluginErrors == null) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idd4dbe269d2885a6be04b82a3e2320c4f96c2387
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Jiří Moskovčák <jmosk...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Jiří Moskovčák <jmosk...@redhat.com>
Gerrit-Reviewer: Kobi Ianko <k...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
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