Package org.apache.helix.participant

Examples of org.apache.helix.participant.HelixCustomCodeRunner


        if (manager.getInstanceName().equals("localhost_12918"))
        {
          Thread.sleep(2000);
        }

        HelixCustomCodeRunner customCodeRunner = new HelixCustomCodeRunner(manager, ZK_ADDR);
        customCodeRunner.invoke(_callback)
                         .on(ChangeType.LIVE_INSTANCE)
                         .usingLeaderStandbyModel("TestParticLeader")
                         .start();
      } catch (Exception e)
      {
View Full Code Here


        // so there will be a leadership transfer from localhost_12919 to 12918
        if (manager.getInstanceName().equals("localhost_12918")) {
          Thread.sleep(2000);
        }

        HelixCustomCodeRunner customCodeRunner = new HelixCustomCodeRunner(manager, ZK_ADDR);
        customCodeRunner.invoke(_callback).on(ChangeType.LIVE_INSTANCE)
            .usingLeaderStandbyModel("TestParticLeader").start();
      } catch (Exception e) {
        LOG.error("Exception do pre-connect job", e);
      }
    }
View Full Code Here

      // so there will be a leadership transfer from localhost_12919 to 12918
      if (manager.getInstanceName().equals("localhost_12918")) {
        Thread.sleep(2000);
      }

      HelixCustomCodeRunner customCodeRunner = new HelixCustomCodeRunner(manager, _zkaddr);
      customCodeRunner.invoke(_callback).on(ChangeType.LIVE_INSTANCE)
          .usingLeaderStandbyModel("TestParticLeader").start();
    } catch (Exception e) {
      LOG.error("Exception do pre-connect job", e);
    }
  }
View Full Code Here

      String instanceName = "localhost_" + (12918 + i);

      participants
          .put(instanceName, new MockParticipant(_zkaddr, clusterName, instanceName));

      customCodeRunners.put(instanceName, new HelixCustomCodeRunner(participants.get(instanceName),
          _zkaddr));
      callbacks.put(instanceName, new DummyCallback());

      customCodeRunners.get(instanceName).invoke(callbacks.get(instanceName))
          .on(ChangeType.LIVE_INSTANCE).usingLeaderStandbyModel("TestParticLeader").start();
View Full Code Here

        // so there will be a leadership transfer from localhost_12919 to 12918
        if (manager.getInstanceName().equals("localhost_12918")) {
          Thread.sleep(2000);
        }

        HelixCustomCodeRunner customCodeRunner = new HelixCustomCodeRunner(manager, ZK_ADDR);
        customCodeRunner.invoke(_callback).on(ChangeType.LIVE_INSTANCE)
            .usingLeaderStandbyModel("TestParticLeader").start();
      } catch (Exception e) {
        LOG.error("Exception do pre-connect job", e);
      }
    }
View Full Code Here

      String instanceName = "localhost_" + (12918 + i);

      participants
          .put(instanceName, new MockParticipantManager(ZK_ADDR, clusterName, instanceName));

      customCodeRunners.put(instanceName, new HelixCustomCodeRunner(participants.get(instanceName),
          ZK_ADDR));
      callbacks.put(instanceName, new DummyCallback());

      customCodeRunners.get(instanceName).invoke(callbacks.get(instanceName))
          .on(ChangeType.LIVE_INSTANCE).usingLeaderStandbyModel("TestParticLeader").start();
View Full Code Here

      // so there will be a leadership transfer from localhost_12919 to 12918
      if (manager.getInstanceName().equals("localhost_12918")) {
        Thread.sleep(2000);
      }

      HelixCustomCodeRunner customCodeRunner = new HelixCustomCodeRunner(manager, ZK_ADDR);
      customCodeRunner.invoke(_callback).on(ChangeType.LIVE_INSTANCE)
          .usingLeaderStandbyModel("TestParticLeader").start();
    } catch (Exception e) {
      LOG.error("Exception do pre-connect job", e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.helix.participant.HelixCustomCodeRunner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.