Beispiel #1
0
 public _NamedRunnable_324(ValueQueue <E> _enclosing, Queue <E> keyQueue, string baseArg1
                           )
     : base(baseArg1)
 {
     this._enclosing = _enclosing;
     this.keyQueue   = keyQueue;
 }
Beispiel #2
0
        /// <exception cref="System.IO.IOException"/>
        public KMSClientProvider(URI uri, Configuration conf)
            : base(conf)
        {
            kmsUrl = CreateServiceURL(ExtractKMSPath(uri));
            if (Runtime.EqualsIgnoreCase("https", new Uri(kmsUrl).Scheme))
            {
                sslFactory = new SSLFactory(SSLFactory.Mode.Client, conf);
                try
                {
                    sslFactory.Init();
                }
                catch (GeneralSecurityException ex)
                {
                    throw new IOException(ex);
                }
            }
            int timeout = conf.GetInt(TimeoutAttr, DefaultTimeout);

            authRetry          = conf.GetInt(AuthRetry, DefaultAuthRetry);
            configurator       = new KMSClientProvider.TimeoutConnConfigurator(timeout, sslFactory);
            encKeyVersionQueue = new ValueQueue <KeyProviderCryptoExtension.EncryptedKeyVersion
                                                 >(conf.GetInt(CommonConfigurationKeysPublic.KmsClientEncKeyCacheSize, CommonConfigurationKeysPublic
                                                               .KmsClientEncKeyCacheSizeDefault), conf.GetFloat(CommonConfigurationKeysPublic.KmsClientEncKeyCacheLowWatermark
                                                                                                                , CommonConfigurationKeysPublic.KmsClientEncKeyCacheLowWatermarkDefault), conf.GetInt
                                                       (CommonConfigurationKeysPublic.KmsClientEncKeyCacheExpiryMs, CommonConfigurationKeysPublic
                                                       .KmsClientEncKeyCacheExpiryDefault), conf.GetInt(CommonConfigurationKeysPublic.KmsClientEncKeyCacheNumRefillThreads
                                                                                                        , CommonConfigurationKeysPublic.KmsClientEncKeyCacheNumRefillThreadsDefault), new
                                                   KMSClientProvider.EncryptedQueueRefiller(this));
            authToken = new DelegationTokenAuthenticatedURL.Token();
            actualUgi = (UserGroupInformation.GetCurrentUser().GetAuthenticationMethod() == UserGroupInformation.AuthenticationMethod
                         .Proxy) ? UserGroupInformation.GetCurrentUser().GetRealUser() : UserGroupInformation
                        .GetCurrentUser();
        }