Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import java.util.function.Supplier;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* The common implementation of Configuration interface for configuring the {@link
Expand All @@ -51,8 +52,8 @@ public abstract class LocalPolarisMetaStoreManagerFactory<StoreType>

protected PolarisStorageIntegrationProvider storageIntegration;

private final Logger LOGGER =
org.slf4j.LoggerFactory.getLogger(LocalPolarisMetaStoreManagerFactory.class);
private static final Logger LOGGER =
LoggerFactory.getLogger(LocalPolarisMetaStoreManagerFactory.class);

protected abstract StoreType createBackingStore(@NotNull PolarisDiagnostics diagnostics);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

/** A mapper to serialize/deserialize polaris objects. */
public class PolarisObjectMapperUtil {
private static final Logger LOGGER = LoggerFactory.getLogger(PolarisObjectMapperUtil.class);

/** mapper, allows to serialize/deserialize properties to/from JSON */
private static final ObjectMapper MAPPER = configureMapper();

Expand Down Expand Up @@ -174,8 +176,7 @@ public int getAttemptCount() {
}
return new TaskExecutionState(executorId, lastAttemptStartTime, attemptCount);
} catch (IOException e) {
Logger logger = LoggerFactory.getLogger(PolarisObjectMapperUtil.class);
logger
LOGGER
.atWarn()
.addKeyValue("json", entity.getProperties())
.addKeyValue("error", e.getMessage())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
public class AzureCredentialsStorageIntegration
extends InMemoryStorageIntegration<AzureStorageConfigurationInfo> {

private final Logger LOGGER = LoggerFactory.getLogger(AzureCredentialsStorageIntegration.class);
private static final Logger LOGGER =
LoggerFactory.getLogger(AzureCredentialsStorageIntegration.class);

final DefaultAzureCredential defaultAzureCredential;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
*/
public class GcpCredentialsStorageIntegration
extends InMemoryStorageIntegration<GcpStorageConfigurationInfo> {
private final Logger LOGGER = LoggerFactory.getLogger(GcpCredentialsStorageIntegration.class);
private static final Logger LOGGER =
LoggerFactory.getLogger(GcpCredentialsStorageIntegration.class);

private final GoogleCredentials sourceCredentials;
private final HttpTransportFactory transportFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class GcpCredentialsStorageIntegrationTest {
private final String gcsServiceKeyJsonFileLocation =
System.getenv("GOOGLE_APPLICATION_CREDENTIALS");

private final Logger LOGGER = LoggerFactory.getLogger(GcpCredentialsStorageIntegrationTest.class);
private static final Logger LOGGER =
LoggerFactory.getLogger(GcpCredentialsStorageIntegrationTest.class);

@ParameterizedTest
@ValueSource(booleans = {true, false})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@
import java.util.Map;
import net.sourceforge.argparse4j.inf.Namespace;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Command for bootstrapping root level service principals for each realm. This command will invoke
* a default implementation which generates random user id and secret. These credentials will be
* printed out to the log and standard output (stdout).
*/
public class BootstrapRealmsCommand extends ConfiguredCommand<PolarisApplicationConfig> {
private Logger LOGGER = org.slf4j.LoggerFactory.getLogger(BootstrapRealmsCommand.class);
private static final Logger LOGGER = LoggerFactory.getLogger(BootstrapRealmsCommand.class);

public BootstrapRealmsCommand() {
super("bootstrap", "bootstraps principal credentials for all realms and prints them to log");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
import io.polaris.service.context.CallContextResolver;
import net.sourceforge.argparse4j.inf.Namespace;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/** Command for purging all metadata associated with a realm */
public class PurgeRealmsCommand extends ConfiguredCommand<PolarisApplicationConfig> {
private Logger LOGGER = org.slf4j.LoggerFactory.getLogger(PurgeRealmsCommand.class);
private static final Logger LOGGER = LoggerFactory.getLogger(PurgeRealmsCommand.class);

public PurgeRealmsCommand() {
super("purge", "purge principal credentials for all realms and prints them to log");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected Optional<AuthenticatedPolarisPrincipal> getPrincipal(DecodedToken toke
PolarisEntitySubType.NULL_SUBTYPE,
tokenInfo.getSub()));
} catch (Exception e) {
LoggerFactory.getLogger(BasePolarisAuthenticator.class)
LOGGER
.atError()
.addKeyValue("errMsg", e.getMessage())
.addKeyValue("stackTrace", ExceptionUtils.getStackTrace(e))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* cleanup tasks are scheduled in a batch so tasks should be stored atomically.
*/
public class TableCleanupTaskHandler implements TaskHandler {
private final Logger LOGGER = LoggerFactory.getLogger(TableCleanupTaskHandler.class);
private static final Logger LOGGER = LoggerFactory.getLogger(TableCleanupTaskHandler.class);
private final TaskExecutor taskExecutor;
private final MetaStoreManagerFactory metaStoreManagerFactory;
private final Function<TaskEntity, FileIO> fileIOSupplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@
import org.junit.jupiter.api.extension.ParameterContext;
import org.junit.jupiter.api.extension.ParameterResolutionException;
import org.junit.jupiter.api.extension.ParameterResolver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SnowmanCredentialsExtension
implements BeforeAllCallback, AfterAllCallback, ParameterResolver {

private static final Logger LOGGER = LoggerFactory.getLogger(SnowmanCredentialsExtension.class);
private SnowmanCredentials snowmanCredentials;

public record SnowmanCredentials(String clientId, String clientSecret) {}
Expand All @@ -53,7 +55,7 @@ public void beforeAll(ExtensionContext extensionContext) throws Exception {
.get(REALM_PROPERTY_KEY, String.class);

if (adminSecrets == null) {
LoggerFactory.getLogger(SnowmanCredentialsExtension.class)
LOGGER
.atError()
.log(
"No admin secrets configured - you must also configure your test with PolarisConnectionExtension");
Expand Down Expand Up @@ -159,7 +161,7 @@ public void afterAll(ExtensionContext extensionContext) throws Exception {
.get(REALM_PROPERTY_KEY, String.class);

if (adminSecrets == null) {
LoggerFactory.getLogger(SnowmanCredentialsExtension.class)
LOGGER
.atError()
.log(
"No admin secrets configured - you must also configure your test with PolarisConnectionExtension");
Expand Down