public virtual void TestUseZKServiceForBinding() { CuratorService cs2 = new CuratorService("curator", zookeeper); cs2.Init(new Configuration()); cs2.Start(); }
/// <summary>Create an instance</summary> /// <exception cref="System.IO.IOException"/> protected internal virtual void CreateCuratorService() { curatorService = new CuratorService("curatorService"); curatorService.Init(CreateRegistryConfiguration()); curatorService.Start(); rootACL = RegistrySecurity.WorldReadWriteACL; curatorService.MaybeCreate(string.Empty, CreateMode.Persistent, rootACL, true); }
/// <summary>Start a curator service instance</summary> /// <param name="name">name</param> /// <param name="secure">flag to indicate the cluster is secure</param> /// <returns>an inited and started curator service</returns> protected internal virtual CuratorService StartCuratorServiceInstance(string name , bool secure) { Configuration clientConf = new Configuration(); clientConf.Set(KeyRegistryZkRoot, "/"); clientConf.SetBoolean(KeyRegistrySecure, secure); Describe(Log, "Starting Curator service"); CuratorService curatorService = new CuratorService(name, secureZK); curatorService.Init(clientConf); curatorService.Start(); Log.Info("Curator Binding {}", curatorService.BindingDiagnosticDetails()); return(curatorService); }