New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE for SpnegoFilter #6338
Labels
Comments
It looks like the context was not well established according to this link: http://stackoverflow.com/questions/34306386/gsscontext-with-null-srcname. We need to understand why it's the case for the curl case. cc: @zhenyuy-fb |
branimir-vujicic
added a commit
to axiomq/presto
that referenced
this issue
Sep 16, 2023
Feature Toggles should allow teams to modify system behavior without changing code. Feature Toggles are configured using google guice. Basic definition of toggles are crated using FeatureToggleBinder. FeatureToggleBinder creates FeatureToggle and additional configuration can be done using feature configuration. In current stage Feature Toggles supports: - if / else based feature toggles - Dependency Injection based Hot reloading implementation without restart require code refactoring to add an interface when injecting the new implementation/class - using various toggle strategies along with simple on / off toggles configuration: to allow feature toggle configuration four lines are needed in config.properties file ``` features.config-source-type=file features.config-source=/etc/feature-config.properties features.config-type=properties features.refresh-period=30s ``` `configuration-source-type` is source type for Feature Toggles configuration `features.config-source` is a source (file) of the configuration `features.config-type` format in which configuration is stored (json or properties) `features.refresh-period` configuration refresh period Defining Feature Toggles Feature toggle definition is done in google guice module using `FeatureToggleBinder` simple feature toggle definition ``` featureToggleBinder(binder) .featureId("featureXX") .bind() ``` This example creates bindings for @Inject ``` @Inject public Runner(@FeatureToggle("featureXX") Supplier<Boolean> isFeatureXXEnabled) { this.isFeatureXXEnabled = isFeatureXXEnabled; } ``` `isFeatureXXEnabled` can be used to test if feature is enabled or disabled: ``` boolean testFeatureXXEnabled() { return isFeatureXXEnabled.get(); } ``` hot reloadable feature toggle definition ``` featureToggleBinder(binder, Feature01.class) .featureId("feature01") .baseClass(Feature01.class) .defaultClass(Feature01Impl01.class) .allOf(Feature01Impl01.class, Feature01Impl02.class) .bind() ``` adding Feature Toggle switching strategy ``` featureToggleBinder(binder) .featureId("feature04") .toggleStrategy("AllowAll") .toggleStrategyConfig(ImmutableMap.of("key", "value", "key2", "value2")) ``` feature-config.properties file example ``` # feature query-logger feature.query-logger.enabled=true feature.query-logger.strategy=OsToggle feature.query-logger.strategy.os_name=.*Linux.* #feature.query-rate-limiter feature.query-rate-limiter.currentInstance=com.facebook.presto.server.protocol.QueryBlockingRateLimiter # feature.query-cancel feature.query-cancel.strategy=AllowList feature.query-cancel.strategy.allow-list-source=.*IDEA.* feature.query-cancel.strategy.allow-list-user=.*prestodb ``` in this example for first feature `query-logger` changing value of feature.query-logger.enabled to `false` will 'disable' this feature. Changes will be effective within refresh period. Pass column delimiter info to reader (prestodb#6338) Summary: Pull Request resolved: facebookincubator/velox#6338 Reviewed By: Yuhta Differential Revision: D48457913 fbshipit-source-id: 57d76dfa229de3801bf3181f780a485b628427ad
branimir-vujicic
added a commit
to axiomq/presto
that referenced
this issue
Sep 18, 2023
Feature Toggles should allow teams to modify system behavior without changing code. Feature Toggles are configured using google guice. Basic definition of toggles are crated using FeatureToggleBinder. FeatureToggleBinder creates FeatureToggle and additional configuration can be done using feature configuration. In current stage Feature Toggles supports: - if / else based feature toggles - Dependency Injection based Hot reloading implementation without restart require code refactoring to add an interface when injecting the new implementation/class - using various toggle strategies along with simple on / off toggles configuration: to allow feature toggle configuration four lines are needed in config.properties file ``` features.config-source-type=file features.config-source=/etc/feature-config.properties features.config-type=properties features.refresh-period=30s ``` `configuration-source-type` is source type for Feature Toggles configuration `features.config-source` is a source (file) of the configuration `features.config-type` format in which configuration is stored (json or properties) `features.refresh-period` configuration refresh period Defining Feature Toggles Feature toggle definition is done in google guice module using `FeatureToggleBinder` simple feature toggle definition ``` featureToggleBinder(binder) .featureId("featureXX") .bind() ``` This example creates bindings for @Inject ``` @Inject public Runner(@FeatureToggle("featureXX") Supplier<Boolean> isFeatureXXEnabled) { this.isFeatureXXEnabled = isFeatureXXEnabled; } ``` `isFeatureXXEnabled` can be used to test if feature is enabled or disabled: ``` boolean testFeatureXXEnabled() { return isFeatureXXEnabled.get(); } ``` hot reloadable feature toggle definition ``` featureToggleBinder(binder, Feature01.class) .featureId("feature01") .baseClass(Feature01.class) .defaultClass(Feature01Impl01.class) .allOf(Feature01Impl01.class, Feature01Impl02.class) .bind() ``` adding Feature Toggle switching strategy ``` featureToggleBinder(binder) .featureId("feature04") .toggleStrategy("AllowAll") .toggleStrategyConfig(ImmutableMap.of("key", "value", "key2", "value2")) ``` feature-config.properties file example ``` # feature query-logger feature.query-logger.enabled=true feature.query-logger.strategy=OsToggle feature.query-logger.strategy.os_name=.*Linux.* #feature.query-rate-limiter feature.query-rate-limiter.currentInstance=com.facebook.presto.server.protocol.QueryBlockingRateLimiter # feature.query-cancel feature.query-cancel.strategy=AllowList feature.query-cancel.strategy.allow-list-source=.*IDEA.* feature.query-cancel.strategy.allow-list-user=.*prestodb ``` in this example for first feature `query-logger` changing value of feature.query-logger.enabled to `false` will 'disable' this feature. Changes will be effective within refresh period. Pass column delimiter info to reader (prestodb#6338) Summary: Pull Request resolved: facebookincubator/velox#6338 Reviewed By: Yuhta Differential Revision: D48457913 fbshipit-source-id: 57d76dfa229de3801bf3181f780a485b628427ad Memory pool refactoring by removing MemoryPoolBase and ScopedMemoryPool (prestodb#3191) Summary: Remove MemoryPoolBase and ScopedMemoryPool, and consolidate into one memory pool interface MemoryPool and one production implementation MemoryPoolImp. For the details about the memory pool hierarchy and ownership see the class comment for MemoryPool. A query gets the root memory pool object from memory manager by calling IMemoryManager::getChild(). IMemoryManager is the interface of memory manger. During the query execution, we calls a parent memory pool's getChild() to create a child memory pool object. This PR also changes the references between parent and child memory pool objects: 1. parent pool object tracks the child pool object through a raw pointer; 2. child pool object holds a shared reference to parent pool object so a parent pool object can only destroy after all its child pool objects have been destroyed; 4. child pool object destruction removes its raw pointer tracked in the parent pool and release the shared reference on its parent. Pull Request resolved: facebookincubator/velox#3191 Reviewed By: mbasmanova Differential Revision: D41206814 Pulled By: xiaoxmeng fbshipit-source-id: d9ce695c9cf2f558b56c46fc67fd6b7e1c7eac57
branimir-vujicic
added a commit
to axiomq/presto
that referenced
this issue
Sep 18, 2023
Feature Toggles should allow teams to modify system behavior without changing code. Feature Toggles are configured using google guice. Basic definition of toggles are crated using FeatureToggleBinder. FeatureToggleBinder creates FeatureToggle and additional configuration can be done using feature configuration. In current stage Feature Toggles supports: - if / else based feature toggles - Dependency Injection based Hot reloading implementation without restart require code refactoring to add an interface when injecting the new implementation/class - using various toggle strategies along with simple on / off toggles configuration: to allow feature toggle configuration four lines are needed in config.properties file ``` features.config-source-type=file features.config-source=/etc/feature-config.properties features.config-type=properties features.refresh-period=30s ``` `configuration-source-type` is source type for Feature Toggles configuration `features.config-source` is a source (file) of the configuration `features.config-type` format in which configuration is stored (json or properties) `features.refresh-period` configuration refresh period Defining Feature Toggles Feature toggle definition is done in google guice module using `FeatureToggleBinder` simple feature toggle definition ``` featureToggleBinder(binder) .featureId("featureXX") .bind() ``` This example creates bindings for @Inject ``` @Inject public Runner(@FeatureToggle("featureXX") Supplier<Boolean> isFeatureXXEnabled) { this.isFeatureXXEnabled = isFeatureXXEnabled; } ``` `isFeatureXXEnabled` can be used to test if feature is enabled or disabled: ``` boolean testFeatureXXEnabled() { return isFeatureXXEnabled.get(); } ``` hot reloadable feature toggle definition ``` featureToggleBinder(binder, Feature01.class) .featureId("feature01") .baseClass(Feature01.class) .defaultClass(Feature01Impl01.class) .allOf(Feature01Impl01.class, Feature01Impl02.class) .bind() ``` adding Feature Toggle switching strategy ``` featureToggleBinder(binder) .featureId("feature04") .toggleStrategy("AllowAll") .toggleStrategyConfig(ImmutableMap.of("key", "value", "key2", "value2")) ``` feature-config.properties file example ``` # feature query-logger feature.query-logger.enabled=true feature.query-logger.strategy=OsToggle feature.query-logger.strategy.os_name=.*Linux.* #feature.query-rate-limiter feature.query-rate-limiter.currentInstance=com.facebook.presto.server.protocol.QueryBlockingRateLimiter # feature.query-cancel feature.query-cancel.strategy=AllowList feature.query-cancel.strategy.allow-list-source=.*IDEA.* feature.query-cancel.strategy.allow-list-user=.*prestodb ``` in this example for first feature `query-logger` changing value of feature.query-logger.enabled to `false` will 'disable' this feature. Changes will be effective within refresh period. Pass column delimiter info to reader (prestodb#6338) Summary: Pull Request resolved: facebookincubator/velox#6338 Reviewed By: Yuhta Differential Revision: D48457913 fbshipit-source-id: 57d76dfa229de3801bf3181f780a485b628427ad Memory pool refactoring by removing MemoryPoolBase and ScopedMemoryPool (prestodb#3191) Summary: Remove MemoryPoolBase and ScopedMemoryPool, and consolidate into one memory pool interface MemoryPool and one production implementation MemoryPoolImp. For the details about the memory pool hierarchy and ownership see the class comment for MemoryPool. A query gets the root memory pool object from memory manager by calling IMemoryManager::getChild(). IMemoryManager is the interface of memory manger. During the query execution, we calls a parent memory pool's getChild() to create a child memory pool object. This PR also changes the references between parent and child memory pool objects: 1. parent pool object tracks the child pool object through a raw pointer; 2. child pool object holds a shared reference to parent pool object so a parent pool object can only destroy after all its child pool objects have been destroyed; 4. child pool object destruction removes its raw pointer tracked in the parent pool and release the shared reference on its parent. Pull Request resolved: facebookincubator/velox#3191 Reviewed By: mbasmanova Differential Revision: D41206814 Pulled By: xiaoxmeng fbshipit-source-id: d9ce695c9cf2f558b56c46fc67fd6b7e1c7eac57
branimir-vujicic
added a commit
to axiomq/presto
that referenced
this issue
Sep 18, 2023
Feature Toggles should allow teams to modify system behavior without changing code. Feature Toggles are configured using google guice. Basic definition of toggles are crated using FeatureToggleBinder. FeatureToggleBinder creates FeatureToggle and additional configuration can be done using feature configuration. In current stage Feature Toggles supports: - if / else based feature toggles - Dependency Injection based Hot reloading implementation without restart require code refactoring to add an interface when injecting the new implementation/class - using various toggle strategies along with simple on / off toggles configuration: to allow feature toggle configuration four lines are needed in config.properties file ``` features.config-source-type=file features.config-source=/etc/feature-config.properties features.config-type=properties features.refresh-period=30s ``` `configuration-source-type` is source type for Feature Toggles configuration `features.config-source` is a source (file) of the configuration `features.config-type` format in which configuration is stored (json or properties) `features.refresh-period` configuration refresh period Defining Feature Toggles Feature toggle definition is done in google guice module using `FeatureToggleBinder` simple feature toggle definition ``` featureToggleBinder(binder) .featureId("featureXX") .bind() ``` This example creates bindings for @Inject ``` @Inject public Runner(@FeatureToggle("featureXX") Supplier<Boolean> isFeatureXXEnabled) { this.isFeatureXXEnabled = isFeatureXXEnabled; } ``` `isFeatureXXEnabled` can be used to test if feature is enabled or disabled: ``` boolean testFeatureXXEnabled() { return isFeatureXXEnabled.get(); } ``` hot reloadable feature toggle definition ``` featureToggleBinder(binder, Feature01.class) .featureId("feature01") .baseClass(Feature01.class) .defaultClass(Feature01Impl01.class) .allOf(Feature01Impl01.class, Feature01Impl02.class) .bind() ``` adding Feature Toggle switching strategy ``` featureToggleBinder(binder) .featureId("feature04") .toggleStrategy("AllowAll") .toggleStrategyConfig(ImmutableMap.of("key", "value", "key2", "value2")) ``` feature-config.properties file example ``` # feature query-logger feature.query-logger.enabled=true feature.query-logger.strategy=OsToggle feature.query-logger.strategy.os_name=.*Linux.* #feature.query-rate-limiter feature.query-rate-limiter.currentInstance=com.facebook.presto.server.protocol.QueryBlockingRateLimiter # feature.query-cancel feature.query-cancel.strategy=AllowList feature.query-cancel.strategy.allow-list-source=.*IDEA.* feature.query-cancel.strategy.allow-list-user=.*prestodb ``` in this example for first feature `query-logger` changing value of feature.query-logger.enabled to `false` will 'disable' this feature. Changes will be effective within refresh period. Pass column delimiter info to reader (prestodb#6338) Summary: Pull Request resolved: facebookincubator/velox#6338 Reviewed By: Yuhta Differential Revision: D48457913 fbshipit-source-id: 57d76dfa229de3801bf3181f780a485b628427ad Memory pool refactoring by removing MemoryPoolBase and ScopedMemoryPool (prestodb#3191) Summary: Remove MemoryPoolBase and ScopedMemoryPool, and consolidate into one memory pool interface MemoryPool and one production implementation MemoryPoolImp. For the details about the memory pool hierarchy and ownership see the class comment for MemoryPool. A query gets the root memory pool object from memory manager by calling IMemoryManager::getChild(). IMemoryManager is the interface of memory manger. During the query execution, we calls a parent memory pool's getChild() to create a child memory pool object. This PR also changes the references between parent and child memory pool objects: 1. parent pool object tracks the child pool object through a raw pointer; 2. child pool object holds a shared reference to parent pool object so a parent pool object can only destroy after all its child pool objects have been destroyed; 4. child pool object destruction removes its raw pointer tracked in the parent pool and release the shared reference on its parent. Pull Request resolved: facebookincubator/velox#3191 Reviewed By: mbasmanova Differential Revision: D41206814 Pulled By: xiaoxmeng fbshipit-source-id: d9ce695c9cf2f558b56c46fc67fd6b7e1c7eac57
branimir-vujicic
added a commit
to axiomq/presto
that referenced
this issue
Sep 18, 2023
Feature Toggles should allow teams to modify system behavior without changing code. Feature Toggles are configured using google guice. Basic definition of toggles are crated using FeatureToggleBinder. FeatureToggleBinder creates FeatureToggle and additional configuration can be done using feature configuration. In current stage Feature Toggles supports: - if / else based feature toggles - Dependency Injection based Hot reloading implementation without restart require code refactoring to add an interface when injecting the new implementation/class - using various toggle strategies along with simple on / off toggles configuration: to allow feature toggle configuration four lines are needed in config.properties file ``` features.config-source-type=file features.config-source=/etc/feature-config.properties features.config-type=properties features.refresh-period=30s ``` `configuration-source-type` is source type for Feature Toggles configuration `features.config-source` is a source (file) of the configuration `features.config-type` format in which configuration is stored (json or properties) `features.refresh-period` configuration refresh period Defining Feature Toggles Feature toggle definition is done in google guice module using `FeatureToggleBinder` simple feature toggle definition ``` featureToggleBinder(binder) .featureId("featureXX") .bind() ``` This example creates bindings for @Inject ``` @Inject public Runner(@FeatureToggle("featureXX") Supplier<Boolean> isFeatureXXEnabled) { this.isFeatureXXEnabled = isFeatureXXEnabled; } ``` `isFeatureXXEnabled` can be used to test if feature is enabled or disabled: ``` boolean testFeatureXXEnabled() { return isFeatureXXEnabled.get(); } ``` hot reloadable feature toggle definition ``` featureToggleBinder(binder, Feature01.class) .featureId("feature01") .baseClass(Feature01.class) .defaultClass(Feature01Impl01.class) .allOf(Feature01Impl01.class, Feature01Impl02.class) .bind() ``` adding Feature Toggle switching strategy ``` featureToggleBinder(binder) .featureId("feature04") .toggleStrategy("AllowAll") .toggleStrategyConfig(ImmutableMap.of("key", "value", "key2", "value2")) ``` feature-config.properties file example ``` # feature query-logger feature.query-logger.enabled=true feature.query-logger.strategy=OsToggle feature.query-logger.strategy.os_name=.*Linux.* #feature.query-rate-limiter feature.query-rate-limiter.currentInstance=com.facebook.presto.server.protocol.QueryBlockingRateLimiter # feature.query-cancel feature.query-cancel.strategy=AllowList feature.query-cancel.strategy.allow-list-source=.*IDEA.* feature.query-cancel.strategy.allow-list-user=.*prestodb ``` in this example for first feature `query-logger` changing value of feature.query-logger.enabled to `false` will 'disable' this feature. Changes will be effective within refresh period. Pass column delimiter info to reader (prestodb#6338) Summary: Pull Request resolved: facebookincubator/velox#6338 Reviewed By: Yuhta Differential Revision: D48457913 fbshipit-source-id: 57d76dfa229de3801bf3181f780a485b628427ad
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Apparently,
GSSContext.getSrcName()
can return null, even ifisEstablished()
is true. I suppose we should handle that by returningOptional.empty()
? Maybe with a debug log entry?The text was updated successfully, but these errors were encountered: