Package com.linkedin.d2.discovery.util

Examples of com.linkedin.d2.discovery.util.D2Config


      _store.put(listenTo, _store.getSerializer()
                                 .fromBytes(discoveryProperties.getBytes("UTF-8")));
    }
    catch (PropertySerializationException e)
    {
      throw new PropertyStoreException(e);
    }
    catch (UnsupportedEncodingException e)
    {
      throw new RuntimeException("UTF-8 should never fail", e);
    }
View Full Code Here


      {
        interrupted = true;
      }
      catch (ExecutionException e)
      {
        throw new PropertyStoreException(e);
      }
    }
  }
View Full Code Here

    {
      callback.get(10, TimeUnit.SECONDS);
    }
    catch (Exception e)
    {
      throw new PropertyStoreException(e);
    }
  }
View Full Code Here

    {
      callback.get(10, TimeUnit.SECONDS);
    }
    catch (Exception e)
    {
      throw new PropertyStoreException(e);
    }
  }
View Full Code Here

    {
      callback.get(10, TimeUnit.SECONDS);
    }
    catch (Exception e)
    {
      throw new PropertyStoreException(e);
    }
  }
View Full Code Here

    {
      callback.get(10, TimeUnit.SECONDS);
    }
    catch (Exception e)
    {
      throw new PropertyStoreException(e);
    }
  }
View Full Code Here

    {
      callback.get(10, TimeUnit.SECONDS);
    }
    catch (Exception e)
    {
      throw new PropertyStoreException(e);
    }
  }
View Full Code Here

                   boolean useDeltaWrite,
                   int maxOutstandingWrites)
  {
    _retryLimit = retryLimit;
    // use retry zkConnection
    _zkConnection = new ZKConnection(zkHosts, sessionTimeout, _retryLimit, false, null, 0);
    _basePath = basePath;
    _timeout = timeout;
    _clusterServiceConfigurations = Arrays.asList(clusterServiceConfigurations, extraClusterServiceConfigurations);
    _clusterDefaults = clusterDefaults;
    _serviceDefaults = serviceDefaults;
View Full Code Here

    System.out.println("Populating zookeeper with d2 configuration");

    //d2Config is the utility class for populating zookeeper with our topology
    //some the params are not needed for this simple example so we will just use
    //default value by passing an empty map
    D2Config d2Config = new D2Config(zkConnectString, zkSessionTimeout, zkBasePath,
                                     zkSessionTimeout, zkRetryLimit,
                                     (Map<String, Object>)Collections.EMPTY_MAP,
                                     serviceDefaults,
                                     clusterServiceConfigurations,
                                     (Map<String, Object>)Collections.EMPTY_MAP,
                                     (Map<String, Object>)Collections.EMPTY_MAP);

    //populate zookeeper
    d2Config.configure();
    System.out.println("Finished populating zookeeper with d2 configuration");
  }
View Full Code Here

    Map<String, Object> serviceDefaults = (Map<String,Object>) configMap.get("serviceDefaults");
    Map<String, Object> clusterServiceConfigurations = (Map<String,Object>) configMap.get("clusterServiceConfigurations");
    Map<String, Object> extraClusterServiceConfigurations = (Map<String,Object>) configMap.get("extraClusterServiceConfigurations");
    Map<String, Object> serviceVariants = (Map<String,Object>) configMap.get("serviceVariants");

    D2Config d2conf = new D2Config (zkHosts, 10000, d2path,
                                    5000L, 10,
                                    clusterDefaults,
                                    serviceDefaults,
                                    clusterServiceConfigurations,
                                    extraClusterServiceConfigurations,
                                    serviceVariants);
    return d2conf.configure();
  }
View Full Code Here

TOP

Related Classes of com.linkedin.d2.discovery.util.D2Config

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.