congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ResolvingDiscoverable
Code IndexAdd Tabnine to your IDE (free)

How to use
ResolvingDiscoverable
in
co.cask.cdap.common.discovery

Best Java code snippets using co.cask.cdap.common.discovery.ResolvingDiscoverable (Showing top 20 results out of 315)

origin: cdapio/cdap

 @Override
 public Cancellable announce(String serviceName, int port, byte[] payload) {
  return discoveryService.register(
   ResolvingDiscoverable.of(new Discoverable(serviceName, new InetSocketAddress(hostname, port), payload)));
 }
}
origin: caskdata/cdap

public static ResolvingDiscoverable of(Discoverable discoverable) {
 return new ResolvingDiscoverable(discoverable);
}
origin: caskdata/cdap

@Override
public InetSocketAddress getSocketAddress() {
 return resolve(super.getSocketAddress());
}
origin: cdapio/cdap

@Override
public Cancellable announce(final String serviceName, final int port) {
 return discoveryService.register(
  ResolvingDiscoverable.of(new Discoverable(serviceName, new InetSocketAddress(hostname, port))));
}
origin: co.cask.cdap/cdap-common

@Override
public InetSocketAddress getSocketAddress() {
 return resolve(super.getSocketAddress());
}
origin: co.cask.cdap/cdap-common

public static ResolvingDiscoverable of(Discoverable discoverable) {
 return new ResolvingDiscoverable(discoverable);
}
origin: co.cask.cdap/cdap-app-fabric

 @Override
 public Cancellable announce(String serviceName, int port, byte[] payload) {
  return discoveryService.register(
   ResolvingDiscoverable.of(new Discoverable(serviceName, new InetSocketAddress(hostname, port), payload)));
 }
}
origin: co.cask.cdap/cdap-app-fabric

@Override
public Cancellable announce(final String serviceName, final int port) {
 return discoveryService.register(
  ResolvingDiscoverable.of(new Discoverable(serviceName, new InetSocketAddress(hostname, port))));
}
origin: cdapio/cdap

@Override
protected void startUp() throws Exception {
 LOG.info("Starting Transaction HTTP Service...");
 httpService.start();
 // Register the service
 cancelDiscovery = discoveryService.register(
  ResolvingDiscoverable.of(new Discoverable(Constants.Service.TRANSACTION_HTTP, httpService.getBindAddress())));
 LOG.info("Transaction HTTP started successfully on {}", httpService.getBindAddress());
}
origin: cdapio/cdap

@Override
protected void run() throws Exception {
 waitForOpExecutorToStart();
 String announceAddress = cConf.get(Constants.Service.MASTER_SERVICES_ANNOUNCE_ADDRESS,
                   httpService.getBindAddress().getHostName());
 int announcePort = cConf.getInt(Constants.Dataset.Manager.ANNOUNCE_PORT,
                 httpService.getBindAddress().getPort());
 final InetSocketAddress socketAddress = new InetSocketAddress(announceAddress, announcePort);
 LOG.info("Announcing DatasetService for discovery...");
 // Register the service
 cancelDiscovery = discoveryService.register(
  ResolvingDiscoverable.of(new Discoverable(Constants.Service.DATASET_MANAGER, socketAddress)));
 LOG.info("DatasetService started successfully on {}", socketAddress);
 while (isRunning()) {
  try {
   TimeUnit.SECONDS.sleep(1);
  } catch (InterruptedException e) {
   // It's triggered by stop
   Thread.currentThread().interrupt();
   break;
  }
 }
}
origin: co.cask.cdap/cdap-data-fabric

@Override
protected void run() throws Exception {
 waitForOpExecutorToStart();
 String announceAddress = cConf.get(Constants.Service.MASTER_SERVICES_ANNOUNCE_ADDRESS,
                   httpService.getBindAddress().getHostName());
 int announcePort = cConf.getInt(Constants.Dataset.Manager.ANNOUNCE_PORT,
                 httpService.getBindAddress().getPort());
 final InetSocketAddress socketAddress = new InetSocketAddress(announceAddress, announcePort);
 LOG.info("Announcing DatasetService for discovery...");
 // Register the service
 cancelDiscovery = discoveryService.register(
  ResolvingDiscoverable.of(new Discoverable(Constants.Service.DATASET_MANAGER, socketAddress)));
 LOG.info("DatasetService started successfully on {}", socketAddress);
 while (isRunning()) {
  try {
   TimeUnit.SECONDS.sleep(1);
  } catch (InterruptedException e) {
   // It's triggered by stop
   Thread.currentThread().interrupt();
   break;
  }
 }
}
origin: caskdata/cdap

@Override
protected void startUp() throws Exception {
 LoggingContextAccessor.setLoggingContext(new ServiceLoggingContext(Id.Namespace.SYSTEM.getId(),
                                   Constants.Logging.COMPONENT_NAME,
                                   Constants.Service.METRICS_PROCESSOR));
 LOG.info("Starting MetricsProcessor Status Service...");
 httpService.start();
 cancellable = discoveryService.register(
  ResolvingDiscoverable.of(new Discoverable(Constants.Service.METRICS_PROCESSOR, httpService.getBindAddress())));
 LOG.info("Started MetricsProcessor Status Service.");
}
origin: co.cask.cdap/cdap-watchdog

@Override
protected void startUp() throws Exception {
 LoggingContextAccessor.setLoggingContext(new ServiceLoggingContext(Id.Namespace.SYSTEM.getId(),
                                   Constants.Logging.COMPONENT_NAME,
                                   Constants.Service.METRICS));
 LOG.info("Starting Metrics Service...");
 httpService.start();
 LOG.info("Started Metrics HTTP Service...");
 // Register the service
 cancelDiscovery = discoveryService.register(
  ResolvingDiscoverable.of(new Discoverable(Constants.Service.METRICS, httpService.getBindAddress())));
 LOG.info("Metrics Service started successfully on {}", httpService.getBindAddress());
}
origin: co.cask.cdap/cdap-watchdog

@Override
protected void startUp() throws Exception {
 LoggingContextAccessor.setLoggingContext(new ServiceLoggingContext(Id.Namespace.SYSTEM.getId(),
                                   Constants.Logging.COMPONENT_NAME,
                                   Constants.Service.METRICS_PROCESSOR));
 LOG.info("Starting MetricsProcessor Status Service...");
 httpService.start();
 cancellable = discoveryService.register(
  ResolvingDiscoverable.of(new Discoverable(Constants.Service.METRICS_PROCESSOR, httpService.getBindAddress())));
 LOG.info("Started MetricsProcessor Status Service.");
}
origin: cdapio/cdap

cancellables.add(discoveryService.register(ResolvingDiscoverable.of(
 new Discoverable(serviceName, socketAddress, sslPayload))));
origin: co.cask.cdap/cdap-app-fabric

cancellables.add(discoveryService.register(ResolvingDiscoverable.of(
 new Discoverable(serviceName, socketAddress, sslPayload))));
origin: cdapio/cdap

@Override
protected void startUp() throws Exception {
 LoggingContextAccessor.setLoggingContext(new ServiceLoggingContext(NamespaceId.SYSTEM.getNamespace(),
                                   Constants.Logging.COMPONENT_NAME,
                                   Constants.Service.EXPLORE_HTTP_USER_SERVICE));
 LOG.info("Starting {}...", ExploreExecutorService.class.getSimpleName());
 if (!startOnDemand) {
  exploreService.startAndWait();
 }
 httpService.start();
 cancellable = discoveryService.register(ResolvingDiscoverable.of(
  new Discoverable(Constants.Service.EXPLORE_HTTP_USER_SERVICE, httpService.getBindAddress())));
 LOG.info("{} started successfully on {}", ExploreExecutorService.class.getSimpleName(),
      httpService.getBindAddress());
}
origin: caskdata/cdap

@Override
protected void startUp() throws Exception {
 LoggingContextAccessor.setLoggingContext(new ServiceLoggingContext(Id.Namespace.SYSTEM.getId(),
                                   Constants.Logging.COMPONENT_NAME,
                                   Constants.Service.METRICS));
 LOG.info("Starting Metrics Service...");
 httpService.start();
 LOG.info("Started Metrics HTTP Service...");
 // Register the service
 cancelDiscovery = discoveryService.register(
  ResolvingDiscoverable.of(new Discoverable(Constants.Service.METRICS, httpService.getBindAddress())));
 LOG.info("Metrics Service started successfully on {}", httpService.getBindAddress());
}
origin: co.cask.cdap/cdap-explore

@Override
protected void startUp() throws Exception {
 LoggingContextAccessor.setLoggingContext(new ServiceLoggingContext(NamespaceId.SYSTEM.getNamespace(),
                                   Constants.Logging.COMPONENT_NAME,
                                   Constants.Service.EXPLORE_HTTP_USER_SERVICE));
 LOG.info("Starting {}...", ExploreExecutorService.class.getSimpleName());
 if (!startOnDemand) {
  exploreService.startAndWait();
 }
 httpService.start();
 cancellable = discoveryService.register(ResolvingDiscoverable.of(
  new Discoverable(Constants.Service.EXPLORE_HTTP_USER_SERVICE, httpService.getBindAddress())));
 LOG.info("{} started successfully on {}", ExploreExecutorService.class.getSimpleName(),
      httpService.getBindAddress());
}
origin: cdapio/cdap

@Override
protected void startUp() throws Exception {
 LoggingContextAccessor.setLoggingContext(new ServiceLoggingContext(NamespaceId.SYSTEM.getEntityName(),
                                   Constants.Logging.COMPONENT_NAME,
                                   Constants.Service.DATASET_EXECUTOR));
 LOG.info("Starting DatasetOpExecutorService...");
 httpService.start();
 cancellable = discoveryService.register(
  ResolvingDiscoverable.of(new Discoverable(Constants.Service.DATASET_EXECUTOR, httpService.getBindAddress())));
 LOG.info("DatasetOpExecutorService started successfully on {}", httpService.getBindAddress());
}
co.cask.cdap.common.discoveryResolvingDiscoverable

Javadoc

Discoverable that resolves 0.0.0.0 to a routable interface.

Most used methods

  • of
  • <init>
  • resolve

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Join (org.hibernate.mapping)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now