Projects >> helix >>45efa1602200aaccf973059cb3513027cf00d575

Chunk
Conflicting content
=======
      if (fromState.equalsIgnoreCase("SLAVE") && toState.equalsIgnoreCase("MASTER"))
      {

<<<<<<< HEAD
    	//add a stat and report to ZK
    	//perhaps should keep reporter per instance...
    	ParticipantHealthReportCollectorImpl reporter =
    			new ParticipantHealthReportCollectorImpl(manager, instance);
    	MockEspressoHealthReportProvider provider = new
    			MockEspressoHealthReportProvider();
    	reporter.addHealthReportProvider(provider);
    	String statName = "latency";
    	//using constant as timestamp so that when each partition does this transition, 
    	//they do not advance timestamp, and no stats double-counted
    	String timestamp = "12345"; 
    	provider.setStat(_dbName, statName,"15", timestamp);
    	
    	
    	//sleep for random time and see about errors.
    	Random r = new Random();
    	int x = r.nextInt(30000);
    	try {
			Thread.sleep(x);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
     	reporter.transmitHealthReports();
     	
    	/*
        for (int i = 0; i < 5; i++)
        {
          accessor.setProperty(PropertyType.HEALTHREPORT,
                               new ZNRecord("mockAlerts" + i),
                               instance,
                               "mockAlerts");
          try
          {
            Thread.sleep(1000);
          }
          catch (InterruptedException e)
          {
            // TODO Auto-generated catch block
            e.printStackTrace();
          }
        }
        */
        // add a stat and report to ZK
        // perhaps should keep reporter per instance...
        ParticipantHealthReportCollectorImpl reporter = new ParticipantHealthReportCollectorImpl(
            manager, instance);
        MockEspressoHealthReportProvider provider = new MockEspressoHealthReportProvider();
        reporter.addHealthReportProvider(provider);
        String statName = "latency";
        provider.setStat(_dbName, statName, "15");
        reporter.transmitHealthReports();

        /*
         * for (int i = 0; i < 5; i++) {
         * accessor.setProperty(PropertyType.HEALTHREPORT, new
         * ZNRecord("mockAlerts" + i), instance, "mockAlerts"); try {
         * Thread.sleep(1000); } catch (InterruptedException e) { // TODO
         * Auto-generated catch block e.printStackTrace(); } }
         */
>>>>>>> 6cdf0ab3f768a12a897f1bf2713709a4897641b7
      }
    }
Solution content
      if (fromState.equalsIgnoreCase("SLAVE") && toState.equalsIgnoreCase("MASTER"))
      {
    	//add a stat and report to ZK
    	//perhaps should keep reporter per instance...
    	ParticipantHealthReportCollectorImpl reporter =
    			new ParticipantHealthReportCollectorImpl(manager, instance);
    	MockEspressoHealthReportProvider provider = new
    			MockEspressoHealthReportProvider();
    	reporter.addHealthReportProvider(provider);
    	String statName = "latency";
    	//using constant as timestamp so that when each partition does this transition, 
    	//they do not advance timestamp, and no stats double-counted
    	String timestamp = "12345"; 
    	provider.setStat(_dbName, statName,"15", timestamp);
    	
    	
    	//sleep for random time and see about errors.
    	/*
    	Random r = new Random();
    	int x = r.nextInt(30000);
    	try {
			Thread.sleep(x);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		*/
		
     	reporter.transmitHealthReports();
     	
    	/*
        for (int i = 0; i < 5; i++)
        {
          accessor.setProperty(PropertyType.HEALTHREPORT,
                               new ZNRecord("mockAlerts" + i),
                               instance,
                               "mockAlerts");
          try
          {
            Thread.sleep(1000);
          }
          catch (InterruptedException e)
          {
            // TODO Auto-generated catch block
            e.printStackTrace();
          }
        }
        */
      }
    }
File
TestWildcardAlert.java
Developer's decision
Combination
Kind of conflict
Comment
Method invocation
Try statement
Variable
Chunk
Conflicting content
        ClusterAlertMBeanCollection.DOMAIN_ALERT);

    TestHelper.verifyWithTimeout("verifyBestPossAndExtViewExtended",
<<<<<<< HEAD
                                 1500000,  // timeout in millisecond //was 15000
                                 ZK_ADDR,
                                 TestHelper.setOf(clusterName),
                                 TestHelper.setOf(_dbName),
                                 null,
                                 null,
                                 null);// other verifications go here
    
    //sleep for a few seconds to give stats stage time to trigger and for bean to trigger
    Thread.sleep(5000);
    
=======
        30000, // timeout in millisecond //was 15000
        ZK_ADDR, TestHelper. setOf(clusterName), TestHelper. setOf(_dbName), null,
        null, null);// other verifications go here
>>>>>>> 6cdf0ab3f768a12a897f1bf2713709a4897641b7
    ZKDataAccessor accessor = new ZKDataAccessor(clusterName, _zkClient);
    // for (int i = 0; i < 1; i++) //change 1 back to 5
    // {
Solution content
        ClusterAlertMBeanCollection.DOMAIN_ALERT);

    TestHelper.verifyWithTimeout("verifyBestPossAndExtViewExtended",
                                 1500000,  // timeout in millisecond //was 15000
                                 ZK_ADDR,
                                 TestHelper.setOf(clusterName),
                                 TestHelper.setOf(_dbName),
                                 null,
                                 null,
                                 null);// other verifications go here
    
    //sleep for a few seconds to give stats stage time to trigger and for bean to trigger
    Thread.sleep(5000);

    ZKDataAccessor accessor = new ZKDataAccessor(clusterName, _zkClient);
    // for (int i = 0; i < 1; i++) //change 1 back to 5
    // {
File
TestWildcardAlert.java
Developer's decision
Version 1
Kind of conflict
Attribute
Comment
Method invocation
Chunk
Conflicting content
    Assert.assertEquals(Double.parseDouble(val), Double.parseDouble("75.0"));
    Assert.assertTrue(fired);

<<<<<<< HEAD
    // Make sure that the jmxObserver has received all the jmx bean value that is corresponding to the alerts.
    Assert.assertTrue(jmxMBeanObserver._beanValueMap.size() >= 1);
=======
    // Make sure that the jmxObserver has received all the jmx bean value that
    // is corresponding to the alerts.
    jmxMBeanObserver.refresh();
    Assert.assertTrue(jmxMBeanObserver._beanValueMap.size() == 1);
>>>>>>> 6cdf0ab3f768a12a897f1bf2713709a4897641b7
    String beanName = "HelixAlerts:alert=EXP(accumulate()(localhost_%.RestQueryStats@DBName#TestDB0.latency)|EXPAND|SUMEACH)CMP(GREATER)CON(10)--(%)";
    Assert.assertTrue(jmxMBeanObserver._beanValueMap.containsKey(beanName));
Solution content
    Assert.assertEquals(Double.parseDouble(val), Double.parseDouble("75.0"));
    Assert.assertTrue(fired);


    // Make sure that the jmxObserver has received all the jmx bean value that is corresponding 
    //to the alerts.
    jmxMBeanObserver.refresh();   
    Assert.assertTrue(jmxMBeanObserver._beanValueMap.size() >= 1);

    String beanName = "HelixAlerts:alert=EXP(accumulate()(localhost_%.RestQueryStats@DBName#TestDB0.latency)|EXPAND|SUMEACH)CMP(GREATER)CON(10)--(%)";
    Assert.assertTrue(jmxMBeanObserver._beanValueMap.containsKey(beanName));
File
TestWildcardAlert.java
Developer's decision
Manual
Kind of conflict
Comment
Method invocation