congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ThriftServerRunner.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.hadoop.hbase.thrift.ThriftServerRunner
constructor

Best Java code snippets using org.apache.hadoop.hbase.thrift.ThriftServerRunner.<init> (Showing top 6 results out of 315)

origin: co.cask.hbase/hbase

/**
 * Create an instance of the glue object that connects the
 * RegionServer with the standard ThriftServer implementation
 */
HRegionThriftServer(HRegionServer regionServer, Configuration conf)
  throws IOException {
 super("Region Thrift Server");
 this.rs = regionServer;
 this.serverRunner =
   new ThriftServerRunner(conf, new HBaseHandlerRegion(conf));
}
origin: org.apache.hbase/hbase-thrift

/**
 * Start up or shuts down the Thrift server, depending on the arguments.
 * @param args
 */
 void doMain(final String[] args) throws Exception {
  processOptions(args);
  serverRunner = new ThriftServerRunner(conf);
  // Put up info server.
  int port = conf.getInt("hbase.thrift.info.port", 9095);
  if (port >= 0) {
   conf.setLong("startcode", System.currentTimeMillis());
   String a = conf.get("hbase.thrift.info.bindAddress", "0.0.0.0");
   infoServer = new InfoServer("thrift", a, port, false, conf);
   infoServer.setAttribute("hbase.conf", conf);
   infoServer.start();
  }
  serverRunner.run();
}
origin: com.aliyun.hbase/alihbase-thrift

/**
 * Start up or shuts down the Thrift server, depending on the arguments.
 * @param args
 */
 void doMain(final String[] args) throws Exception {
  processOptions(args);
  serverRunner = new ThriftServerRunner(conf);
  // Put up info server.
  int port = conf.getInt("hbase.thrift.info.port", 9095);
  if (port >= 0) {
   conf.setLong("startcode", System.currentTimeMillis());
   String a = conf.get("hbase.thrift.info.bindAddress", "0.0.0.0");
   infoServer = new InfoServer("thrift", a, port, false, conf);
   infoServer.setAttribute("hbase.conf", conf);
   infoServer.start();
  }
  serverRunner.run();
}
origin: co.cask.hbase/hbase

/**
 * Start up or shuts down the Thrift server, depending on the arguments.
 * @param args
 */
 void doMain(final String[] args) throws Exception {
  processOptions(args);
  // login the server principal (if using secure Hadoop)
  if (User.isSecurityEnabled() && User.isHBaseSecurityEnabled(conf)) {
   String machineName = Strings.domainNamePointerToHostName(
    DNS.getDefaultHost(conf.get("hbase.thrift.dns.interface", "default"),
     conf.get("hbase.thrift.dns.nameserver", "default")));
   User.login(conf, "hbase.thrift.keytab.file",
     "hbase.thrift.kerberos.principal", machineName);
  }
  serverRunner = new ThriftServerRunner(conf);
  // Put up info server.
  int port = conf.getInt("hbase.thrift.info.port", 9095);
  if (port >= 0) {
   conf.setLong("startcode", System.currentTimeMillis());
   String a = conf.get("hbase.thrift.info.bindAddress", "0.0.0.0");
   infoServer = new InfoServer("thrift", a, port, false, conf);
   infoServer.setAttribute("hbase.conf", conf);
   infoServer.start();
  }
  serverRunner.run();
}
origin: org.apache.hbase/hbase-thrift

@Test
public void testExceptionThrownWhenMisConfigured() throws Exception {
 Configuration conf = new Configuration(TEST_UTIL.getConfiguration());
 conf.set("hbase.thrift.security.qop", "privacy");
 conf.setBoolean("hbase.thrift.ssl.enabled", false);
 ThriftServerRunner runner = null;
 ExpectedException thrown = ExpectedException.none();
 try {
  thrown.expect(IllegalArgumentException.class);
  thrown.expectMessage("Thrift HTTP Server's QoP is privacy, " +
    "but hbase.thrift.ssl.enabled is false");
  runner = new ThriftServerRunner(conf);
  fail("Thrift HTTP Server starts up even with wrong security configurations.");
 } catch (Exception e) {
 }
 assertNull(runner);
}
origin: com.aliyun.hbase/alihbase-thrift

@Test
public void testExceptionThrownWhenMisConfigured() throws Exception {
 Configuration conf = new Configuration(TEST_UTIL.getConfiguration());
 conf.set("hbase.thrift.security.qop", "privacy");
 conf.setBoolean("hbase.thrift.ssl.enabled", false);
 ThriftServerRunner runner = null;
 ExpectedException thrown = ExpectedException.none();
 try {
  thrown.expect(IllegalArgumentException.class);
  thrown.expectMessage("Thrift HTTP Server's QoP is privacy, " +
    "but hbase.thrift.ssl.enabled is false");
  runner = new ThriftServerRunner(conf);
  fail("Thrift HTTP Server starts up even with wrong security configurations.");
 } catch (Exception e) {
 }
 assertNull(runner);
}
org.apache.hadoop.hbase.thriftThriftServerRunner<init>

Popular methods of ThriftServerRunner

  • registerFilters
  • createExecutor
  • getBindAddress
  • run
  • shutdown
  • checkHttpSecurity
  • setupServer
    Setting up the thrift TServer

Popular in Java

  • Making http post requests using okhttp
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top 12 Jupyter Notebook extensions
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