There was a recent change to the LoadBalancerStatsReader that is resulting
in a build error:

-    int getInFlightRequestCount(String clusterId);
+    int getInFlightRequestCount(String clusterId, String partitionId);


This is the build error:


Waiting for Jenkins to finish collecting data[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
(default-compile) on project
org.apache.stratos.load.balancer.extension.api: Compilation failure [ERROR]
/var/lib/jenkins/jobs/stratos/workspace/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/LoadBalancerInFlightRequestCountNotifier.java:[62,86]
error: method getInFlightRequestCount in interface LoadBalancerStatsReader
cannot be applied to given types; [ERROR] -> [Help 1] [ERROR]

I've put a temporary fix into LoadBalancerInFlightRequestCountNotifier by
providing an empty partitionId string value:

   @Override
    public void run() {
        while (!terminated) {
            try {
                try {
                    Thread.sleep(statsPublisherInterval);
                } catch (InterruptedException ignore) {
                }

                if (statsPublisher.isEnabled()) {
                    for (Service service :
TopologyManager.getTopology().getServices()) {
                        for (Cluster cluster : service.getClusters()) {
                            statsPublisher.publish(
                            cluster.getClusterId(),
                            "", /* FIXME: how to get the partitionId? */

statsReader.getInFlightRequestCount(cluster.getClusterId(),
"") /* FIXME: how to get the partitionId? */
                            );
                        }
                    }
                } else if (log.isWarnEnabled()) {
                    log.warn("CEP statistics publisher is disabled");
                }
            } catch (Exception e) {
                if (log.isErrorEnabled()) {
                    log.error("Could not publish in-flight request count",
e);
                }
            }
        }
    }

I'll do some more investigation ...

Reply via email to