Tabnine Logo
FabricServiceImpl
Code IndexAdd Tabnine to your IDE (free)

How to use
FabricServiceImpl
in
com.dremio.services.fabric

Best Java code snippets using com.dremio.services.fabric.FabricServiceImpl (Showing top 15 results out of 315)

origin: dremio/dremio-oss

@Before
public void setupServer() throws Exception{
 allocator = new RootAllocator(20 * 1024 * 1024);
 pool = new CloseableThreadPool("test-fabric");
 fabric = new FabricServiceImpl(address, 45678, true, THREAD_COUNT, allocator, RESERVATION,
   MAX_ALLOCATION, TIMEOUT, pool);
 fabric.start();
}
origin: dremio/dremio-oss

protected FabricServer newFabricServer() throws Exception {
 return new FabricServer(getAddress(), getHandler(), getRpcConfig(), getAllocator(), getRegistry(), getEventLoop());
}
origin: dremio/dremio-oss

@Before
public void setUpPDFSService() throws IOException {
 NodeEndpoint endpoint = NodeEndpoint.newBuilder()
   .setAddress(fabric.getAddress()).setFabricPort(fabric.getPort())
   .build();
 PDFSProtocol pdfsProtocol = PDFSProtocol.newInstance(endpoint, DremioTest.DEFAULT_SABOT_CONFIG, allocator, true);
 FabricRunnerFactory factory = fabric.registerProtocol(pdfsProtocol);
 sabotFS = new RemoteNodeFileSystem(factory.getCommandRunner(fabric.getAddress(), fabric.getPort()), allocator);
 sabotFS.initialize(URI.create(format("sabot://%s:%d", fabric.getAddress(), fabric.getPort())), new Configuration(false));
}
origin: dremio/dremio-oss

final String address = FabricServiceImpl.getAddress(useIP);
registry.bind(FabricService.class, new FabricServiceImpl(
  address,
  45678,
origin: dremio/dremio-oss

public ServiceHolder(BufferAllocator allocator, Provider<Iterable<NodeEndpoint>> nodeProvider, PDFSMode mode, String name) throws Exception{
 this.allocator = allocator.newChildAllocator(name, 0, Long.MAX_VALUE);
 pool = new CloseableThreadPool(name);
 fabric = new FabricServiceImpl(HOSTNAME, 9970, true, THREAD_COUNT, this.allocator, RESERVATION,
   MAX_ALLOCATION, TIMEOUT, pool);
 fabric.start();
 endpoint = NodeEndpoint.newBuilder()
   .setAddress(fabric.getAddress()).setFabricPort(fabric.getPort())
   .setRoles(Roles.newBuilder().setJavaExecutor(mode == PDFSMode.DATA))
   .build();
 service = new PDFSService(DirectProvider.wrap((FabricService) fabric), DirectProvider.wrap(endpoint), nodeProvider, DremioTest.DEFAULT_SABOT_CONFIG, this.allocator, mode);
 service.start();
 fileSystem = service.createFileSystem();
}
origin: dremio/dremio-oss

fabricService = new FabricServiceImpl(HOSTNAME, 45678, true, THREAD_COUNT, allocator, RESERVATION,
  MAX_ALLOCATION, TIMEOUT, pool);
origin: dremio/dremio-oss

@BeforeClass
public static void setup() throws Exception {
 final String hostname = FabricServiceImpl.getAddress(false);
 final String localWritePathString = tempFolder.getRoot().getAbsolutePath();
 currentDremioDaemon = DACDaemon.newDremioDaemon(
origin: dremio/dremio-oss

ReceivedResponseMessage<QueryId> resp2 = ep2.getEndpoint(address, fabric.getPort()).send(expectedD, random1);
assertEquals(resp2.getBody(), expectedQ);
assertEqualsBytes(r2B, resp2.getBuffer());
origin: dremio/dremio-oss

 fabricAddress = FabricServiceImpl.getAddress(false);
} catch (UnknownHostException e) {
 throw new RuntimeException("Cannot get local address", e);
  new FabricServiceImpl(
    fabricAddress,
    dacConfig.localPort,
origin: dremio/dremio-oss

fabricService = new FabricServiceImpl(HOSTNAME, 45678, true, THREAD_COUNT, allocator, RESERVATION, MAX_ALLOCATION,
  TIMEOUT, pool);
origin: dremio/dremio-oss

@Test(expected=RpcException.class)
public void propagateFailure() throws Exception {
 ProtocolBuilder builder = ProtocolBuilder.builder().allocator(allocator).name("test-fabric").protocolId(3);
 SendEndpointCreator<NodeEndpoint, QueryId> ep1 = builder.register(1,
   new AbstractReceiveHandler<NodeEndpoint, QueryId>(NodeEndpoint.getDefaultInstance(),
     QueryId.getDefaultInstance()) {
    @Override
    public SentResponseMessage<QueryId> handle(NodeEndpoint request, ArrowBuf dBody) throws RpcException {
     throw new NullPointerException("an npe.");
    }
   });
 builder.register(fabric);
 ReceivedResponseMessage<QueryId> resp1 = ep1.getEndpoint(address, fabric.getPort()).send(expectedD);
 assertEquals(resp1.getBody(), expectedQ);
 assertTrue(resp1.getBuffer() == null);
}
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

@Test
public void basicProtocolNoBuffers() throws Exception {
 ProtocolBuilder builder = ProtocolBuilder.builder().allocator(allocator).name("test-fabric").protocolId(3);
 SendEndpointCreator<NodeEndpoint, QueryId> ep1 = builder.register(1,
   new AbstractReceiveHandler<NodeEndpoint, QueryId>(NodeEndpoint.getDefaultInstance(),
     QueryId.getDefaultInstance()) {
    @Override
    public SentResponseMessage<QueryId> handle(NodeEndpoint request, ArrowBuf dBody) throws RpcException {
     if (!request.equals(expectedD)) {
      throw new RpcException("Objects not same.");
     }
     return new SentResponseMessage<>(expectedQ);
    }
   });
 builder.register(fabric);
 ReceivedResponseMessage<QueryId> resp1 = ep1.getEndpoint(address, fabric.getPort()).send(expectedD);
 assertEquals(resp1.getBody(), expectedQ);
 assertTrue(resp1.getBuffer() == null);
}
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.fabricFabricServiceImpl

Javadoc

Fabric service implementation. Manages node-to-node communication.

Most used methods

  • <init>
  • getAddress
  • getPort
  • start
  • getAllocator
  • getEventLoop
  • getHandler
  • getRegistry
  • getRpcConfig
  • getSSLEngineFactory
  • newFabricServer
  • registerProtocol
  • newFabricServer,
  • registerProtocol

Popular in Java

  • Reactive rest calls using spring rest template
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Notification (javax.management)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Github Copilot 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