Package com.linkedin.d2.balancer.properties

Examples of com.linkedin.d2.balancer.properties.UriPropertiesJsonSerializer


                                                              clstoreString,
                                                              new ClusterPropertiesJsonSerializer());
      zkUriRegistry =
        (ZooKeeperEphemeralStore<UriProperties>) getEphemeralStore(zkclient,
                                                                   uristoreString,
                                                                   new UriPropertiesJsonSerializer(),
                                                                   new UriPropertiesMerger());



      if (serviceGroup != null)
View Full Code Here


                                                              clstoreString,
                                                              new ClusterPropertiesJsonSerializer());
    ZooKeeperEphemeralStore<UriProperties> zkUriRegistry =
        (ZooKeeperEphemeralStore<UriProperties>) getEphemeralStore(zkclient,
                                                                   uristoreString,
                                                                   new UriPropertiesJsonSerializer(),
                                                                   new UriPropertiesMerger());

    List<String> currentclusters = zkClusterRegistry.ls();
    List<String> currenturis = zkUriRegistry.ls();
    List<String> servicesGroups = getServicesGroups (zkclient, d2path);
View Full Code Here

  @Override
  public ZooKeeperEphemeralStore<UriProperties> createStore(ZKConnection connection, String path)
  {
    return new ZooKeeperEphemeralStore<UriProperties>(
            connection, new UriPropertiesJsonSerializer(), new UriPropertiesMerger(), path);
  }
View Full Code Here

    String uristoreString = _zkUriString + ZKFSUtil.uriPath("/d2");

    ZooKeeperEphemeralStore<UriProperties> zkUriRegistry =
      (ZooKeeperEphemeralStore<UriProperties>) LoadBalancerClientCli.getEphemeralStore(zkclient,
                                                                 uristoreString,
                                                                 new UriPropertiesJsonSerializer(),
                                                                 new UriPropertiesMerger());

    return zkUriRegistry.get(cluster);
  }
View Full Code Here

                                         new FileStoreTestFactory<ClusterProperties>("cluster",
                                                                                     new ClusterPropertiesJsonSerializer()),
                                         new FileStoreTestFactory<ServiceProperties>("service",
                                                                                     new ServicePropertiesJsonSerializer()),
                                         new FileStoreTestFactory<UriProperties>("uri",
                                                                                 new UriPropertiesJsonSerializer()));

    simulator.simulateMultithreaded(1, 1000, 20);
    simulator.reset();

    simulator.simulateMultithreaded(50, 10000, 20);
View Full Code Here

                                         new FileStoreTestFactory<ClusterProperties>("cluster",
                                                                                     new ClusterPropertiesJsonSerializer()),
                                         new FileStoreTestFactory<ServiceProperties>("service",
                                                                                     new ServicePropertiesJsonSerializer()),
                                         new FileStoreTestFactory<UriProperties>("uri",
                                                                                 new UriPropertiesJsonSerializer()));

    simulator.simulateMultithreaded(1, 1000, 20);
    simulator.reset();

    simulator.simulateMultithreaded(1, 10000, 20);
View Full Code Here

    ZooKeeperPermanentStore<ClusterProperties> zkClusterRegistry = createPermanentStore(
            zkConnection, ZKFSUtil.clusterPath(_baseZKPath), new ClusterPropertiesJsonSerializer());
    ZooKeeperPermanentStore<ServiceProperties> zkServiceRegistry = createPermanentStore(
            zkConnection, ZKFSUtil.servicePath(_baseZKPath, _d2ServicePath), new ServicePropertiesJsonSerializer());
    ZooKeeperEphemeralStore<UriProperties> zkUriRegistry =  createEphemeralStore(
            zkConnection, ZKFSUtil.uriPath(_baseZKPath), new UriPropertiesJsonSerializer(), new UriPropertiesMerger());

    FileStore<ClusterProperties> fsClusterStore = createFileStore("clusters", new ClusterPropertiesJsonSerializer());
    FileStore<ServiceProperties> fsServiceStore = createFileStore(_d2ServicePath, new ServicePropertiesJsonSerializer());
    FileStore<UriProperties> fsUriStore = createFileStore("uris", new UriPropertiesJsonSerializer());
View Full Code Here

    _announcer.setWeight(1d);

    return new ZooKeeperConnectionManager(_zkHostname + ":" + _zkPort,
                                          _sessionTimeoutInMs,
                                          _basePath,
                                          new ZKUriStoreFactory(),
                                          _announcer);
  }
View Full Code Here

  public ZooKeeperConnectionManager build()
  {
    _announcer.setWeight(1d);

    return new ZooKeeperConnectionManager(_zkHostname + ":" + _zkPort,
                                          _sessionTimeoutInMs,
                                          _basePath,
                                          new ZKUriStoreFactory(),
                                          _announcer);
  }
View Full Code Here

    // write D2-related configuration to ZooKeeper
    // all the configuration here are permanent, no need to re-write as long as ZooKeeper still has the data
    // therefore in real case, do this "discovery" step separately

    final HttpServer server = RestLiExampleBasicServer.createServer();
    final ZooKeeperConnectionManager zkConn = createZkConn();

    startServer(server, zkConn);

    System.out.println("Example server with D2 is running with URL " + RestLiExampleBasicServer.getServerUrl() + ". Press any key to stop server.");
    System.in.read();
View Full Code Here

TOP

Related Classes of com.linkedin.d2.balancer.properties.UriPropertiesJsonSerializer

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.