Tabnine Logo
FabricService.getPort
Code IndexAdd Tabnine to your IDE (free)

How to use
getPort
method
in
com.dremio.services.fabric.api.FabricService

Best Java code snippets using com.dremio.services.fabric.api.FabricService.getPort (Showing top 8 results out of 315)

origin: dremio/dremio-oss

.setAddress(rpcBindAddress)
.setUserPort(userport)
.setFabricPort(fabric.getPort())
.setStartTime(System.currentTimeMillis())
.setMaxDirectMemory(VM.getMaxDirectMemory())
origin: dremio/dremio-oss

@Override
public void start() throws Exception {
 logger.info("Starting LocalKVStoreProvider");
 coreStoreProvider.start();
 if (fabricService != null) {
  final DefaultDataStoreRpcHandler rpcHandler = new LocalDataStoreRpcHandler(hostName, coreStoreProvider);
  final NodeEndpoint thisNode = NodeEndpoint.newBuilder()
    .setAddress(hostName)
    .setFabricPort(fabricService.get().getPort())
    .build();
  try {
   // DatastoreRpcService registers itself with fabric
   //noinspection ResultOfObjectAllocationIgnored
   new DatastoreRpcService(DirectProvider.wrap(thisNode), fabricService.get(), allocator, rpcHandler);
  } catch (RpcException e) {
   throw new DatastoreException("Failed to start rpc service", e);
  }
 }
 stores = StoreLoader.buildStores(scan, new StoreBuildingFactory() {
  @Override
  public <K, V> StoreBuilder<K, V> newStore() {
   return LocalKVStoreProvider.this.newStore();
  }
 });
 // recover after the stores are built
 coreStoreProvider.recoverIfPreviouslyCrashed();
 logger.info("LocalKVStoreProvider is up");
}
origin: dremio/dremio-oss

@Test
public void firstDisconnectRecovery() throws Exception {
 CountDownLatch closeLatch = new CountDownLatch(1);
 FabricRunnerFactory factory = getFabric().registerProtocol(new Protocol(closeLatch));
 FabricCommandRunner runner = factory.getCommandRunner(getFabric().getAddress(), getFabric().getPort());
 // send a message, establishing the connection.
 {
  SimpleMessage m = new SimpleMessage(1);
  runner.runCommand(m);
  m.getFuture().checkedGet(1000, TimeUnit.MILLISECONDS);
 }
 closeLatch.countDown();
 // wait for the local connection to be closed.
 Thread.sleep(1000);
 // ensure we can send message again.
 {
  SimpleMessage m = new SimpleMessage(1);
  runner.runCommand(m);
  m.getFuture().checkedGet(1000, TimeUnit.MILLISECONDS);
 }
}
origin: dremio/dremio-oss

@Test(expected=ChannelClosedException.class)
public void failureOnDisconnection() throws Exception {
 FabricRunnerFactory factory = getFabric().registerProtocol(new Protocol(null));
 FabricCommandRunner runner = factory.getCommandRunner(getFabric().getAddress(), getFabric().getPort());
 SimpleMessage m = new SimpleMessage(2);
 runner.runCommand(m);
 m.getFuture().checkedGet(1000, TimeUnit.MILLISECONDS);
}
origin: dremio/dremio-oss

.with(DremioConfig.DIST_WRITE_PATH_STRING, distpath)
.clusterMode(ClusterMode.DISTRIBUTED)
.localPort(masterDremioDaemon.getBindingProvider().lookup(FabricService.class).getPort() + 1)
.isRemote(true)
.with(DremioConfig.ENABLE_EXECUTOR_BOOL, false)
.with(DremioConfig.DIST_WRITE_PATH_STRING, distpath)
.clusterMode(ClusterMode.DISTRIBUTED)
.localPort(masterDremioDaemon.getBindingProvider().lookup(FabricService.class).getPort() + 1)
.isRemote(true)
.zk("localhost:" + zkPort),
origin: dremio/dremio-oss

@Override
void initProvider() throws Exception {
 allocator = new RootAllocator(20 * 1024 * 1024);
 pool = new CloseableThreadPool("test-remoteocckvstore");
 localFabricService = new FabricServiceImpl(HOSTNAME, 45678, true, THREAD_COUNT, allocator, RESERVATION,
   MAX_ALLOCATION, TIMEOUT, pool);
 localFabricService.start();
 remoteFabricService = new FabricServiceImpl(HOSTNAME, 45679, true, THREAD_COUNT, allocator, RESERVATION,
   MAX_ALLOCATION, TIMEOUT, pool);
 remoteFabricService.start();
 localKVStoreProvider = new LocalKVStoreProvider(DremioTest.CLASSPATH_SCAN_RESULT,
   DirectProvider.wrap(localFabricService), allocator, HOSTNAME, tmpFolder.getRoot().toString(),
   true, true, true, false);
 localKVStoreProvider.start();
 remoteKVStoreProvider = new RemoteKVStoreProvider(
   DremioTest.CLASSPATH_SCAN_RESULT,
   DirectProvider.wrap(NodeEndpoint.newBuilder()
     .setAddress(HOSTNAME)
     .setFabricPort(localFabricService.getPort())
     .build()),
   DirectProvider.wrap(remoteFabricService), allocator, HOSTNAME);
 remoteKVStoreProvider.start();
}
origin: dremio/dremio-oss

@Override
KVStoreProvider createKKStoreProvider() throws Exception {
 allocator = new RootAllocator(20 * 1024 * 1024);
 pool = new CloseableThreadPool("test-remoteindexedkvstore");
 localFabricService = new FabricServiceImpl(HOSTNAME, 45678, true, THREAD_COUNT, allocator, RESERVATION,
   MAX_ALLOCATION, TIMEOUT, pool);
 localFabricService.start();
 final Provider<FabricService> fab = () -> localFabricService;
 remoteFabricService = new FabricServiceImpl(HOSTNAME, 45679, true, THREAD_COUNT, allocator, RESERVATION,
   MAX_ALLOCATION, TIMEOUT, pool);
 remoteFabricService.start();
 final Provider<FabricService> rfab = () -> remoteFabricService;
 localKVStoreProvider = new LocalKVStoreProvider(DremioTest.CLASSPATH_SCAN_RESULT, fab, allocator,
   HOSTNAME, null, true, true, true, false);
 localKVStoreProvider.start();
 remoteKVStoreProvider = new RemoteKVStoreProvider(
   DremioTest.CLASSPATH_SCAN_RESULT,
   DirectProvider.wrap(NodeEndpoint.newBuilder()
     .setAddress(HOSTNAME)
     .setFabricPort(localFabricService.getPort())
     .build()),
   rfab, allocator, HOSTNAME);
 remoteKVStoreProvider.start();
 return remoteKVStoreProvider;
}
origin: dremio/dremio-oss

@Override
KVStoreProvider createKKStoreProvider() throws Exception {
 allocator = new RootAllocator(20 * 1024 * 1024);
 pool = new CloseableThreadPool("test-remoteocckvstore");
 localFabricService = new FabricServiceImpl(HOSTNAME, 45678, true, THREAD_COUNT, allocator, RESERVATION,
   MAX_ALLOCATION, TIMEOUT, pool);
 localFabricService.start();
 remoteFabricService = new FabricServiceImpl(HOSTNAME, 45679, true, THREAD_COUNT, allocator, RESERVATION,
   MAX_ALLOCATION, TIMEOUT, pool);
 remoteFabricService.start();
 localKVStoreProvider = new LocalKVStoreProvider(DremioTest.CLASSPATH_SCAN_RESULT,
   DirectProvider.<FabricService>wrap(localFabricService), allocator, HOSTNAME, null, true, true, true, false);
 localKVStoreProvider.start();
 remoteKVStoreProvider = new RemoteKVStoreProvider(
   DremioTest.CLASSPATH_SCAN_RESULT,
   DirectProvider.wrap(NodeEndpoint.newBuilder()
     .setAddress(HOSTNAME)
     .setFabricPort(localFabricService.getPort())
     .build()),
   DirectProvider.<FabricService>wrap(remoteFabricService), allocator, HOSTNAME);
 remoteKVStoreProvider.start();
 return remoteKVStoreProvider;
}
com.dremio.services.fabric.apiFabricServicegetPort

Javadoc

The port the service is running on (once started).

Popular methods of FabricService

  • registerProtocol
    Register a new protocol.
  • getAddress
    Return the address that the rpc layer is running on.
  • getProtocol
    Returns a runner factory for the provided protocol id
  • start

Popular in Java

  • Start an intent from android
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • putExtra (Intent)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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