No worries Imesh. Although I didn't have enough knowledge of the code base
to work out how to fix it, investigating the problem was a really useful
learning exercise!
On 11 Dec 2013 04:51, "Imesh Gunaratne" <[email protected]> wrote:
> I'm sorry for the inconvenience caused. I have now fixed this issue and
> checked in the modification to remote git.
>
> if (statsPublisher.isEnabled()) {
> Collection<String> partitionIds;
> for (Service service :
> TopologyManager.getTopology().getServices()) {
> for (Cluster cluster : service.getClusters()) {
> partitionIds = cluster.findPartitionIds();
> for(String partitionId : partitionIds) {
>
> statsPublisher.publish(cluster.getClusterId(), partitionId,
> statsReader.getInFlightRequestCount(cluster.getClusterId(), partitionId));
> }
> }
> }
> }
>
>
> Thanks
> Imesh
>
>
> On Wed, Dec 11, 2013 at 2:57 AM, chris snow <[email protected]> wrote:
>
>> 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 ...
>>
>
>