Package org.apache.hive.service.cli.thrift

Examples of org.apache.hive.service.cli.thrift.ThriftCLIService


  private void stageDirTest(String stageDirConfigStr, String stageDirName, boolean isLocal) throws IOException {
    String scratchDirStr = System.getProperty("test.tmp.dir") + File.separator +
        stageDirName;
    System.setProperty(stageDirConfigStr, scratchDirStr);
    ThriftCLIService service = new EmbeddedThriftBinaryCLIService();
    ThriftCLIServiceClient client = new ThriftCLIServiceClient(service);
    final Path scratchDir = new Path(scratchDirStr);
    Configuration conf = new Configuration();
    FileSystem fs = scratchDir.getFileSystem(conf);
    if (isLocal) {
      fs = FileSystem.getLocal(conf);
    }
    assertTrue(fs.exists(scratchDir));

    FileStatus[] fStatus = fs.globStatus(scratchDir);
    boolean foo = fStatus[0].equals(new FsPermission((short)0777));
    assertEquals(new FsPermission((short)0777), fStatus[0].getPermission());
    service.stop();
    fs.delete(scratchDir, true);
    System.clearProperty(stageDirConfigStr);
  }
View Full Code Here


        hconf.getBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS));


    CLIService cliService = new CLIService();
    cliService.init(hconf);
    ThriftCLIService tcliService = new ThriftBinaryCLIService(cliService);
    tcliService.init(hconf);
    TProcessorFactory procFactory = PlainSaslHelper.getPlainProcessorFactory(tcliService);
    assertEquals("doAs enabled processor for unsecure mode",
        procFactory.getProcessor(null).getClass(), TSetIpAddressProcessor.class);
  }
View Full Code Here

        hconf.getBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS));


    CLIService cliService = new CLIService(null);
    cliService.init(hconf);
    ThriftCLIService tcliService = new ThriftBinaryCLIService(cliService);
    tcliService.init(hconf);
    TProcessorFactory procFactory = PlainSaslHelper.getPlainProcessorFactory(tcliService);
    assertEquals("doAs enabled processor for unsecure mode",
        procFactory.getProcessor(null).getClass(), TSetIpAddressProcessor.class);
  }
View Full Code Here

        hconf.getBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS));


    CLIService cliService = new CLIService();
    cliService.init(hconf);
    ThriftCLIService tcliService = new ThriftCLIService(cliService);
    tcliService.init(hconf);
    TProcessorFactory procFactory = PlainSaslHelper.getPlainProcessorFactory(tcliService);
    assertEquals("doAs enabled processor for unsecure mode",
        procFactory.getProcessor(null).getClass(), TUGIContainingProcessor.class);
  }
View Full Code Here

  @Override
  public synchronized void init(HiveConf hiveConf) {
    cliService = new CLIService();
    addService(cliService);

    thriftCLIService = new ThriftCLIService(cliService);
    addService(thriftCLIService);

    super.init(hiveConf);
  }
View Full Code Here

TOP

Related Classes of org.apache.hive.service.cli.thrift.ThriftCLIService

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.