public DFSck(Configuration conf, PrintStream out) throws IOException { super(conf); this.ugi = UserGroupInformation.getCurrentUser(); this.out = out; this.connectionFactory = URLConnectionFactory .newDefaultURLConnectionFactory(conf); this.isSpnegoEnabled = UserGroupInformation.isSecurityEnabled(); }
DFSConfigKeys.DFS_QJOURNAL_HTTP_READ_TIMEOUT_DEFAULT); this.connectionFactory = URLConnectionFactory .newDefaultURLConnectionFactory(connectTimeoutMs, readTimeoutMs, conf);
public DFSck(Configuration conf, PrintStream out) throws IOException { super(conf); this.ugi = UserGroupInformation.getCurrentUser(); this.out = out; this.connectionFactory = URLConnectionFactory .newDefaultURLConnectionFactory(conf); this.isSpnegoEnabled = UserGroupInformation.isSecurityEnabled(); }
public DFSck(Configuration conf, PrintStream out) throws IOException { super(conf); this.ugi = UserGroupInformation.getCurrentUser(); this.out = out; this.connectionFactory = URLConnectionFactory .newDefaultURLConnectionFactory(conf); this.isSpnegoEnabled = UserGroupInformation.isSecurityEnabled(); }
this.loggers = new AsyncLoggerSet(createLoggers(loggerFactory)); this.connectionFactory = URLConnectionFactory .newDefaultURLConnectionFactory(conf);
this.loggers = new AsyncLoggerSet(createLoggers(loggerFactory)); this.connectionFactory = URLConnectionFactory .newDefaultURLConnectionFactory(conf);
@Override public void initialize(final URI name, final Configuration conf) throws IOException { super.initialize(name, conf); setConf(conf); this.connectionFactory = URLConnectionFactory .newDefaultURLConnectionFactory(conf); this.ugi = UserGroupInformation.getCurrentUser(); this.nnUri = getNamenodeUri(name); this.tokenServiceName = SecurityUtil.buildTokenService(nnUri); try { this.hftpURI = new URI(name.getScheme(), name.getAuthority(), null, null, null); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } initTokenAspect(); if (UserGroupInformation.isSecurityEnabled()) { tokenAspect.initDelegationToken(ugi); } }
@Override public void initialize(final URI name, final Configuration conf) throws IOException { super.initialize(name, conf); setConf(conf); this.connectionFactory = URLConnectionFactory .newDefaultURLConnectionFactory(conf); this.ugi = UserGroupInformation.getCurrentUser(); this.nnUri = getNamenodeUri(name); this.tokenServiceName = SecurityUtil.buildTokenService(nnUri); try { this.hftpURI = new URI(name.getScheme(), name.getAuthority(), null, null, null); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } initTokenAspect(); if (UserGroupInformation.isSecurityEnabled()) { tokenAspect.initDelegationToken(ugi); } }
@BeforeClass public static void setUp() throws Exception { File base = new File(BASEDIR); FileUtil.fullyDelete(base); base.mkdirs(); conf = new Configuration(); keystoresDir = new File(BASEDIR).getAbsolutePath(); sslConfDir = KeyStoreTestUtil.getClasspathDir(TestNameNodeHttpServer.class); KeyStoreTestUtil.setupSSLConfig(keystoresDir, sslConfDir, conf, false); connectionFactory = URLConnectionFactory .newDefaultURLConnectionFactory(conf); }
@Test public void testSSLInitFailure() throws Exception { Configuration conf = new Configuration(); conf.set(SSLFactory.SSL_HOSTNAME_VERIFIER_KEY, "foo"); GenericTestUtils.LogCapturer logs = GenericTestUtils.LogCapturer.captureLogs( LoggerFactory.getLogger(URLConnectionFactory.class)); URLConnectionFactory.newDefaultURLConnectionFactory(conf); Assert.assertTrue("Expected log for ssl init failure not found!", logs.getOutput().contains( "Cannot load customized ssl related configuration")); } }
LOG.debug("Not enabling OAuth2 in WebHDFS"); connectionFactory = URLConnectionFactory .newDefaultURLConnectionFactory(connectTimeout, readTimeout, conf);