diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6022f8b31775da44e5202bd2dd77daf81de702fb..343f177b69367fc944664e0afbcb6db54fa1c00f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -90,8 +90,14 @@ lint-docker-compose: lint-helm-chart: image: docker.io/alpine:${ALPINE_VERSION} stage: lint + variables: + VERSION: 4.45.1 + BINARY: yq_linux_amd64 before_script: - - apk add --no-cache helm git bash + - apk add --no-cache helm git bash wget + - 'wget https://github.com/mikefarah/yq/releases/download/v${VERSION}/${BINARY} -O /usr/bin/yq && chmod +x /usr/bin/yq' + - diff <(yq '.appVersion' ./helm/dbrepo/Chart.yaml) <(echo "${APP_VERSION}") + - diff <(yq '.version' ./helm/dbrepo/Chart.yaml) <(echo "${APP_VERSION}") - cp ./helm/dbrepo/values.schema.json ./CI_values.schema.json - helm plugin install https://github.com/losisin/helm-values-schema-json.git - helm package ./helm/seaweedfs --destination ./build diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/AccessServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/AccessServiceMariaDbImpl.java index fc756583688e0a6a6864a646d0b04b4461474fcb..ac7caf16d4e21c4380a3f77f1b2149fa7d5d560b 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/AccessServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/AccessServiceMariaDbImpl.java @@ -4,6 +4,7 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.AccessTypeDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto; import at.ac.tuwien.ifs.dbrepo.core.exception.DatabaseMalformedException; +import at.ac.tuwien.ifs.dbrepo.core.i18n.Constants; import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; import at.ac.tuwien.ifs.dbrepo.service.AccessService; import com.mchange.v2.c3p0.ComboPooledDataSource; @@ -44,8 +45,8 @@ public class AccessServiceMariaDbImpl extends DataConnector implements AccessSer .execute(); log.atDebug() .setMessage("create user in database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "create_user") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "create_user") .log(); /* grant access */ final String grants = access != AccessTypeDto.READ ? grantDefaultWrite : grantDefaultRead; @@ -54,8 +55,8 @@ public class AccessServiceMariaDbImpl extends DataConnector implements AccessSer .execute(); log.atDebug() .setMessage("grant user privileges in database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "grant_user_privileges") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, Constants.GRANT_USER_PRIVILEGES) .log(); /* grant query store */ start = System.currentTimeMillis(); @@ -63,16 +64,16 @@ public class AccessServiceMariaDbImpl extends DataConnector implements AccessSer .execute(); log.atDebug() .setMessage("grant procedure privileges in database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "grant_procedure_privileges") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "grant_procedure_privileges") .log(); /* apply access rights */ start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.databaseFlushPrivilegesQuery()); log.atDebug() .setMessage("flush privileges in database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "flush_privileges") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "flush_privileges") .log(); connection.commit(); } catch (SQLException e) { @@ -99,8 +100,8 @@ public class AccessServiceMariaDbImpl extends DataConnector implements AccessSer .execute(); log.atDebug() .setMessage("update privileges in database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "grant_user_privileges") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, Constants.GRANT_USER_PRIVILEGES) .log(); /* apply access rights */ connection.prepareStatement(mariaDbMapper.databaseFlushPrivilegesQuery()); @@ -127,8 +128,8 @@ public class AccessServiceMariaDbImpl extends DataConnector implements AccessSer .execute(); log.atDebug() .setMessage("revoke privileges in database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "grant_user_privileges") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, Constants.GRANT_USER_PRIVILEGES) .log(); /* apply access rights */ start = System.currentTimeMillis(); @@ -136,8 +137,8 @@ public class AccessServiceMariaDbImpl extends DataConnector implements AccessSer .execute(); log.atDebug() .setMessage("flush privileges in database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "flush_privileges") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "flush_privileges") .log(); connection.commit(); } catch (SQLException e) { diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/CacheServiceImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/CacheServiceImpl.java index 0cd04b304def0ef9812a57594460ab8c1f07af3b..915c8b0b32e4f6e12ce4c9e12b108d492d98782e 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/CacheServiceImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/CacheServiceImpl.java @@ -57,13 +57,13 @@ public class CacheServiceImpl implements CacheService { final DatabaseDto cacheDatabase = databaseCache.getIfPresent(id); if (cacheDatabase != null) { log.atTrace() - .setMessage("found database with id " + id + " in cache") + .setMessage("found database with id " + id) .addKeyValue("cache_hit", true) .log(); return cacheDatabase; } log.atTrace() - .setMessage("reload database from metadata service with id " + id + " in cache") + .setMessage("reload database from metadata service with id " + id) .addKeyValue("cache_hit", false) .log(); } @@ -84,13 +84,13 @@ public class CacheServiceImpl implements CacheService { final TableDto cacheTable = tableCache.getIfPresent(tableId); if (cacheTable != null) { log.atTrace() - .setMessage("found table with id " + tableId + " in cache") + .setMessage("found table with id " + tableId) .addKeyValue("cache_hit", true) .log(); return cacheTable; } log.atTrace() - .setMessage("reload table from metadata service with id " + tableId + " in cache") + .setMessage("reload table from metadata service with id " + tableId) .addKeyValue("cache_hit", false) .log(); final TableDto table = gateway.getTableById(databaseId, tableId); @@ -104,13 +104,13 @@ public class CacheServiceImpl implements CacheService { final TableStatisticDto cacheStatistic = statisticCache.getIfPresent(view.getId()); if (cacheStatistic != null) { log.atTrace() - .setMessage("found view with id " + view.getId() + " in cache") + .setMessage("found view with id " + view.getId()) .addKeyValue("cache_hit", true) .log(); return cacheStatistic; } log.atTrace() - .setMessage("reload view from metadata service with id " + view.getId() + " in cache") + .setMessage("reload view from metadata service with id " + view.getId()) .addKeyValue("cache_hit", false) .log(); final TableStatisticDto statistic = tableService.getStatistics(database, view.getInternalName()); @@ -125,13 +125,13 @@ public class CacheServiceImpl implements CacheService { final ContainerDto cacheContainer = containerCache.getIfPresent(id); if (cacheContainer != null) { log.atTrace() - .setMessage("found container with id " + id + " in cache") + .setMessage("found container with id " + id) .addKeyValue("cache_hit", true) .log(); return cacheContainer; } log.atTrace() - .setMessage("reload container from metadata service with id " + id + " in cache") + .setMessage("reload container from metadata service with id " + id) .addKeyValue("cache_hit", false) .log(); final ContainerDto container = gateway.getContainerById(id); @@ -145,13 +145,13 @@ public class CacheServiceImpl implements CacheService { final ViewDto cacheView = viewCache.getIfPresent(viewId); if (cacheView != null) { log.atTrace() - .setMessage("found view with id " + viewId + " in cache") + .setMessage("found view with id " + viewId) .addKeyValue("cache_hit", true) .log(); return cacheView; } log.atTrace() - .setMessage("reload view from metadata service with id " + viewId + " in cache") + .setMessage("reload view from metadata service with id " + viewId) .addKeyValue("cache_hit", false) .log(); final ViewDto view = gateway.getViewById(databaseId, viewId); @@ -165,13 +165,13 @@ public class CacheServiceImpl implements CacheService { final UserDto cacheUser = userCache.getIfPresent(id); if (cacheUser != null) { log.atTrace() - .setMessage("found user with id " + id + " in cache") + .setMessage("found user with id " + id) .addKeyValue("cache_hit", true) .log(); return cacheUser; } log.atTrace() - .setMessage("reload user from metadata service with id " + id + " in cache") + .setMessage("reload user from metadata service with id " + id) .addKeyValue("cache_hit", false) .log(); final UserDto user = gateway.getUserById(id); @@ -185,13 +185,13 @@ public class CacheServiceImpl implements CacheService { final DatabaseAccessDto cacheAccess = accessCache.getIfPresent(databaseId); if (cacheAccess != null) { log.atTrace() - .setMessage("found access for user with id " + userId + " in cache") + .setMessage("found access for user with id " + userId) .addKeyValue("cache_hit", true) .log(); return cacheAccess; } log.atTrace() - .setMessage("reload access from metadata service with user id " + userId + " in cache") + .setMessage("reload access from metadata service with user id " + userId) .addKeyValue("cache_hit", false) .log(); final DatabaseAccessDto access = gateway.getAccess(databaseId, userId); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ContainerServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ContainerServiceMariaDbImpl.java index 899f60d685d3d1ed95a329f7949033b91dfe1464..0c8504c25542f3880cc72bb98a78d1aa4367fc2d 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ContainerServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ContainerServiceMariaDbImpl.java @@ -7,6 +7,7 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.internal.CreateDatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserBriefDto; import at.ac.tuwien.ifs.dbrepo.core.exception.DatabaseMalformedException; import at.ac.tuwien.ifs.dbrepo.core.exception.QueryStoreCreateException; +import at.ac.tuwien.ifs.dbrepo.core.i18n.Constants; import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; import at.ac.tuwien.ifs.dbrepo.service.ContainerService; import com.mchange.v2.c3p0.ComboPooledDataSource; @@ -43,8 +44,8 @@ public class ContainerServiceMariaDbImpl extends DataConnector implements Contai connection.commit(); log.atDebug() .setMessage("created database: " + data.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "create_database") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "create_database") .log(); } catch (SQLException e) { connection.rollback(); @@ -79,32 +80,32 @@ public class ContainerServiceMariaDbImpl extends DataConnector implements Contai .execute(); log.atDebug() .setMessage("created query store in database: " + databaseName) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "create_query_store") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "create_query_store") .log(); start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.queryStoreCreateHashTableProcedureRawQuery()) .execute(); log.atDebug() .setMessage("created query store hash table procedure in database: " + databaseName) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "create_procedure_hash_table") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "create_procedure_hash_table") .log(); start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.queryStoreCreateStoreQueryProcedureRawQuery()) .execute(); log.atDebug() .setMessage("created query store procedure in database: " + databaseName) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "create_procedure_store_query") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "create_procedure_store_query") .log(); start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.queryStoreCreateInternalStoreQueryProcedureRawQuery()) .execute(); log.atDebug() .setMessage("created internal query store procedure in database: " + databaseName) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "create_procedure_internal_store_query") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "create_procedure_internal_store_query") .log(); connection.commit(); } catch (SQLException e) { diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/DatabaseServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/DatabaseServiceMariaDbImpl.java index 724ef43b2fd887d7fd87ac14314a90eb6f6d689a..fcb283f413450f0738790dceae8afdb2ca990f67 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/DatabaseServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/DatabaseServiceMariaDbImpl.java @@ -7,6 +7,7 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.table.constraints.unique.Unique import at.ac.tuwien.ifs.dbrepo.core.api.database.table.internal.TableCreateDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.internal.UpdateUserPasswordDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; +import at.ac.tuwien.ifs.dbrepo.core.i18n.Constants; import at.ac.tuwien.ifs.dbrepo.mapper.DataMapper; import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; import at.ac.tuwien.ifs.dbrepo.service.DatabaseService; @@ -51,8 +52,8 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas final ResultSet resultSet1 = statement1.executeQuery(); log.atDebug() .setMessage("inspected view: " + viewName + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "select_view_schema") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "select_view_schema") .log(); if (!resultSet1.next()) { throw new ViewNotFoundException("Failed to find view in the information schema"); @@ -69,8 +70,8 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas final ResultSet resultSet2 = statement2.executeQuery(); log.atDebug() .setMessage("inspect view columns: " + viewName + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "select_view_columns") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "select_view_columns") .log(); TableDto tmp = TableDto.builder() .columns(new LinkedList<>()) @@ -105,8 +106,8 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas .execute(); log.atDebug() .setMessage("created table: " + tableName + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "create_table") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "create_table") .log(); connection.commit(); } catch (SQLException e) { @@ -150,8 +151,8 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas .execute(); log.atDebug() .setMessage("created view: " + view.getInternalName() + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "create_view") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "create_view") .log(); /* select view columns */ start = System.currentTimeMillis(); @@ -161,8 +162,8 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas final ResultSet resultSet2 = statement2.executeQuery(); log.atDebug() .setMessage("created view: " + view.getInternalName() + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "select_view_columns") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "select_view_columns") .log(); while (resultSet2.next()) { view = dataMapper.resultSetToTable(resultSet2, view); @@ -193,8 +194,8 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas final ResultSet resultSet1 = statement.executeQuery(); log.atDebug() .setMessage("explored views in database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "select_views") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "select_views") .log(); while (resultSet1.next()) { final String viewName = resultSet1.getString(1); @@ -234,8 +235,8 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas final ResultSet resultSet1 = statement.executeQuery(); log.atDebug() .setMessage("explored tables in database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "select_tables") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "select_tables") .log(); while (resultSet1.next()) { final String tableName = resultSet1.getString(1); @@ -273,8 +274,8 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas TableDto table = dataMapper.schemaResultSetToTable(database, statement1.executeQuery()); log.atDebug() .setMessage("inspected table: " + tableName + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "select_table_schema") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "select_table_schema") .log(); /* obtain columns metadata */ start = System.currentTimeMillis(); @@ -285,8 +286,8 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas final ResultSet resultSet2 = statement2.executeQuery(); log.atDebug() .setMessage("inspect table columns: " + tableName + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "select_table_columns") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "select_table_columns") .log(); while (resultSet2.next()) { table = dataMapper.resultSetToTable(resultSet2, table); @@ -300,8 +301,8 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas final ResultSet resultSet3 = statement3.executeQuery(); log.atDebug() .setMessage("inspect table check constraints: " + tableName + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "select_table_constraints_check") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "select_table_constraints_check") .log(); while (resultSet3.next()) { final String clause = resultSet3.getString(1); @@ -319,8 +320,8 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas final ResultSet resultSet4 = statement4.executeQuery(); log.atDebug() .setMessage("inspect table constraints: " + tableName + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "select_table_constraints") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "select_table_constraints") .log(); while (resultSet4.next()) { table = dataMapper.resultSetToConstraint(resultSet4, table); @@ -361,8 +362,8 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas .execute(); log.atDebug() .setMessage("updated user password: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "update_user_password") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "update_user_password") .log(); connection.commit(); } catch (SQLException e) { diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/GrantServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/GrantServiceMariaDbImpl.java index c19cff34d57d734192dc4106737f643d520e16b2..476628658f6821f4950de23d7ed6a0c2c955e0a3 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/GrantServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/GrantServiceMariaDbImpl.java @@ -4,6 +4,7 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseGrantsDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto; import at.ac.tuwien.ifs.dbrepo.core.exception.DatabaseMalformedException; +import at.ac.tuwien.ifs.dbrepo.core.i18n.Constants; import at.ac.tuwien.ifs.dbrepo.core.mapper.MetadataMapper; import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; import at.ac.tuwien.ifs.dbrepo.service.GrantService; @@ -68,16 +69,16 @@ public class GrantServiceMariaDbImpl extends DataConnector implements GrantServi statement.setString(1, user.getUsername()); log.trace("1={}", user.getUsername()); final ResultSet resultSet = statement.executeQuery(); - log.trace(EXECUTED_STATEMENT_MS, System.currentTimeMillis() - start); + log.atDebug() + .setMessage("successfully found grants") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "list_grants") + .log(); while (resultSet.next()) { mariaDbMapper.resultSetToGrants(resultSet) .forEach((k, v) -> grants.put(k, metadataMapper.grantsToDatabaseGrantDto(v, grantDefaultRead, grantDefaultWrite))); } - log.atInfo() - .setMessage("Found " + grants.size() + " access grant(s) for user with id: " + user.getId()) - .addKeyValue("user_id", user.getId()) - .log(); return grants; } catch (SQLException e) { connection.rollback(); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/QueueServiceRabbitMqImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/QueueServiceRabbitMqImpl.java index 1a2665738ca5f11a7f3911ad1eb22e5ddc057ae4..d1164931b9c95765fbc81d94db67d51527fb447d 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/QueueServiceRabbitMqImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/QueueServiceRabbitMqImpl.java @@ -3,6 +3,7 @@ package at.ac.tuwien.ifs.dbrepo.service.impl; import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TableDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnDto; +import at.ac.tuwien.ifs.dbrepo.core.i18n.Constants; import at.ac.tuwien.ifs.dbrepo.mapper.DataMapper; import at.ac.tuwien.ifs.dbrepo.service.QueueService; import com.mchange.v2.c3p0.ComboPooledDataSource; @@ -49,8 +50,8 @@ public class QueueServiceRabbitMqImpl extends DataConnector implements QueueServ preparedStatement.executeUpdate(); log.atDebug() .setMessage("successfully inserted tuple") - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "insert_tuple") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "insert_tuple") .log(); } finally { dataSource.close(); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/StorageServiceS3Impl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/StorageServiceS3Impl.java index d941f5117fb1787bfe00e4d003f8133473bdeb0a..7b0a793831c8b92e623859e8948a490a39bba02d 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/StorageServiceS3Impl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/StorageServiceS3Impl.java @@ -6,6 +6,7 @@ import at.ac.tuwien.ifs.dbrepo.core.exception.MalformedException; import at.ac.tuwien.ifs.dbrepo.core.exception.StorageNotFoundException; import at.ac.tuwien.ifs.dbrepo.core.exception.StorageUnavailableException; import at.ac.tuwien.ifs.dbrepo.core.exception.TableMalformedException; +import at.ac.tuwien.ifs.dbrepo.core.i18n.Constants; import at.ac.tuwien.ifs.dbrepo.service.StorageService; import lombok.extern.slf4j.Slf4j; import org.apache.spark.sql.*; @@ -53,8 +54,8 @@ public class StorageServiceS3Impl implements StorageService { .build(), RequestBody.fromBytes(content)); log.atDebug() .setMessage("put object in bucket with key: " + key) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "s3_put_object") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "s3_put_object") .log(); } @@ -69,8 +70,8 @@ public class StorageServiceS3Impl implements StorageService { .build()); log.atDebug() .setMessage("get object from bucket with key: " + key) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "s3_get_object") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "s3_get_object") .log(); return object; } catch (NoSuchKeyException e) { @@ -107,8 +108,8 @@ public class StorageServiceS3Impl implements StorageService { .build()); log.atDebug() .setMessage("delete object from bucket with key: " + key) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "s3_delete_object") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "s3_delete_object") .log(); } @@ -127,8 +128,8 @@ public class StorageServiceS3Impl implements StorageService { .toList(); log.atDebug() .setMessage("transformed dataset with rows: " + inMemory.size()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "dataset_transform") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "dataset_transform") .log(); start = System.currentTimeMillis(); try { @@ -153,8 +154,8 @@ public class StorageServiceS3Impl implements StorageService { final InputStreamResource resource = new InputStreamResource(new ByteArrayInputStream(byteArrayOutputStream.toByteArray())); log.atDebug() .setMessage("transformed dataset to input stream resource") - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "dataset_export") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "dataset_export") .log(); return ExportResourceDto.builder() .filename("dataset.csv") diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/SubsetServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/SubsetServiceMariaDbImpl.java index 5ba91f2089fa93b4f8d4ae9c81a7325c811c0915..5caad3db34b61c815a09561486ae845e22e92db6 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/SubsetServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/SubsetServiceMariaDbImpl.java @@ -7,6 +7,7 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.query.SubsetDto; import at.ac.tuwien.ifs.dbrepo.core.api.identifier.IdentifierBriefDto; import at.ac.tuwien.ifs.dbrepo.core.api.identifier.IdentifierTypeDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; +import at.ac.tuwien.ifs.dbrepo.core.i18n.Constants; import at.ac.tuwien.ifs.dbrepo.gateway.MetadataServiceGateway; import at.ac.tuwien.ifs.dbrepo.mapper.DataMapper; import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; @@ -60,8 +61,8 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer .load(); log.atDebug() .setMessage("get data from url: " + getSparkUrl(database)) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "jdbc_get_data") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "jdbc_get_data") .log(); return dataset; } catch (Exception e) { @@ -107,8 +108,8 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer final ResultSet resultSet = statement.executeQuery(); log.atDebug() .setMessage("list subsets in database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "list_queries") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "list_queries") .log(); final List<QueryDto> queries = new LinkedList<>(); while (resultSet.next()) { @@ -145,8 +146,8 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer .executeQuery(); log.atDebug() .setMessage("count subset in database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "count_query") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "count_query") .addKeyValue("query", statement) .addKeyValue("timestamp", timestamp) .log(); @@ -171,8 +172,8 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer final ResultSet resultSet = preparedStatement.executeQuery(); log.atDebug() .setMessage("find query in query store of database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "find_query") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "find_query") .log(); if (!resultSet.next()) { throw new QueryNotFoundException("Failed to find query"); @@ -213,8 +214,8 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer callableStatement.executeUpdate(); log.atDebug() .setMessage("store query in query store of database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "store_query") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "store_query") .addKeyValue("query", query) .log(); queryId = UUID.fromString(callableStatement.getString(4)); @@ -245,8 +246,8 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer preparedStatement.executeUpdate(); log.atDebug() .setMessage("persist query in query store of database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "persist_query") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "persist_query") .addKeyValue("query_id", queryId) .log(); } catch (SQLException e) { @@ -268,8 +269,8 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer .executeUpdate(); log.atDebug() .setMessage("delete stale queries in query store of database: " + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "delete_stale_queries") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "delete_stale_queries") .log(); } catch (SQLException e) { log.error("Failed to delete stale queries: {}", e.getMessage()); diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/TableServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/TableServiceMariaDbImpl.java index b4551be7d6ad091f992d37744218312924fe1f6d..179c8e631e326d1905f6d6e2c6fb2547851b59a1 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/TableServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/TableServiceMariaDbImpl.java @@ -7,6 +7,7 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnStatisticDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnTypeDto; import at.ac.tuwien.ifs.dbrepo.core.exception.*; +import at.ac.tuwien.ifs.dbrepo.core.i18n.Constants; import at.ac.tuwien.ifs.dbrepo.mapper.DataMapper; import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; import at.ac.tuwien.ifs.dbrepo.service.DatabaseService; @@ -71,8 +72,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi .size())); log.atDebug() .setMessage("get table statistics: " + tableName + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "get_table_statistics") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "get_table_statistics") .log(); statistic.setAvgRowLength(tmpTable.getAvgRowLength()); statistic.setDataLength(tmpTable.getDataLength()); @@ -115,8 +116,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi statement.executeUpdate(); log.atDebug() .setMessage("update table comment: " + table.getInternalName() + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "update_table_comment") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "update_table_comment") .log(); connection.commit(); } catch (SQLException e) { @@ -141,8 +142,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi .execute(); log.atDebug() .setMessage("delete table: " + table.getInternalName() + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "delete_table") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "delete_table") .log(); connection.commit(); } catch (SQLException e) { @@ -169,8 +170,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi .executeQuery(); log.atDebug() .setMessage("get table history: " + table.getInternalName() + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "get_table_history") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "get_table_history") .log(); history = dataMapper.resultSetToTableHistory(resultSet); connection.commit(); @@ -199,8 +200,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi .executeQuery(); log.atDebug() .setMessage("get table count: " + tableName + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "get_table_count") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "get_table_count") .log(); queryResult = mariaDbMapper.resultSetToNumber(resultSet); connection.commit(); @@ -239,8 +240,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi connection.commit(); log.atDebug() .setMessage("copy table schema from " + table.getInternalName() + "." + database.getInternalName() + " into temporary table: " + temporaryTable + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "table_copy_schema") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "table_copy_schema") .log(); } catch (SQLException e) { connection.rollback(); @@ -259,8 +260,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi .jdbc(getSparkUrl(database), temporaryTable, properties); log.atDebug() .setMessage("write data into temporary table: " + temporaryTable + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "table_import_data") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "table_import_data") .log(); } catch (Exception e) { log.atError() @@ -278,8 +279,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi connection.commit(); log.atDebug() .setMessage("merge data from temporary table " + temporaryTable + "." + database.getInternalName() + " into table: " + table.getInternalName() + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "table_merge_data") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "table_merge_data") .log(); } catch (SQLException e) { connection.rollback(); @@ -298,8 +299,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi connection.commit(); log.atDebug() .setMessage("delete temporary table: " + temporaryTable + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "table_delete_schema") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "table_delete_schema") .log(); dataSource.close(); } @@ -328,8 +329,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi statement.executeUpdate(); log.atDebug() .setMessage("delete tuple in table: " + table.getInternalName() + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "table_delete_tuple") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "table_delete_tuple") .log(); connection.commit(); } catch (SQLException e) { @@ -377,8 +378,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi statement.executeUpdate(); log.atDebug() .setMessage("create tuple in table: " + table.getInternalName() + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "table_create_tuple") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "table_create_tuple") .log(); connection.commit(); } catch (SQLException e) { @@ -418,8 +419,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi statement.executeUpdate(); log.atDebug() .setMessage("update tuple in table: " + table.getInternalName() + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "table_update_tuple") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "table_update_tuple") .log(); connection.commit(); } catch (SQLException e) { diff --git a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ViewServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ViewServiceMariaDbImpl.java index 5bf8ad366017b0ab323ad40808e07e890275f379..d8acdee8d7172b9bc677b13fccf44e74011a18b6 100644 --- a/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ViewServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/ac/tuwien/ifs/dbrepo/service/impl/ViewServiceMariaDbImpl.java @@ -4,6 +4,7 @@ import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto; import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto; import at.ac.tuwien.ifs.dbrepo.core.exception.QueryMalformedException; import at.ac.tuwien.ifs.dbrepo.core.exception.ViewMalformedException; +import at.ac.tuwien.ifs.dbrepo.core.i18n.Constants; import at.ac.tuwien.ifs.dbrepo.mapper.MariaDbMapper; import at.ac.tuwien.ifs.dbrepo.service.ViewService; import com.mchange.v2.c3p0.ComboPooledDataSource; @@ -39,8 +40,8 @@ public class ViewServiceMariaDbImpl extends DataConnector implements ViewService .execute(); log.atDebug() .setMessage("delete view: " + view.getInternalName() + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "view_delete") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "view_delete") .log(); connection.commit(); } catch (SQLException e) { @@ -67,8 +68,8 @@ public class ViewServiceMariaDbImpl extends DataConnector implements ViewService .executeQuery(); log.atDebug() .setMessage("count view: " + view.getInternalName() + "." + database.getInternalName()) - .addKeyValue("duration", System.currentTimeMillis() - start) - .addKeyValue("action", "count_view") + .addKeyValue(Constants.DURATION, System.currentTimeMillis() - start) + .addKeyValue(Constants.ACTION, "count_view") .log(); queryResult = mariaDbMapper.resultSetToNumber(resultSet); connection.commit(); diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/DatabaseEndpoint.java b/dbrepo-metadata-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/DatabaseEndpoint.java index aaed002d5c330f5ee98d1ded5b9933e14de1b390..485967e56814ee0b5449e1faa95c7fc2ab21eef6 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/DatabaseEndpoint.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/ac/tuwien/ifs/dbrepo/endpoints/DatabaseEndpoint.java @@ -41,7 +41,6 @@ import java.util.UUID; public class DatabaseEndpoint extends AbstractEndpoint { private final UserService userService; - private final AccessService accessService; private final MetadataMapper metadataMapper; private final StorageService storageService; private final DatabaseService databaseService; @@ -49,11 +48,10 @@ public class DatabaseEndpoint extends AbstractEndpoint { private final DashboardService dashboardService; @Autowired - public DatabaseEndpoint(UserService userService, AccessService accessService, MetadataMapper metadataMapper, StorageService storageService, + public DatabaseEndpoint(UserService userService, MetadataMapper metadataMapper, StorageService storageService, DatabaseService databaseService, ContainerService containerService, DashboardService dashboardService) { this.userService = userService; - this.accessService = accessService; this.metadataMapper = metadataMapper; this.storageService = storageService; this.databaseService = databaseService; diff --git a/helm/dbrepo/Chart.yaml b/helm/dbrepo/Chart.yaml index aa0cb20243da56c83e7943154f769bef0b0114b5..d3e3dd4a0b363e0c967e76b9f81f2820eb53330e 100644 --- a/helm/dbrepo/Chart.yaml +++ b/helm/dbrepo/Chart.yaml @@ -7,8 +7,8 @@ description: Helm Chart for installing DBRepo sources: - https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services type: application -version: "1.9.1" -appVersion: "1.9.1" +version: "1.9.2" +appVersion: "1.9.2" keywords: - dbrepo maintainers: diff --git a/lib/java/dbrepo-core/src/main/java/at/ac/tuwien/ifs/dbrepo/core/i18n/Constants.java b/lib/java/dbrepo-core/src/main/java/at/ac/tuwien/ifs/dbrepo/core/i18n/Constants.java new file mode 100644 index 0000000000000000000000000000000000000000..6375eac2deab2c1f53cd7d12c55ae6d411fd95d3 --- /dev/null +++ b/lib/java/dbrepo-core/src/main/java/at/ac/tuwien/ifs/dbrepo/core/i18n/Constants.java @@ -0,0 +1,11 @@ +package at.ac.tuwien.ifs.dbrepo.core.i18n; + +public class Constants { + + public static final String ACTION = "action"; + public static final String CACHE_HIT = "cache_hit"; + public static final String DURATION = "duration"; + public static final String GRANT_USER_PRIVILEGES = "grant_user_privileges"; + public static final String QUERY = "query"; + +}