diff --git a/src/main/java/com/teragrep/pth_06/config/ConditionConfig.java b/src/main/java/com/teragrep/pth_06/config/ConditionConfig.java
index d6e44847..0f805d9b 100644
--- a/src/main/java/com/teragrep/pth_06/config/ConditionConfig.java
+++ b/src/main/java/com/teragrep/pth_06/config/ConditionConfig.java
@@ -1,9 +1,54 @@
+/*
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ *
+ * Additional permission under GNU Affero General Public License version 3
+ * section 7
+ *
+ * If you modify this Program, or any covered work, by linking or combining it
+ * with other code, such other code is not for that reason alone subject to any
+ * of the requirements of the GNU Affero GPL version 3 as long as this Program
+ * is the same Program as licensed from Suomen Kanuuna Oy without any additional
+ * modifications.
+ *
+ * Supplemented terms under GNU Affero General Public License version 3
+ * section 7
+ *
+ * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
+ * versions must be marked as "Modified version of" The Program.
+ *
+ * Names of the licensors and authors may not be used for publicity purposes.
+ *
+ * No rights are granted for use of trade names, trademarks, or service marks
+ * which are in The Program if any.
+ *
+ * Licensee must indemnify licensors and authors for any liability that these
+ * contractual assumptions impose on licensors and authors.
+ *
+ * To the extent this program is licensed as part of the Commercial versions of
+ * Teragrep, the applicable Commercial License may apply to this file if you as
+ * a licensee so wish it.
+ */
package com.teragrep.pth_06.config;
-import com.teragrep.pth_06.planner.walker.conditions.ElementCondition;
import org.jooq.DSLContext;
public final class ConditionConfig {
+
private final DSLContext ctx;
private final boolean streamQuery;
private final boolean bloomEnabled;
@@ -41,13 +86,14 @@ public boolean withoutFilter() {
@Override
public boolean equals(Object object) {
- if (this == object) return true;
- if (object == null) return false;
- if (object.getClass() != this.getClass()) return false;
+ if (this == object)
+ return true;
+ if (object == null)
+ return false;
+ if (object.getClass() != this.getClass())
+ return false;
final ConditionConfig cast = (ConditionConfig) object;
- return this.bloomEnabled == cast.bloomEnabled &&
- this.streamQuery == cast.streamQuery &&
- this.withoutFilters == cast.withoutFilters &&
- this.ctx == cast.ctx;
+ return this.bloomEnabled == cast.bloomEnabled && this.streamQuery == cast.streamQuery
+ && this.withoutFilters == cast.withoutFilters && this.ctx == cast.ctx;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/teragrep/pth_06/planner/walker/ConditionWalker.java b/src/main/java/com/teragrep/pth_06/planner/walker/ConditionWalker.java
index 39442e3a..2635ac79 100644
--- a/src/main/java/com/teragrep/pth_06/planner/walker/ConditionWalker.java
+++ b/src/main/java/com/teragrep/pth_06/planner/walker/ConditionWalker.java
@@ -139,8 +139,10 @@ public Condition emitUnaryOperation(String op, Element current) throws Exception
}
Condition emitElem(Element current) {
- ElementCondition elementCondition = new ElementCondition(current,
- new ConditionConfig(ctx, streamQuery, bloomEnabled, false));
+ ElementCondition elementCondition = new ElementCondition(
+ current,
+ new ConditionConfig(ctx, streamQuery, bloomEnabled, false)
+ );
return elementCondition.condition();
}
}
diff --git a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/EarliestCondition.java b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/EarliestCondition.java
index 919f0697..80ddd428 100644
--- a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/EarliestCondition.java
+++ b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/EarliestCondition.java
@@ -1,6 +1,6 @@
/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2024 Suomen Kanuuna Oy
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -13,7 +13,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*
* Additional permission under GNU Affero General Public License version 3
@@ -43,7 +43,6 @@
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
-
package com.teragrep.pth_06.planner.walker.conditions;
import org.jooq.Condition;
@@ -54,6 +53,7 @@
import static com.teragrep.pth_06.jooq.generated.journaldb.Journaldb.JOURNALDB;
public final class EarliestCondition implements QueryCondition {
+
private final String value;
public EarliestCondition(String value) {
@@ -69,8 +69,11 @@ public Condition condition() {
final java.sql.Date timeQualifier = new Date(instant.toEpochMilli());
Condition condition;
condition = JOURNALDB.LOGFILE.LOGDATE.greaterOrEqual(timeQualifier);
- condition = condition.and("UNIX_TIMESTAMP(STR_TO_DATE(SUBSTRING(REGEXP_SUBSTR(path,'[0-9]+(\\.log)?\\.gz(\\.[0-9]*)?$'), 1, 10), '%Y%m%d%H'))" +
- " >= " + instant.getEpochSecond());
+ condition = condition
+ .and(
+ "UNIX_TIMESTAMP(STR_TO_DATE(SUBSTRING(REGEXP_SUBSTR(path,'[0-9]+(\\.log)?\\.gz(\\.[0-9]*)?$'), 1, 10), '%Y%m%d%H'))"
+ + " >= " + instant.getEpochSecond()
+ );
// raw SQL used here since following not supported for mariadb:
// queryCondition = queryCondition.and(toTimestamp(
// regexpReplaceAll(JOURNALDB.LOGFILE.PATH, "((^.*\\/.*-)|(\\.log\\.gz.*))", ""),
@@ -84,9 +87,12 @@ public Condition condition() {
@Override
public boolean equals(final Object object) {
- if (this == object) return true;
- if (object == null) return false;
- if (object.getClass() != this.getClass()) return false;
+ if (this == object)
+ return true;
+ if (object == null)
+ return false;
+ if (object.getClass() != this.getClass())
+ return false;
final EarliestCondition cast = (EarliestCondition) object;
return this.value.equals(cast.value);
}
diff --git a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/ElementCondition.java b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/ElementCondition.java
index da13911f..be7d0033 100644
--- a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/ElementCondition.java
+++ b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/ElementCondition.java
@@ -1,6 +1,6 @@
/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2024 Suomen Kanuuna Oy
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -13,7 +13,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*
* Additional permission under GNU Affero General Public License version 3
@@ -43,7 +43,6 @@
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
-
package com.teragrep.pth_06.planner.walker.conditions;
import com.teragrep.blf_01.Tokenizer;
@@ -58,6 +57,7 @@
* Creates a query condition from provided dom element
*/
public final class ElementCondition {
+
private static final Logger LOGGER = LoggerFactory.getLogger(ElementCondition.class);
private final Element element;
@@ -73,10 +73,14 @@ private void validate(Element element) {
throw new IllegalStateException("Tag name for Element was null");
}
if (!element.hasAttribute("operation")) {
- throw new IllegalStateException("Could not find specified or default value for 'operation' attribute from Element");
+ throw new IllegalStateException(
+ "Could not find specified or default value for 'operation' attribute from Element"
+ );
}
if (!element.hasAttribute("value")) {
- throw new IllegalStateException("Could not find specified or default value for 'value' attribute from Element");
+ throw new IllegalStateException(
+ "Could not find specified or default value for 'value' attribute from Element"
+ );
}
}
@@ -112,8 +116,11 @@ public Condition condition() {
}
// value search
if ("indexstatement".equalsIgnoreCase(tag) && "EQUALS".equals(operation) && config.bloomEnabled()) {
- IndexStatementCondition indexStatementCondition =
- new IndexStatementCondition(value, config, new Tokenizer(32));
+ IndexStatementCondition indexStatementCondition = new IndexStatementCondition(
+ value,
+ config,
+ new Tokenizer(32)
+ );
condition = indexStatementCondition.condition();
}
}
@@ -126,9 +133,12 @@ public Condition condition() {
@Override
public boolean equals(final Object object) {
- if (this == object) return true;
- if (object == null) return false;
- if (object.getClass() != this.getClass()) return false;
+ if (this == object)
+ return true;
+ if (object == null)
+ return false;
+ if (object.getClass() != this.getClass())
+ return false;
final ElementCondition cast = (ElementCondition) object;
boolean equalName = this.element.getTagName().equals(cast.element.getTagName());
boolean equalOperation = this.element.getAttribute("operation").equals(cast.element.getAttribute("operation"));
diff --git a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/HostCondition.java b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/HostCondition.java
index 5d7c7b84..d79d836a 100644
--- a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/HostCondition.java
+++ b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/HostCondition.java
@@ -1,6 +1,6 @@
/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2024 Suomen Kanuuna Oy
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -13,7 +13,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*
* Additional permission under GNU Affero General Public License version 3
@@ -43,7 +43,6 @@
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
-
package com.teragrep.pth_06.planner.walker.conditions;
import com.teragrep.pth_06.planner.StreamDBClient;
@@ -52,6 +51,7 @@
import static com.teragrep.pth_06.jooq.generated.streamdb.Streamdb.STREAMDB;
public final class HostCondition implements QueryCondition {
+
private final String value;
private final String operation;
private final boolean streamQuery;
@@ -65,14 +65,10 @@ public HostCondition(String value, String operation, boolean streamQuery) {
public Condition condition() {
Condition condition;
if (streamQuery) {
- condition = STREAMDB.HOST.NAME.like(
- value.replace('*', '%')
- );
- } else {
- condition =
- StreamDBClient.GetArchivedObjectsFilterTable.host.like(
- value.replace('*', '%').toLowerCase()
- );
+ condition = STREAMDB.HOST.NAME.like(value.replace('*', '%'));
+ }
+ else {
+ condition = StreamDBClient.GetArchivedObjectsFilterTable.host.like(value.replace('*', '%').toLowerCase());
}
if (operation.equalsIgnoreCase("NOT_EQUALS")) {
condition = condition.not();
@@ -82,12 +78,14 @@ public Condition condition() {
@Override
public boolean equals(final Object object) {
- if (this == object) return true;
- if (object == null) return false;
- if (object.getClass() != this.getClass()) return false;
+ if (this == object)
+ return true;
+ if (object == null)
+ return false;
+ if (object.getClass() != this.getClass())
+ return false;
final HostCondition cast = (HostCondition) object;
- return this.streamQuery == cast.streamQuery &&
- this.value.equals(cast.value) &&
- this.operation.equals(cast.operation);
+ return this.streamQuery == cast.streamQuery && this.value.equals(cast.value)
+ && this.operation.equals(cast.operation);
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/IndexCondition.java b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/IndexCondition.java
index 76f94393..a49a1951 100644
--- a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/IndexCondition.java
+++ b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/IndexCondition.java
@@ -1,6 +1,6 @@
/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2024 Suomen Kanuuna Oy
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -13,7 +13,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*
* Additional permission under GNU Affero General Public License version 3
@@ -43,7 +43,6 @@
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
-
package com.teragrep.pth_06.planner.walker.conditions;
import com.teragrep.pth_06.planner.StreamDBClient;
@@ -52,6 +51,7 @@
import static com.teragrep.pth_06.jooq.generated.streamdb.Streamdb.STREAMDB;
public final class IndexCondition implements QueryCondition {
+
private final String value;
private final String operation;
private final boolean streamQuery;
@@ -65,15 +65,11 @@ public IndexCondition(String value, String operation, boolean streamQuery) {
public Condition condition() {
Condition condition;
if (streamQuery) {
- condition =
- STREAMDB.STREAM.DIRECTORY.like(
- value.replace('*', '%')
- );
- } else {
- condition =
- StreamDBClient.GetArchivedObjectsFilterTable.directory.like(
- value.replace('*', '%').toLowerCase()
- );
+ condition = STREAMDB.STREAM.DIRECTORY.like(value.replace('*', '%'));
+ }
+ else {
+ condition = StreamDBClient.GetArchivedObjectsFilterTable.directory
+ .like(value.replace('*', '%').toLowerCase());
}
if (operation.equalsIgnoreCase("NOT_EQUALS")) {
condition = condition.not();
@@ -83,12 +79,14 @@ public Condition condition() {
@Override
public boolean equals(final Object object) {
- if (this == object) return true;
- if (object == null) return false;
- if (object.getClass() != this.getClass()) return false;
+ if (this == object)
+ return true;
+ if (object == null)
+ return false;
+ if (object.getClass() != this.getClass())
+ return false;
final IndexCondition cast = (IndexCondition) object;
- return this.streamQuery == cast.streamQuery &&
- this.value.equals(cast.value) &&
- this.operation.equals(cast.operation);
+ return this.streamQuery == cast.streamQuery && this.value.equals(cast.value)
+ && this.operation.equals(cast.operation);
}
}
diff --git a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/IndexStatementCondition.java b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/IndexStatementCondition.java
index 3b4c2b17..e48e4b49 100644
--- a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/IndexStatementCondition.java
+++ b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/IndexStatementCondition.java
@@ -1,6 +1,6 @@
/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2024 Suomen Kanuuna Oy
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -13,7 +13,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*
* Additional permission under GNU Affero General Public License version 3
@@ -43,7 +43,6 @@
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
-
package com.teragrep.pth_06.planner.walker.conditions;
import com.teragrep.blf_01.Token;
@@ -64,8 +63,8 @@
import static com.teragrep.pth_06.jooq.generated.bloomdb.Bloomdb.BLOOMDB;
-
public final class IndexStatementCondition implements QueryCondition {
+
private final Logger LOGGER = LoggerFactory.getLogger(IndexStatementCondition.class);
private final String value;
@@ -117,20 +116,11 @@ public Condition condition() {
.asField();
final Field fe100kfp001 = DSL
- .function(
- "bloommatch", Boolean.class, smallColumn,
- BLOOMDB.FILTER_EXPECTED_100000_FPP_001.FILTER
- );
+ .function("bloommatch", Boolean.class, smallColumn, BLOOMDB.FILTER_EXPECTED_100000_FPP_001.FILTER);
final Field fe1000kfpp003 = DSL
- .function(
- "bloommatch", Boolean.class, mediumColumn,
- BLOOMDB.FILTER_EXPECTED_1000000_FPP_003.FILTER
- );
+ .function("bloommatch", Boolean.class, mediumColumn, BLOOMDB.FILTER_EXPECTED_1000000_FPP_003.FILTER);
final Field fe2500kfpp005 = DSL
- .function(
- "bloommatch", Boolean.class, largeColumn,
- BLOOMDB.FILTER_EXPECTED_2500000_FPP_005.FILTER
- );
+ .function("bloommatch", Boolean.class, largeColumn, BLOOMDB.FILTER_EXPECTED_2500000_FPP_005.FILTER);
final Condition noBloomFilter = BLOOMDB.FILTER_EXPECTED_100000_FPP_001.FILTER
.isNull()
@@ -149,16 +139,18 @@ public Condition condition() {
/**
* @param object object compared against
- * @return true if object is same class and all object values are equal (tokenizer values are expected to point to same reference)
+ * @return true if object is same class and all object values are equal (tokenizer values are expected to point to
+ * same reference)
*/
@Override
public boolean equals(final Object object) {
- if (this == object) return true;
- if (object == null) return false;
- if (object.getClass() != this.getClass()) return false;
+ if (this == object)
+ return true;
+ if (object == null)
+ return false;
+ if (object.getClass() != this.getClass())
+ return false;
final IndexStatementCondition cast = (IndexStatementCondition) object;
- return this.value.equals(cast.value) &&
- this.config.equals(cast.config) &&
- this.tokenizer == cast.tokenizer; // expects same reference
+ return this.value.equals(cast.value) && this.config.equals(cast.config) && this.tokenizer == cast.tokenizer; // expects same reference
}
}
diff --git a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/LatestCondition.java b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/LatestCondition.java
index 5422e00e..d11a7781 100644
--- a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/LatestCondition.java
+++ b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/LatestCondition.java
@@ -1,6 +1,6 @@
/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2024 Suomen Kanuuna Oy
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -13,7 +13,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*
* Additional permission under GNU Affero General Public License version 3
@@ -43,7 +43,6 @@
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
-
package com.teragrep.pth_06.planner.walker.conditions;
import org.jooq.Condition;
@@ -54,6 +53,7 @@
import static com.teragrep.pth_06.jooq.generated.journaldb.Journaldb.JOURNALDB;
public final class LatestCondition implements QueryCondition {
+
private final String value;
public LatestCondition(String value) {
@@ -66,8 +66,11 @@ public Condition condition() {
final java.sql.Date timeQualifier = new Date(instant.toEpochMilli());
Condition condition;
condition = JOURNALDB.LOGFILE.LOGDATE.lessOrEqual(timeQualifier);
- condition = condition.and("UNIX_TIMESTAMP(STR_TO_DATE(SUBSTRING(REGEXP_SUBSTR(path,'[0-9]+(\\.log)?\\.gz(\\.[0-9]*)?$'), 1, 10), '%Y%m%d%H'))" +
- " <= " + instant.getEpochSecond());
+ condition = condition
+ .and(
+ "UNIX_TIMESTAMP(STR_TO_DATE(SUBSTRING(REGEXP_SUBSTR(path,'[0-9]+(\\.log)?\\.gz(\\.[0-9]*)?$'), 1, 10), '%Y%m%d%H'))"
+ + " <= " + instant.getEpochSecond()
+ );
// raw SQL used here since following not supported for mariadb:
// queryCondition = queryCondition.and(toTimestamp(
// regexpReplaceAll(JOURNALDB.LOGFILE.PATH, "((^.*\\/.*-)|(\\.log\\.gz.*))", ""),
@@ -81,10 +84,13 @@ public Condition condition() {
@Override
public boolean equals(final Object object) {
- if (this == object) return true;
- if (object == null) return false;
- if (object.getClass() != this.getClass()) return false;
+ if (this == object)
+ return true;
+ if (object == null)
+ return false;
+ if (object.getClass() != this.getClass())
+ return false;
final LatestCondition cast = (LatestCondition) object;
return this.value.equals(cast.value);
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/QueryCondition.java b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/QueryCondition.java
index 01894dc8..b9dec429 100644
--- a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/QueryCondition.java
+++ b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/QueryCondition.java
@@ -1,6 +1,6 @@
/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2024 Suomen Kanuuna Oy
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -13,7 +13,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*
* Additional permission under GNU Affero General Public License version 3
@@ -43,11 +43,11 @@
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
-
package com.teragrep.pth_06.planner.walker.conditions;
import org.jooq.Condition;
public interface QueryCondition {
+
Condition condition();
}
diff --git a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/SourceTypeCondition.java b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/SourceTypeCondition.java
index e8b461d1..2c3c9aee 100644
--- a/src/main/java/com/teragrep/pth_06/planner/walker/conditions/SourceTypeCondition.java
+++ b/src/main/java/com/teragrep/pth_06/planner/walker/conditions/SourceTypeCondition.java
@@ -1,6 +1,6 @@
/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2024 Suomen Kanuuna Oy
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -13,7 +13,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
*
* Additional permission under GNU Affero General Public License version 3
@@ -43,7 +43,6 @@
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
-
package com.teragrep.pth_06.planner.walker.conditions;
import com.teragrep.pth_06.planner.StreamDBClient;
@@ -52,6 +51,7 @@
import static com.teragrep.pth_06.jooq.generated.streamdb.Streamdb.STREAMDB;
public final class SourceTypeCondition implements QueryCondition {
+
private final String value;
private final String operation;
private final boolean streamQuery;
@@ -65,14 +65,10 @@ public SourceTypeCondition(String value, String operation, boolean streamQuery)
public Condition condition() {
Condition condition;
if (streamQuery) {
- condition = STREAMDB.STREAM.STREAM_.like(
- value.replace('*', '%')
- );
- } else {
- condition =
- StreamDBClient.GetArchivedObjectsFilterTable.stream.like(
- value.replace('*', '%').toLowerCase()
- );
+ condition = STREAMDB.STREAM.STREAM_.like(value.replace('*', '%'));
+ }
+ else {
+ condition = StreamDBClient.GetArchivedObjectsFilterTable.stream.like(value.replace('*', '%').toLowerCase());
}
if (operation.equalsIgnoreCase("NOT_EQUALS")) {
condition = condition.not();
@@ -82,12 +78,14 @@ public Condition condition() {
@Override
public boolean equals(final Object object) {
- if (this == object) return true;
- if (object == null) return false;
- if (object.getClass() != this.getClass()) return false;
+ if (this == object)
+ return true;
+ if (object == null)
+ return false;
+ if (object.getClass() != this.getClass())
+ return false;
final SourceTypeCondition cast = (SourceTypeCondition) object;
- return this.streamQuery == cast.streamQuery &&
- this.value.equals(cast.value) &&
- this.operation.equals(cast.operation);
+ return this.streamQuery == cast.streamQuery && this.value.equals(cast.value)
+ && this.operation.equals(cast.operation);
}
}
diff --git a/src/main/java/com/teragrep/pth_06/task/s3/Pth06S3Client.java b/src/main/java/com/teragrep/pth_06/task/s3/Pth06S3Client.java
index 01308375..b04b9089 100644
--- a/src/main/java/com/teragrep/pth_06/task/s3/Pth06S3Client.java
+++ b/src/main/java/com/teragrep/pth_06/task/s3/Pth06S3Client.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06.task.s3;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
diff --git a/src/main/java/com/teragrep/pth_06/task/s3/RowConverter.java b/src/main/java/com/teragrep/pth_06/task/s3/RowConverter.java
index 6397c8c4..aaa8b766 100644
--- a/src/main/java/com/teragrep/pth_06/task/s3/RowConverter.java
+++ b/src/main/java/com/teragrep/pth_06/task/s3/RowConverter.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06.task.s3;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.model.S3Object;
diff --git a/src/test/java/com/teragrep/pth_06/InstantiationTest.java b/src/test/java/com/teragrep/pth_06/InstantiationTest.java
index 3209805e..971a910b 100644
--- a/src/test/java/com/teragrep/pth_06/InstantiationTest.java
+++ b/src/test/java/com/teragrep/pth_06/InstantiationTest.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.model.Bucket;
import com.cloudbees.syslog.Facility;
diff --git a/src/test/java/com/teragrep/pth_06/ManualIntegrationTest.java b/src/test/java/com/teragrep/pth_06/ManualIntegrationTest.java
index 9d7bda3d..beb529fb 100644
--- a/src/test/java/com/teragrep/pth_06/ManualIntegrationTest.java
+++ b/src/test/java/com/teragrep/pth_06/ManualIntegrationTest.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.model.Bucket;
import com.cloudbees.syslog.Facility;
diff --git a/src/test/java/com/teragrep/pth_06/MockTeragrepDatasource.java b/src/test/java/com/teragrep/pth_06/MockTeragrepDatasource.java
index e39b2fcc..ac38bc0a 100644
--- a/src/test/java/com/teragrep/pth_06/MockTeragrepDatasource.java
+++ b/src/test/java/com/teragrep/pth_06/MockTeragrepDatasource.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import com.teragrep.pth_06.config.Config;
import com.teragrep.pth_06.planner.*;
import org.apache.kafka.clients.consumer.Consumer;
diff --git a/src/test/java/com/teragrep/pth_06/XmlToSqlTest.java b/src/test/java/com/teragrep/pth_06/XmlToSqlTest.java
index 019d7648..16a68217 100644
--- a/src/test/java/com/teragrep/pth_06/XmlToSqlTest.java
+++ b/src/test/java/com/teragrep/pth_06/XmlToSqlTest.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import com.teragrep.pth_06.planner.walker.ConditionWalker;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
diff --git a/src/test/java/com/teragrep/pth_06/planner/DatasourceOffsetTest.java b/src/test/java/com/teragrep/pth_06/planner/DatasourceOffsetTest.java
index a73b3617..0f329712 100644
--- a/src/test/java/com/teragrep/pth_06/planner/DatasourceOffsetTest.java
+++ b/src/test/java/com/teragrep/pth_06/planner/DatasourceOffsetTest.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06.planner;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import com.teragrep.pth_06.planner.offset.DatasourceOffset;
import com.teragrep.pth_06.planner.offset.KafkaOffset;
import org.apache.kafka.common.TopicPartition;
diff --git a/src/test/java/com/teragrep/pth_06/planner/MockArchiveQueryProcessor.java b/src/test/java/com/teragrep/pth_06/planner/MockArchiveQueryProcessor.java
index 5c1e054f..c54113ff 100644
--- a/src/test/java/com/teragrep/pth_06/planner/MockArchiveQueryProcessor.java
+++ b/src/test/java/com/teragrep/pth_06/planner/MockArchiveQueryProcessor.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06.planner;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import org.jooq.Record11;
import org.jooq.Result;
import org.jooq.types.ULong;
diff --git a/src/test/java/com/teragrep/pth_06/planner/MockDBData.java b/src/test/java/com/teragrep/pth_06/planner/MockDBData.java
index d9cd5ae1..82ae3875 100644
--- a/src/test/java/com/teragrep/pth_06/planner/MockDBData.java
+++ b/src/test/java/com/teragrep/pth_06/planner/MockDBData.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06.planner;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import org.jooq.*;
import org.jooq.impl.DSL;
import org.jooq.tools.jdbc.MockConnection;
diff --git a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/EarliestConditionTest.java b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/EarliestConditionTest.java
index 5e3bb0a6..c21d8374 100644
--- a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/EarliestConditionTest.java
+++ b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/EarliestConditionTest.java
@@ -1,3 +1,48 @@
+/*
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ *
+ * Additional permission under GNU Affero General Public License version 3
+ * section 7
+ *
+ * If you modify this Program, or any covered work, by linking or combining it
+ * with other code, such other code is not for that reason alone subject to any
+ * of the requirements of the GNU Affero GPL version 3 as long as this Program
+ * is the same Program as licensed from Suomen Kanuuna Oy without any additional
+ * modifications.
+ *
+ * Supplemented terms under GNU Affero General Public License version 3
+ * section 7
+ *
+ * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
+ * versions must be marked as "Modified version of" The Program.
+ *
+ * Names of the licensors and authors may not be used for publicity purposes.
+ *
+ * No rights are granted for use of trade names, trademarks, or service marks
+ * which are in The Program if any.
+ *
+ * Licensee must indemnify licensors and authors for any liability that these
+ * contractual assumptions impose on licensors and authors.
+ *
+ * To the extent this program is licensed as part of the Commercial versions of
+ * Teragrep, the applicable Commercial License may apply to this file if you as
+ * a licensee so wish it.
+ */
package com.teragrep.pth_06.planner.walker.conditions;
import org.jooq.Condition;
@@ -8,10 +53,9 @@ public class EarliestConditionTest {
@Test
void conditionTest() {
- String e = "(\n" +
- " \"journaldb\".\"logfile\".\"logdate\" >= date '1970-01-01'\n" +
- " and (UNIX_TIMESTAMP(STR_TO_DATE(SUBSTRING(REGEXP_SUBSTR(path,'[0-9]+(\\.log)?\\.gz(\\.[0-9]*)?$'), 1, 10), '%Y%m%d%H')) >= 0)\n" +
- ")";
+ String e = "(\n" + " \"journaldb\".\"logfile\".\"logdate\" >= date '1970-01-01'\n"
+ + " and (UNIX_TIMESTAMP(STR_TO_DATE(SUBSTRING(REGEXP_SUBSTR(path,'[0-9]+(\\.log)?\\.gz(\\.[0-9]*)?$'), 1, 10), '%Y%m%d%H')) >= 0)\n"
+ + ")";
Condition elementCondition = new EarliestCondition("1000").condition();
Assertions.assertEquals(e, elementCondition.toString());
}
diff --git a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/ElementConditionTest.java b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/ElementConditionTest.java
index 41996b7e..e4c99561 100644
--- a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/ElementConditionTest.java
+++ b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/ElementConditionTest.java
@@ -1,3 +1,48 @@
+/*
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ *
+ * Additional permission under GNU Affero General Public License version 3
+ * section 7
+ *
+ * If you modify this Program, or any covered work, by linking or combining it
+ * with other code, such other code is not for that reason alone subject to any
+ * of the requirements of the GNU Affero GPL version 3 as long as this Program
+ * is the same Program as licensed from Suomen Kanuuna Oy without any additional
+ * modifications.
+ *
+ * Supplemented terms under GNU Affero General Public License version 3
+ * section 7
+ *
+ * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
+ * versions must be marked as "Modified version of" The Program.
+ *
+ * Names of the licensors and authors may not be used for publicity purposes.
+ *
+ * No rights are granted for use of trade names, trademarks, or service marks
+ * which are in The Program if any.
+ *
+ * Licensee must indemnify licensors and authors for any liability that these
+ * contractual assumptions impose on licensors and authors.
+ *
+ * To the extent this program is licensed as part of the Commercial versions of
+ * Teragrep, the applicable Commercial License may apply to this file if you as
+ * a licensee so wish it.
+ */
package com.teragrep.pth_06.planner.walker.conditions;
import com.teragrep.pth_06.config.ConditionConfig;
@@ -15,6 +60,7 @@
import javax.xml.parsers.DocumentBuilderFactory;
class ElementConditionTest {
+
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
final Document document = Assertions.assertDoesNotThrow(() -> factory.newDocumentBuilder().newDocument());
final DSLContext mockCtx = DSL.using(new MockConnection(ctx -> new MockResult[0]));
@@ -23,7 +69,9 @@ class ElementConditionTest {
@Test
void testStreamTags() {
- String[] streamTags = {"index", "host", "sourcetype"};
+ String[] streamTags = {
+ "index", "host", "sourcetype"
+ };
int loops = 0;
for (String tag : streamTags) {
Element element = document.createElement(tag);
@@ -44,7 +92,8 @@ void testIndexStatement() {
Element element2 = document.createElement("indexstatement");
element2.setAttribute("value", "searchTerm");
element2.setAttribute("operation", "NOT_EQUALS");
- Assertions.assertThrows(SQLDialectNotSupportedException.class, new ElementCondition(element, config)::condition);
+ Assertions
+ .assertThrows(SQLDialectNotSupportedException.class, new ElementCondition(element, config)::condition);
Assertions.assertThrows(IllegalStateException.class, new ElementCondition(element, streamConfig)::condition);
Assertions.assertThrows(IllegalStateException.class, new ElementCondition(element2, config)::condition);
}
@@ -71,7 +120,9 @@ void testProvidedElementMissingOperation() {
@Test
void testTimeQualifiers() {
- String[] tags = {"earliest", "latest", "index_earliest", "index_latest"};
+ String[] tags = {
+ "earliest", "latest", "index_earliest", "index_latest"
+ };
int loops = 0;
for (String tag : tags) {
Element element = document.createElement(tag);
@@ -86,15 +137,16 @@ void testTimeQualifiers() {
@Test
void testInvalidStreamTags() {
- String[] tags = {"earliest", "latest", "index_earliest", "index_latest", "indexstatement"};
+ String[] tags = {
+ "earliest", "latest", "index_earliest", "index_latest", "indexstatement"
+ };
int loops = 0;
for (String tag : tags) {
Element element = document.createElement(tag);
element.setAttribute("value", "1000");
element.setAttribute("operation", "EQUALS");
- Assertions.assertThrows(IllegalStateException.class,
- () -> new ElementCondition(element, streamConfig).condition()
- );
+ Assertions
+ .assertThrows(IllegalStateException.class, () -> new ElementCondition(element, streamConfig).condition());
loops++;
}
Assertions.assertEquals(5, loops);
@@ -105,15 +157,13 @@ void invalidElementNameTest() {
Element element = document.createElement("test");
element.setAttribute("value", "1000");
element.setAttribute("operation", "EQUALS");
- Assertions.assertThrows(IllegalStateException.class,
- () -> new ElementCondition(element, streamConfig).condition()
- );
+ Assertions
+ .assertThrows(IllegalStateException.class, () -> new ElementCondition(element, streamConfig).condition());
Element element2 = document.createElement("hostindex");
element2.setAttribute("value", "test");
element2.setAttribute("operation", "EQUALS");
- Assertions.assertThrows(IllegalStateException.class,
- () -> new ElementCondition(element2, streamConfig).condition()
- );
+ Assertions
+ .assertThrows(IllegalStateException.class, () -> new ElementCondition(element2, streamConfig).condition());
}
@Test
diff --git a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/HostConditionTest.java b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/HostConditionTest.java
index 74599d94..be77c9be 100644
--- a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/HostConditionTest.java
+++ b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/HostConditionTest.java
@@ -1,3 +1,48 @@
+/*
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ *
+ * Additional permission under GNU Affero General Public License version 3
+ * section 7
+ *
+ * If you modify this Program, or any covered work, by linking or combining it
+ * with other code, such other code is not for that reason alone subject to any
+ * of the requirements of the GNU Affero GPL version 3 as long as this Program
+ * is the same Program as licensed from Suomen Kanuuna Oy without any additional
+ * modifications.
+ *
+ * Supplemented terms under GNU Affero General Public License version 3
+ * section 7
+ *
+ * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
+ * versions must be marked as "Modified version of" The Program.
+ *
+ * Names of the licensors and authors may not be used for publicity purposes.
+ *
+ * No rights are granted for use of trade names, trademarks, or service marks
+ * which are in The Program if any.
+ *
+ * Licensee must indemnify licensors and authors for any liability that these
+ * contractual assumptions impose on licensors and authors.
+ *
+ * To the extent this program is licensed as part of the Commercial versions of
+ * Teragrep, the applicable Commercial License may apply to this file if you as
+ * a licensee so wish it.
+ */
package com.teragrep.pth_06.planner.walker.conditions;
import org.jooq.Condition;
diff --git a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/IndexConditionTest.java b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/IndexConditionTest.java
index 644da64d..734177de 100644
--- a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/IndexConditionTest.java
+++ b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/IndexConditionTest.java
@@ -1,3 +1,48 @@
+/*
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ *
+ * Additional permission under GNU Affero General Public License version 3
+ * section 7
+ *
+ * If you modify this Program, or any covered work, by linking or combining it
+ * with other code, such other code is not for that reason alone subject to any
+ * of the requirements of the GNU Affero GPL version 3 as long as this Program
+ * is the same Program as licensed from Suomen Kanuuna Oy without any additional
+ * modifications.
+ *
+ * Supplemented terms under GNU Affero General Public License version 3
+ * section 7
+ *
+ * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
+ * versions must be marked as "Modified version of" The Program.
+ *
+ * Names of the licensors and authors may not be used for publicity purposes.
+ *
+ * No rights are granted for use of trade names, trademarks, or service marks
+ * which are in The Program if any.
+ *
+ * Licensee must indemnify licensors and authors for any liability that these
+ * contractual assumptions impose on licensors and authors.
+ *
+ * To the extent this program is licensed as part of the Commercial versions of
+ * Teragrep, the applicable Commercial License may apply to this file if you as
+ * a licensee so wish it.
+ */
package com.teragrep.pth_06.planner.walker.conditions;
import org.jooq.Condition;
diff --git a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/IndexStatementConditionTest.java b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/IndexStatementConditionTest.java
index 257a72a1..0773a437 100644
--- a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/IndexStatementConditionTest.java
+++ b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/IndexStatementConditionTest.java
@@ -1,3 +1,48 @@
+/*
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ *
+ * Additional permission under GNU Affero General Public License version 3
+ * section 7
+ *
+ * If you modify this Program, or any covered work, by linking or combining it
+ * with other code, such other code is not for that reason alone subject to any
+ * of the requirements of the GNU Affero GPL version 3 as long as this Program
+ * is the same Program as licensed from Suomen Kanuuna Oy without any additional
+ * modifications.
+ *
+ * Supplemented terms under GNU Affero General Public License version 3
+ * section 7
+ *
+ * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
+ * versions must be marked as "Modified version of" The Program.
+ *
+ * Names of the licensors and authors may not be used for publicity purposes.
+ *
+ * No rights are granted for use of trade names, trademarks, or service marks
+ * which are in The Program if any.
+ *
+ * Licensee must indemnify licensors and authors for any liability that these
+ * contractual assumptions impose on licensors and authors.
+ *
+ * To the extent this program is licensed as part of the Commercial versions of
+ * Teragrep, the applicable Commercial License may apply to this file if you as
+ * a licensee so wish it.
+ */
package com.teragrep.pth_06.planner.walker.conditions;
import com.teragrep.blf_01.Tokenizer;
@@ -10,23 +55,31 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-
/**
* Requires database setup for full test
*/
public class IndexStatementConditionTest {
- final ConditionConfig config = new ConditionConfig(DSL.using(new MockConnection(ctx -> new MockResult[0])), false, true, false);
+
+ final ConditionConfig config = new ConditionConfig(
+ DSL.using(new MockConnection(ctx -> new MockResult[0])),
+ false,
+ true,
+ false
+ );
final Tokenizer tokenizer = new Tokenizer(32);
+
@Test
void conditionTest() {
DSLContext ctx = DSL.using(new MockConnection(context -> new MockResult[0]));
// only tests that database access is tried as expected
- Assertions.assertThrows(SQLDialectNotSupportedException.class, () ->
- new IndexStatementCondition(
- "value",
- new ConditionConfig(ctx, false, true, false),
- tokenizer
- ).condition());
+ Assertions
+ .assertThrows(
+ SQLDialectNotSupportedException.class, () -> new IndexStatementCondition(
+ "value",
+ new ConditionConfig(ctx, false, true, false),
+ tokenizer
+ ).condition()
+ );
}
@Test
diff --git a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/LatestConditionTest.java b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/LatestConditionTest.java
index 165d159f..57b5c7c3 100644
--- a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/LatestConditionTest.java
+++ b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/LatestConditionTest.java
@@ -1,3 +1,48 @@
+/*
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ *
+ * Additional permission under GNU Affero General Public License version 3
+ * section 7
+ *
+ * If you modify this Program, or any covered work, by linking or combining it
+ * with other code, such other code is not for that reason alone subject to any
+ * of the requirements of the GNU Affero GPL version 3 as long as this Program
+ * is the same Program as licensed from Suomen Kanuuna Oy without any additional
+ * modifications.
+ *
+ * Supplemented terms under GNU Affero General Public License version 3
+ * section 7
+ *
+ * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
+ * versions must be marked as "Modified version of" The Program.
+ *
+ * Names of the licensors and authors may not be used for publicity purposes.
+ *
+ * No rights are granted for use of trade names, trademarks, or service marks
+ * which are in The Program if any.
+ *
+ * Licensee must indemnify licensors and authors for any liability that these
+ * contractual assumptions impose on licensors and authors.
+ *
+ * To the extent this program is licensed as part of the Commercial versions of
+ * Teragrep, the applicable Commercial License may apply to this file if you as
+ * a licensee so wish it.
+ */
package com.teragrep.pth_06.planner.walker.conditions;
import org.jooq.Condition;
@@ -8,20 +53,18 @@ class LatestConditionTest {
@Test
void conditionTest() {
- String e = "(\n" +
- " \"journaldb\".\"logfile\".\"logdate\" <= date '1970-01-01'\n" +
- " and (UNIX_TIMESTAMP(STR_TO_DATE(SUBSTRING(REGEXP_SUBSTR(path,'[0-9]+(\\.log)?\\.gz(\\.[0-9]*)?$'), 1, 10), '%Y%m%d%H')) <= 1000)\n" +
- ")";
+ String e = "(\n" + " \"journaldb\".\"logfile\".\"logdate\" <= date '1970-01-01'\n"
+ + " and (UNIX_TIMESTAMP(STR_TO_DATE(SUBSTRING(REGEXP_SUBSTR(path,'[0-9]+(\\.log)?\\.gz(\\.[0-9]*)?$'), 1, 10), '%Y%m%d%H')) <= 1000)\n"
+ + ")";
Condition elementCondition = new LatestCondition("1000").condition();
Assertions.assertEquals(e, elementCondition.toString());
}
@Test
void conditionUpdatedTest() {
- String e = "(\n" +
- " \"journaldb\".\"logfile\".\"logdate\" <= date '2000-01-01'\n" +
- " and (UNIX_TIMESTAMP(STR_TO_DATE(SUBSTRING(REGEXP_SUBSTR(path,'[0-9]+(\\.log)?\\.gz(\\.[0-9]*)?$'), 1, 10), '%Y%m%d%H')) <= 946677600)\n" +
- ")";
+ String e = "(\n" + " \"journaldb\".\"logfile\".\"logdate\" <= date '2000-01-01'\n"
+ + " and (UNIX_TIMESTAMP(STR_TO_DATE(SUBSTRING(REGEXP_SUBSTR(path,'[0-9]+(\\.log)?\\.gz(\\.[0-9]*)?$'), 1, 10), '%Y%m%d%H')) <= 946677600)\n"
+ + ")";
Condition elementCondition = new LatestCondition("946677600").condition();
Assertions.assertEquals(e, elementCondition.toString());
}
diff --git a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/SourceTypeConditionTest.java b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/SourceTypeConditionTest.java
index 145c3f8a..a6179093 100644
--- a/src/test/java/com/teragrep/pth_06/planner/walker/conditions/SourceTypeConditionTest.java
+++ b/src/test/java/com/teragrep/pth_06/planner/walker/conditions/SourceTypeConditionTest.java
@@ -1,3 +1,48 @@
+/*
+ * Teragrep Archive Datasource (pth_06)
+ * Copyright (C) 2021-2024 Suomen Kanuuna Oy
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ *
+ * Additional permission under GNU Affero General Public License version 3
+ * section 7
+ *
+ * If you modify this Program, or any covered work, by linking or combining it
+ * with other code, such other code is not for that reason alone subject to any
+ * of the requirements of the GNU Affero GPL version 3 as long as this Program
+ * is the same Program as licensed from Suomen Kanuuna Oy without any additional
+ * modifications.
+ *
+ * Supplemented terms under GNU Affero General Public License version 3
+ * section 7
+ *
+ * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
+ * versions must be marked as "Modified version of" The Program.
+ *
+ * Names of the licensors and authors may not be used for publicity purposes.
+ *
+ * No rights are granted for use of trade names, trademarks, or service marks
+ * which are in The Program if any.
+ *
+ * Licensee must indemnify licensors and authors for any liability that these
+ * contractual assumptions impose on licensors and authors.
+ *
+ * To the extent this program is licensed as part of the Commercial versions of
+ * Teragrep, the applicable Commercial License may apply to this file if you as
+ * a licensee so wish it.
+ */
package com.teragrep.pth_06.planner.walker.conditions;
import org.jooq.Condition;
diff --git a/src/test/java/com/teragrep/pth_06/task/KafkaMicroBatchInputPartitionReaderTest.java b/src/test/java/com/teragrep/pth_06/task/KafkaMicroBatchInputPartitionReaderTest.java
index 710b0704..89b7cca9 100644
--- a/src/test/java/com/teragrep/pth_06/task/KafkaMicroBatchInputPartitionReaderTest.java
+++ b/src/test/java/com/teragrep/pth_06/task/KafkaMicroBatchInputPartitionReaderTest.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06.task;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import com.teragrep.pth_06.planner.MockKafkaConsumerFactory;
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.common.TopicPartition;
diff --git a/src/test/java/com/teragrep/pth_06/task/s3/MockS3.java b/src/test/java/com/teragrep/pth_06/task/s3/MockS3.java
index 8e5ffb8c..7cb48926 100644
--- a/src/test/java/com/teragrep/pth_06/task/s3/MockS3.java
+++ b/src/test/java/com/teragrep/pth_06/task/s3/MockS3.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06.task.s3;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import org.eclipse.jetty.util.component.AbstractLifeCycle;
import org.gaul.s3proxy.AuthenticationType;
import org.gaul.s3proxy.S3Proxy;
diff --git a/src/test/java/com/teragrep/pth_06/task/s3/RowConverterTests.java b/src/test/java/com/teragrep/pth_06/task/s3/RowConverterTests.java
index 93b3058a..a54e21a5 100644
--- a/src/test/java/com/teragrep/pth_06/task/s3/RowConverterTests.java
+++ b/src/test/java/com/teragrep/pth_06/task/s3/RowConverterTests.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06.task.s3;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import org.junit.jupiter.api.Test;
import java.time.Instant;
diff --git a/src/test/java/com/teragrep/pth_06/walker/KafkaWalkerTest.java b/src/test/java/com/teragrep/pth_06/walker/KafkaWalkerTest.java
index 8150170b..3fc9be1c 100644
--- a/src/test/java/com/teragrep/pth_06/walker/KafkaWalkerTest.java
+++ b/src/test/java/com/teragrep/pth_06/walker/KafkaWalkerTest.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06.walker;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import com.teragrep.pth_06.planner.walker.KafkaWalker;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
diff --git a/src/test/java/com/teragrep/pth_06/walker/XmlWalkerTest.java b/src/test/java/com/teragrep/pth_06/walker/XmlWalkerTest.java
index 6ef75d9b..c5390e4e 100644
--- a/src/test/java/com/teragrep/pth_06/walker/XmlWalkerTest.java
+++ b/src/test/java/com/teragrep/pth_06/walker/XmlWalkerTest.java
@@ -45,52 +45,6 @@
*/
package com.teragrep.pth_06.walker;
-/*
- * This program handles user requests that require archive access.
- * Copyright (C) 2022 Suomen Kanuuna Oy
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- *
- * Additional permission under GNU Affero General Public License version 3
- * section 7
- *
- * If you modify this Program, or any covered work, by linking or combining it
- * with other code, such other code is not for that reason alone subject to any
- * of the requirements of the GNU Affero GPL version 3 as long as this Program
- * is the same Program as licensed from Suomen Kanuuna Oy without any additional
- * modifications.
- *
- * Supplemented terms under GNU Affero General Public License version 3
- * section 7
- *
- * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
- * versions must be marked as "Modified version of" The Program.
- *
- * Names of the licensors and authors may not be used for publicity purposes.
- *
- * No rights are granted for use of trade names, trademarks, or service marks
- * which are in The Program if any.
- *
- * Licensee must indemnify licensors and authors for any liability that these
- * contractual assumptions impose on licensors and authors.
- *
- * To the extent this program is licensed as part of the Commercial versions of
- * Teragrep, the applicable Commercial License may apply to this file if you as
- * a licensee so wish it.
- */
-
import com.teragrep.pth_06.planner.walker.ConditionWalker;
import com.teragrep.pth_06.planner.walker.PlainWalker;
import org.jooq.Condition;