mirror of
https://github.com/valitydev/geck.git
synced 2024-11-06 01:35:22 +00:00
INT-41: Transfer to dev.vality (#2)
This commit is contained in:
parent
eac5a8a220
commit
d0444ff297
10
.github/workflows/build.yml
vendored
Normal file
10
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
name: Maven Build Artifact
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
uses: valitydev/base-workflow/.github/workflows/maven-library-build.yml@v1.0.1
|
16
.github/workflows/deploy.yml
vendored
Normal file
16
.github/workflows/deploy.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
name: Maven Deploy Artifact
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
- 'main'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
uses: valitydev/base-workflow/.github/workflows/maven-library-deploy.yml@v1.0.1
|
||||||
|
secrets:
|
||||||
|
server-username: ${{ secrets.OSSRH_USERNAME }}
|
||||||
|
server-password: ${{ secrets.OSSRH_TOKEN }}
|
||||||
|
deploy-secret-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
|
||||||
|
deploy-secret-key-password: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
|||||||
[submodule "build_utils"]
|
|
||||||
path = build_utils
|
|
||||||
url = git@github.com:rbkmoney/build_utils.git
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit c12c9dd296912ec3c34ad443b448df98fef2556a
|
|
@ -5,9 +5,9 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.rbkmoney.geck</groupId>
|
<groupId>dev.vality.geck</groupId>
|
||||||
<artifactId>parent</artifactId>
|
<artifactId>parent</artifactId>
|
||||||
<version>0.6.12</version>
|
<version>0.0.1</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@ -19,8 +19,9 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.rbkmoney.woody</groupId>
|
<groupId>dev.vality.woody</groupId>
|
||||||
<artifactId>libthrift</artifactId>
|
<artifactId>libthrift</artifactId>
|
||||||
|
<version>${woody.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.reflections</groupId>
|
<groupId>org.reflections</groupId>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.common.reflection;
|
package dev.vality.geck.common.reflection;
|
||||||
|
|
||||||
import org.reflections.Configuration;
|
import org.reflections.Configuration;
|
||||||
import org.reflections.Reflections;
|
import org.reflections.Reflections;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.common.stack;
|
package dev.vality.geck.common.stack;
|
||||||
|
|
||||||
public final class ByteStack {
|
public final class ByteStack {
|
||||||
private static final int INITIAL_CAPACITY = 16;
|
private static final int INITIAL_CAPACITY = 16;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.common.stack;
|
package dev.vality.geck.common.stack;
|
||||||
|
|
||||||
public final class ObjectStack<E> {
|
public final class ObjectStack<E> {
|
||||||
private static final int INITIAL_CAPACITY = 16;
|
private static final int INITIAL_CAPACITY = 16;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.common.util;
|
package dev.vality.geck.common.util;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.locks.Lock;
|
import java.util.concurrent.locks.Lock;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.common.util;
|
package dev.vality.geck.common.util;
|
||||||
|
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.common.util;
|
package dev.vality.geck.common.util;
|
||||||
|
|
||||||
import org.apache.thrift.TBase;
|
import org.apache.thrift.TBase;
|
||||||
import org.apache.thrift.TFieldIdEnum;
|
import org.apache.thrift.TFieldIdEnum;
|
||||||
@ -12,6 +12,7 @@ import java.util.Objects;
|
|||||||
public class TBaseUtil {
|
public class TBaseUtil {
|
||||||
|
|
||||||
public static TFieldIdEnum getField(String name, TBase tBase) {
|
public static TFieldIdEnum getField(String name, TBase tBase) {
|
||||||
|
|
||||||
for (TFieldIdEnum tFieldIdEnum : tBase.getFields()) {
|
for (TFieldIdEnum tFieldIdEnum : tBase.getFields()) {
|
||||||
if (tFieldIdEnum.getFieldName().equals(name)) {
|
if (tFieldIdEnum.getFieldName().equals(name)) {
|
||||||
return tFieldIdEnum;
|
return tFieldIdEnum;
|
||||||
@ -21,15 +22,11 @@ public class TBaseUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static TFieldIdEnum getFieldById(short id, TBase tBase) {
|
public static TFieldIdEnum getFieldById(short id, TBase tBase) {
|
||||||
for (TFieldIdEnum tFieldIdEnum : tBase.getFields()) {
|
return tBase.fieldForId(id);
|
||||||
if (tFieldIdEnum.getThriftFieldId() == id) {
|
|
||||||
return tFieldIdEnum;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FieldMetaData getMetaData(TFieldIdEnum tFieldIdEnum, TBase tBase) {
|
public static FieldMetaData getMetaData(TFieldIdEnum tFieldIdEnum, TBase tBase) {
|
||||||
|
|
||||||
Map<TFieldIdEnum, FieldMetaData> fieldMetaDataMap = tBase.getFieldMetaData();
|
Map<TFieldIdEnum, FieldMetaData> fieldMetaDataMap = tBase.getFieldMetaData();
|
||||||
return fieldMetaDataMap.get(tFieldIdEnum);
|
return fieldMetaDataMap.get(tFieldIdEnum);
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.common.util;
|
package dev.vality.geck.common.util;
|
||||||
|
|
||||||
import java.time.*;
|
import java.time.*;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.common.reflection;
|
package dev.vality.geck.common.reflection;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.common.util;
|
package dev.vality.geck.common.util;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
@ -5,9 +5,9 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.rbkmoney.geck</groupId>
|
<groupId>dev.vality.geck</groupId>
|
||||||
<artifactId>parent</artifactId>
|
<artifactId>parent</artifactId>
|
||||||
<version>0.6.12</version>
|
<version>0.0.1</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@ -19,16 +19,17 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.rbkmoney.geck</groupId>
|
<groupId>dev.vality.geck</groupId>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.rbkmoney.geck</groupId>
|
<groupId>dev.vality.geck</groupId>
|
||||||
<artifactId>serializer</artifactId>
|
<artifactId>serializer</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.rbkmoney.woody</groupId>
|
<groupId>dev.vality.woody</groupId>
|
||||||
<artifactId>libthrift</artifactId>
|
<artifactId>libthrift</artifactId>
|
||||||
|
<version>${woody.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter;
|
package dev.vality.geck.filter;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter;
|
package dev.vality.geck.filter;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package com.rbkmoney.geck.filter;
|
package dev.vality.geck.filter;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.rule.PathConditionRule;
|
import dev.vality.geck.filter.rule.PathConditionRule;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter;
|
package dev.vality.geck.filter;
|
||||||
|
|
||||||
public interface Parser {
|
public interface Parser {
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
package com.rbkmoney.geck.filter;
|
package dev.vality.geck.filter;
|
||||||
|
|
||||||
import com.rbkmoney.geck.common.util.TBaseUtil;
|
import dev.vality.geck.common.util.TBaseUtil;
|
||||||
import com.rbkmoney.geck.common.util.TypeUtil;
|
import dev.vality.geck.common.util.TypeUtil;
|
||||||
import com.rbkmoney.geck.filter.rule.PathConditionRule;
|
import dev.vality.geck.filter.rule.PathConditionRule;
|
||||||
import org.apache.thrift.TBase;
|
import org.apache.thrift.TBase;
|
||||||
import org.apache.thrift.TFieldIdEnum;
|
import org.apache.thrift.TFieldIdEnum;
|
||||||
import org.apache.thrift.TUnion;
|
import org.apache.thrift.TUnion;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter;
|
package dev.vality.geck.filter;
|
||||||
|
|
||||||
public interface Rule {
|
public interface Rule {
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package com.rbkmoney.geck.filter.condition;
|
package dev.vality.geck.filter.condition;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Condition;
|
import dev.vality.geck.filter.Condition;
|
||||||
|
|
||||||
public class EqualsCondition implements Condition {
|
public class EqualsCondition implements Condition {
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package com.rbkmoney.geck.filter.condition;
|
package dev.vality.geck.filter.condition;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Condition;
|
import dev.vality.geck.filter.Condition;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package com.rbkmoney.geck.filter.condition;
|
package dev.vality.geck.filter.condition;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Condition;
|
import dev.vality.geck.filter.Condition;
|
||||||
|
|
||||||
public class IsNullCondition implements Condition {
|
public class IsNullCondition implements Condition {
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
|
|
||||||
class ArrayIndexSelector extends Selector {
|
class ArrayIndexSelector extends Selector {
|
||||||
private final Rule rule;
|
private final Rule rule;
|
@ -1,9 +1,9 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
import com.rbkmoney.geck.serializer.kit.EventFlags;
|
import dev.vality.geck.serializer.kit.EventFlags;
|
||||||
|
|
||||||
import static com.rbkmoney.geck.serializer.kit.EventFlags.*;
|
import static dev.vality.geck.serializer.kit.EventFlags.*;
|
||||||
|
|
||||||
class ArraySelector extends Selector {
|
class ArraySelector extends Selector {
|
||||||
private final Rule rule;
|
private final Rule rule;
|
@ -1,7 +1,7 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
import com.rbkmoney.geck.serializer.kit.EventFlags;
|
import dev.vality.geck.serializer.kit.EventFlags;
|
||||||
|
|
||||||
class FieldSelector extends Selector {
|
class FieldSelector extends Selector {
|
||||||
private final Rule rule;
|
private final Rule rule;
|
@ -1,13 +1,13 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
import com.rbkmoney.geck.serializer.StructHandleResult;
|
import dev.vality.geck.serializer.StructHandleResult;
|
||||||
import com.rbkmoney.geck.serializer.StructHandler;
|
import dev.vality.geck.serializer.StructHandler;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.rbkmoney.geck.serializer.kit.EventFlags.*;
|
import static dev.vality.geck.serializer.kit.EventFlags.*;
|
||||||
|
|
||||||
public class FilteringHandler implements StructHandler<List<Rule>>{
|
public class FilteringHandler implements StructHandler<List<Rule>>{
|
||||||
private final StructVisitor visitor;
|
private final StructVisitor visitor;
|
@ -1,9 +1,9 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
import com.rbkmoney.geck.serializer.kit.EventFlags;
|
import dev.vality.geck.serializer.kit.EventFlags;
|
||||||
|
|
||||||
import static com.rbkmoney.geck.serializer.kit.EventFlags.startMapKey;
|
import static dev.vality.geck.serializer.kit.EventFlags.startMapKey;
|
||||||
|
|
||||||
class MapKeySelector extends Selector {
|
class MapKeySelector extends Selector {
|
||||||
private final Rule rule;
|
private final Rule rule;
|
@ -1,9 +1,9 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
|
|
||||||
import static com.rbkmoney.geck.serializer.kit.EventFlags.endMap;
|
import static dev.vality.geck.serializer.kit.EventFlags.endMap;
|
||||||
import static com.rbkmoney.geck.serializer.kit.EventFlags.startMap;
|
import static dev.vality.geck.serializer.kit.EventFlags.startMap;
|
||||||
|
|
||||||
class MapSelector extends Selector {
|
class MapSelector extends Selector {
|
||||||
private final Rule rule;
|
private final Rule rule;
|
@ -1,11 +1,9 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
import com.rbkmoney.geck.serializer.kit.EventFlags;
|
import dev.vality.geck.serializer.kit.EventFlags;
|
||||||
|
|
||||||
import static com.rbkmoney.geck.serializer.kit.EventFlags.endMapKey;
|
import static dev.vality.geck.serializer.kit.EventFlags.endMapValue;
|
||||||
import static com.rbkmoney.geck.serializer.kit.EventFlags.endMapValue;
|
|
||||||
import static com.rbkmoney.geck.serializer.kit.EventFlags.endStruct;
|
|
||||||
|
|
||||||
class MapValueSelector extends Selector {
|
class MapValueSelector extends Selector {
|
||||||
private final Rule rule;
|
private final Rule rule;
|
@ -1,7 +1,7 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
import com.rbkmoney.geck.filter.rule.ConditionRule;
|
import dev.vality.geck.filter.rule.ConditionRule;
|
||||||
|
|
||||||
public class MatchKeySelector extends Selector {
|
public class MatchKeySelector extends Selector {
|
||||||
public static final Rule MATCH_RULE = new ConditionRule(obj -> true);
|
public static final Rule MATCH_RULE = new ConditionRule(obj -> true);
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
abstract class MultiSelector extends Selector {
|
abstract class MultiSelector extends Selector {
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,8 +1,8 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Condition;
|
import dev.vality.geck.filter.Condition;
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
import com.rbkmoney.geck.serializer.StructHandleResult;
|
import dev.vality.geck.serializer.StructHandleResult;
|
||||||
|
|
||||||
abstract class Selector {
|
abstract class Selector {
|
||||||
private static final SelectionResult.Mismatch mismatchResult = new SelectionResult.Mismatch();
|
private static final SelectionResult.Mismatch mismatchResult = new SelectionResult.Mismatch();
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import java.util.AbstractMap;
|
import java.util.AbstractMap;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
@ -1,9 +1,9 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.common.stack.ObjectStack;
|
import dev.vality.geck.common.stack.ObjectStack;
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
import com.rbkmoney.geck.filter.condition.EqualsCondition;
|
import dev.vality.geck.filter.condition.EqualsCondition;
|
||||||
import com.rbkmoney.geck.filter.rule.ConditionRule;
|
import dev.vality.geck.filter.rule.ConditionRule;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
@ -11,8 +11,7 @@ import java.io.StringReader;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.rbkmoney.geck.filter.kit.msgpack.MatchKeySelector.MATCH_RULE;
|
import static dev.vality.geck.filter.kit.msgpack.SelectorParser.State.*;
|
||||||
import static com.rbkmoney.geck.filter.kit.msgpack.SelectorParser.State.*;
|
|
||||||
|
|
||||||
public class SelectorParser {
|
public class SelectorParser {
|
||||||
enum State {
|
enum State {
|
||||||
@ -231,15 +230,15 @@ public class SelectorParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ArrayIndexSelector createArrayAnyIndexSelector() {
|
private ArrayIndexSelector createArrayAnyIndexSelector() {
|
||||||
return createArrayIndexSelector(MATCH_RULE, Selector.Type.REPEATABLE);
|
return createArrayIndexSelector(MatchKeySelector.MATCH_RULE, Selector.Type.REPEATABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ArraySelector createArraySelector() {
|
private ArraySelector createArraySelector() {
|
||||||
return new ArraySelector(MATCH_RULE, Selector.Type.UNREPEATABLE);
|
return new ArraySelector(MatchKeySelector.MATCH_RULE, Selector.Type.UNREPEATABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private MapValueSelector createMapValueSelector() {
|
private MapValueSelector createMapValueSelector() {
|
||||||
return new MapValueSelector(MATCH_RULE, Selector.Type.UNREPEATABLE);
|
return new MapValueSelector(MatchKeySelector.MATCH_RULE, Selector.Type.UNREPEATABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private MatchKeySelector createMapKeyMatchSelector() {
|
private MatchKeySelector createMapKeyMatchSelector() {
|
||||||
@ -251,19 +250,19 @@ public class SelectorParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private MapKeySelector createMapKeySelector() {
|
private MapKeySelector createMapKeySelector() {
|
||||||
return createMapKeySelector(MATCH_RULE, Selector.Type.REPEATABLE);
|
return createMapKeySelector(MatchKeySelector.MATCH_RULE, Selector.Type.REPEATABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private MapSelector createMapSelector() {
|
private MapSelector createMapSelector() {
|
||||||
return new MapSelector(MATCH_RULE, Selector.Type.UNREPEATABLE);
|
return new MapSelector(MatchKeySelector.MATCH_RULE, Selector.Type.UNREPEATABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private StructSelector createStructSelector() {
|
private StructSelector createStructSelector() {
|
||||||
return new StructSelector(MATCH_RULE, Selector.Type.UNREPEATABLE);
|
return new StructSelector(MatchKeySelector.MATCH_RULE, Selector.Type.UNREPEATABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private FieldSelector createAnyNameSelector() {
|
private FieldSelector createAnyNameSelector() {
|
||||||
return createNameSelector(MATCH_RULE, Selector.Type.REPEATABLE);
|
return createNameSelector(MatchKeySelector.MATCH_RULE, Selector.Type.REPEATABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private FieldSelector createNameSelector(String name, boolean jumpValue) {
|
private FieldSelector createNameSelector(String name, boolean jumpValue) {
|
@ -1,9 +1,9 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
import com.rbkmoney.geck.serializer.kit.EventFlags;
|
import dev.vality.geck.serializer.kit.EventFlags;
|
||||||
|
|
||||||
import static com.rbkmoney.geck.serializer.kit.EventFlags.endStruct;
|
import static dev.vality.geck.serializer.kit.EventFlags.endStruct;
|
||||||
|
|
||||||
class StructSelector extends Selector {
|
class StructSelector extends Selector {
|
||||||
private final Rule rule;
|
private final Rule rule;
|
@ -1,14 +1,14 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
import com.rbkmoney.geck.serializer.StructHandleResult;
|
import dev.vality.geck.serializer.StructHandleResult;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
import static com.rbkmoney.geck.serializer.StructHandleResult.*;
|
import static dev.vality.geck.serializer.StructHandleResult.*;
|
||||||
|
|
||||||
class StructVisitor {
|
class StructVisitor {
|
||||||
private final Supplier<Selector.Config[]> cnfSupplier;
|
private final Supplier<Selector.Config[]> cnfSupplier;
|
@ -1,7 +1,7 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
import com.rbkmoney.geck.serializer.kit.EventFlags;
|
import dev.vality.geck.serializer.kit.EventFlags;
|
||||||
|
|
||||||
class ValueSelector extends Selector {
|
class ValueSelector extends Selector {
|
||||||
private final Rule rule;
|
private final Rule rule;
|
@ -1,7 +1,7 @@
|
|||||||
package com.rbkmoney.geck.filter.parser;
|
package dev.vality.geck.filter.parser;
|
||||||
|
|
||||||
import com.rbkmoney.geck.common.util.StringUtil;
|
import dev.vality.geck.common.util.StringUtil;
|
||||||
import com.rbkmoney.geck.filter.Parser;
|
import dev.vality.geck.filter.Parser;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package com.rbkmoney.geck.filter.rule;
|
package dev.vality.geck.filter.rule;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Condition;
|
import dev.vality.geck.filter.Condition;
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
|
|
||||||
public class ConditionRule implements Rule {
|
public class ConditionRule implements Rule {
|
||||||
private final Condition[] conditions;
|
private final Condition[] conditions;
|
@ -1,9 +1,9 @@
|
|||||||
package com.rbkmoney.geck.filter.rule;
|
package dev.vality.geck.filter.rule;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Condition;
|
import dev.vality.geck.filter.Condition;
|
||||||
import com.rbkmoney.geck.filter.Parser;
|
import dev.vality.geck.filter.Parser;
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
import com.rbkmoney.geck.filter.parser.PathParser;
|
import dev.vality.geck.filter.parser.PathParser;
|
||||||
|
|
||||||
public class PathConditionRule implements Rule {
|
public class PathConditionRule implements Rule {
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
package com.rbkmoney.geck.filter;
|
package dev.vality.geck.filter;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.condition.EqualsCondition;
|
import dev.vality.geck.filter.condition.EqualsCondition;
|
||||||
import com.rbkmoney.geck.filter.condition.IsNullCondition;
|
import dev.vality.geck.filter.condition.IsNullCondition;
|
||||||
import com.rbkmoney.geck.filter.rule.PathConditionRule;
|
import dev.vality.geck.filter.rule.PathConditionRule;
|
||||||
import com.rbkmoney.geck.filter.test.*;
|
import dev.vality.geck.filter.test.*;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
@ -1,24 +1,24 @@
|
|||||||
package com.rbkmoney.geck.filter.kit.msgpack;
|
package dev.vality.geck.filter.kit.msgpack;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.rbkmoney.geck.filter.Rule;
|
import dev.vality.geck.filter.Rule;
|
||||||
import com.rbkmoney.geck.filter.condition.EqualsCondition;
|
import dev.vality.geck.filter.condition.EqualsCondition;
|
||||||
import com.rbkmoney.geck.filter.condition.IsNullCondition;
|
import dev.vality.geck.filter.condition.IsNullCondition;
|
||||||
import com.rbkmoney.geck.filter.rule.ConditionRule;
|
import dev.vality.geck.filter.rule.ConditionRule;
|
||||||
import com.rbkmoney.geck.filter.test.filter.IData;
|
import dev.vality.geck.filter.test.filter.IData;
|
||||||
import com.rbkmoney.geck.filter.test.filter.IDataCollection;
|
import dev.vality.geck.filter.test.filter.IDataCollection;
|
||||||
import com.rbkmoney.geck.filter.test.filter.ILvl2Data;
|
import dev.vality.geck.filter.test.filter.ILvl2Data;
|
||||||
import com.rbkmoney.geck.filter.test.filter.ILvlData;
|
import dev.vality.geck.filter.test.filter.ILvlData;
|
||||||
import com.rbkmoney.geck.filter.test.filter.IStatusCanceled;
|
import dev.vality.geck.filter.test.filter.IStatusCanceled;
|
||||||
import com.rbkmoney.geck.filter.test.filter.IStatusPaid;
|
import dev.vality.geck.filter.test.filter.IStatusPaid;
|
||||||
import com.rbkmoney.geck.filter.test.filter.Invoice;
|
import dev.vality.geck.filter.test.filter.Invoice;
|
||||||
import com.rbkmoney.geck.filter.test.filter.InvoiceStatus;
|
import dev.vality.geck.filter.test.filter.InvoiceStatus;
|
||||||
import com.rbkmoney.geck.filter.test.filter.MapTest;
|
import dev.vality.geck.filter.test.filter.MapTest;
|
||||||
import com.rbkmoney.geck.serializer.kit.json.JsonHandler;
|
import dev.vality.geck.serializer.kit.json.JsonHandler;
|
||||||
import com.rbkmoney.geck.serializer.kit.msgpack.MsgPackHandler;
|
import dev.vality.geck.serializer.kit.msgpack.MsgPackHandler;
|
||||||
import com.rbkmoney.geck.serializer.kit.msgpack.MsgPackProcessor;
|
import dev.vality.geck.serializer.kit.msgpack.MsgPackProcessor;
|
||||||
import com.rbkmoney.geck.serializer.kit.tbase.TBaseProcessor;
|
import dev.vality.geck.serializer.kit.tbase.TBaseProcessor;
|
||||||
import org.apache.thrift.TBase;
|
import org.apache.thrift.TBase;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package com.rbkmoney.geck.filter.parser;
|
package dev.vality.geck.filter.parser;
|
||||||
|
|
||||||
import com.rbkmoney.geck.filter.Parser;
|
import dev.vality.geck.filter.Parser;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test;
|
package dev.vality.geck.filter.test;
|
||||||
|
|
||||||
import org.apache.thrift.EncodingUtils;
|
import org.apache.thrift.EncodingUtils;
|
||||||
import org.apache.thrift.protocol.TProtocolException;
|
import org.apache.thrift.protocol.TProtocolException;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test;
|
package dev.vality.geck.filter.test;
|
||||||
|
|
||||||
import org.apache.thrift.EncodingUtils;
|
import org.apache.thrift.EncodingUtils;
|
||||||
import org.apache.thrift.protocol.TProtocolException;
|
import org.apache.thrift.protocol.TProtocolException;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test;
|
package dev.vality.geck.filter.test;
|
||||||
|
|
||||||
import org.apache.thrift.protocol.TTupleProtocol;
|
import org.apache.thrift.protocol.TTupleProtocol;
|
||||||
import org.apache.thrift.scheme.IScheme;
|
import org.apache.thrift.scheme.IScheme;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test;
|
package dev.vality.geck.filter.test;
|
||||||
|
|
||||||
import org.apache.thrift.protocol.TProtocolException;
|
import org.apache.thrift.protocol.TProtocolException;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test;
|
package dev.vality.geck.filter.test;
|
||||||
|
|
||||||
import org.apache.thrift.EncodingUtils;
|
import org.apache.thrift.EncodingUtils;
|
||||||
import org.apache.thrift.protocol.TProtocolException;
|
import org.apache.thrift.protocol.TProtocolException;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test;
|
package dev.vality.geck.filter.test;
|
||||||
|
|
||||||
import org.apache.thrift.TEnum;
|
import org.apache.thrift.TEnum;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test;
|
package dev.vality.geck.filter.test;
|
||||||
|
|
||||||
import org.apache.thrift.protocol.TProtocolException;
|
import org.apache.thrift.protocol.TProtocolException;
|
||||||
import org.apache.thrift.protocol.TTupleProtocol;
|
import org.apache.thrift.protocol.TTupleProtocol;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test;
|
package dev.vality.geck.filter.test;
|
||||||
|
|
||||||
import org.apache.thrift.protocol.TProtocolException;
|
import org.apache.thrift.protocol.TProtocolException;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test.filter;
|
package dev.vality.geck.filter.test.filter;
|
||||||
|
|
||||||
import org.apache.thrift.protocol.TProtocolException;
|
import org.apache.thrift.protocol.TProtocolException;
|
||||||
import org.apache.thrift.protocol.TTupleProtocol;
|
import org.apache.thrift.protocol.TTupleProtocol;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test.filter;
|
package dev.vality.geck.filter.test.filter;
|
||||||
|
|
||||||
import org.apache.thrift.protocol.TProtocolException;
|
import org.apache.thrift.protocol.TProtocolException;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test.filter;
|
package dev.vality.geck.filter.test.filter;
|
||||||
|
|
||||||
import org.apache.thrift.protocol.TProtocolException;
|
import org.apache.thrift.protocol.TProtocolException;
|
||||||
import org.apache.thrift.protocol.TTupleProtocol;
|
import org.apache.thrift.protocol.TTupleProtocol;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test.filter;
|
package dev.vality.geck.filter.test.filter;
|
||||||
|
|
||||||
import org.apache.thrift.protocol.TTupleProtocol;
|
import org.apache.thrift.protocol.TTupleProtocol;
|
||||||
import org.apache.thrift.scheme.IScheme;
|
import org.apache.thrift.scheme.IScheme;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test.filter;
|
package dev.vality.geck.filter.test.filter;
|
||||||
|
|
||||||
import org.apache.thrift.protocol.TProtocolException;
|
import org.apache.thrift.protocol.TProtocolException;
|
||||||
import org.apache.thrift.protocol.TTupleProtocol;
|
import org.apache.thrift.protocol.TTupleProtocol;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test.filter;
|
package dev.vality.geck.filter.test.filter;
|
||||||
|
|
||||||
import org.apache.thrift.protocol.TTupleProtocol;
|
import org.apache.thrift.protocol.TTupleProtocol;
|
||||||
import org.apache.thrift.scheme.IScheme;
|
import org.apache.thrift.scheme.IScheme;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test.filter;
|
package dev.vality.geck.filter.test.filter;
|
||||||
|
|
||||||
import org.apache.thrift.EncodingUtils;
|
import org.apache.thrift.EncodingUtils;
|
||||||
import org.apache.thrift.protocol.TTupleProtocol;
|
import org.apache.thrift.protocol.TTupleProtocol;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test.filter;
|
package dev.vality.geck.filter.test.filter;
|
||||||
|
|
||||||
import org.apache.thrift.protocol.TProtocolException;
|
import org.apache.thrift.protocol.TProtocolException;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.filter.test.filter;
|
package dev.vality.geck.filter.test.filter;
|
||||||
|
|
||||||
import org.apache.thrift.protocol.TTupleProtocol;
|
import org.apache.thrift.protocol.TTupleProtocol;
|
||||||
import org.apache.thrift.scheme.IScheme;
|
import org.apache.thrift.scheme.IScheme;
|
@ -1,4 +1,4 @@
|
|||||||
namespace java com.rbkmoney.geck.filter.test.filter
|
namespace java dev.vality.geck.filter.test.filter
|
||||||
|
|
||||||
struct IStatusPaid {
|
struct IStatusPaid {
|
||||||
1: string date
|
1: string date
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace java com.rbkmoney.geck.filter.test
|
namespace java dev.vality.geck.filter.test
|
||||||
|
|
||||||
struct TestObject {
|
struct TestObject {
|
||||||
1: required i64 id
|
1: required i64 id
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.rbkmoney.geck</groupId>
|
<groupId>dev.vality.geck</groupId>
|
||||||
<artifactId>parent</artifactId>
|
<artifactId>parent</artifactId>
|
||||||
<version>0.6.12</version>
|
<version>0.0.1</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.rbkmoney.geck</groupId>
|
<groupId>dev.vality.geck</groupId>
|
||||||
<artifactId>serializer</artifactId>
|
<artifactId>serializer</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit.object;
|
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.MigrationException;
|
|
||||||
import com.rbkmoney.geck.migrator.ThriftSpec;
|
|
||||||
|
|
||||||
public interface ObjectSpec {
|
|
||||||
Object apply(Object in) throws MigrationException;
|
|
||||||
ThriftSpec getThriftSpec();
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.migrator;
|
package dev.vality.geck.migrator;
|
||||||
|
|
||||||
public class MigrationException extends Exception {
|
public class MigrationException extends Exception {
|
||||||
public MigrationException() {
|
public MigrationException() {
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.migrator;
|
package dev.vality.geck.migrator;
|
||||||
|
|
||||||
public interface MigrationManager {
|
public interface MigrationManager {
|
||||||
<I, O> O migrate(I src, ThriftSpec thriftSpec, SerializerSpec<I, O> serializerSpec) throws MigrationException;
|
<I, O> O migrate(I src, ThriftSpec thriftSpec, SerializerSpec<I, O> serializerSpec) throws MigrationException;
|
@ -1,10 +1,10 @@
|
|||||||
package com.rbkmoney.geck.migrator;
|
package dev.vality.geck.migrator;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.kit.BaseMigrationManager;
|
import dev.vality.geck.migrator.kit.BaseMigrationManager;
|
||||||
import com.rbkmoney.geck.migrator.kit.BaseMigrationStore;
|
import dev.vality.geck.migrator.kit.BaseMigrationStore;
|
||||||
import com.rbkmoney.geck.migrator.kit.MigrationPointProvider;
|
import dev.vality.geck.migrator.kit.MigrationPointProvider;
|
||||||
import com.rbkmoney.geck.migrator.kit.jolt.JoltMigrator;
|
import dev.vality.geck.migrator.kit.jolt.JoltMigrator;
|
||||||
import com.rbkmoney.geck.migrator.kit.object.ObjectMigrator;
|
import dev.vality.geck.migrator.kit.object.ObjectMigrator;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.migrator;
|
package dev.vality.geck.migrator;
|
||||||
|
|
||||||
public class MigrationPoint {
|
public class MigrationPoint {
|
||||||
private final long id;
|
private final long id;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.migrator;
|
package dev.vality.geck.migrator;
|
||||||
|
|
||||||
public interface MigrationSpec<T> {
|
public interface MigrationSpec<T> {
|
||||||
T getSpec();
|
T getSpec();
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.migrator;
|
package dev.vality.geck.migrator;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.migrator;
|
package dev.vality.geck.migrator;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.migrator;
|
package dev.vality.geck.migrator;
|
||||||
|
|
||||||
public interface Migrator {
|
public interface Migrator {
|
||||||
/**
|
/**
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.migrator;
|
package dev.vality.geck.migrator;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.migrator;
|
package dev.vality.geck.migrator;
|
||||||
|
|
||||||
public interface SerializerSpec<I, O> {
|
public interface SerializerSpec<I, O> {
|
||||||
SerializerDef<I> getInDef();
|
SerializerDef<I> getInDef();
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.migrator;
|
package dev.vality.geck.migrator;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rbkmoney.geck.migrator;
|
package dev.vality.geck.migrator;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit;
|
package dev.vality.geck.migrator.kit;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.*;
|
import dev.vality.geck.serializer.StructHandler;
|
||||||
import com.rbkmoney.geck.serializer.StructHandler;
|
import dev.vality.geck.serializer.StructProcessor;
|
||||||
import com.rbkmoney.geck.serializer.StructProcessor;
|
import dev.vality.geck.migrator.*;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit;
|
package dev.vality.geck.migrator.kit;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.*;
|
import dev.vality.geck.migrator.*;
|
||||||
import com.rbkmoney.geck.migrator.kit.nop.NopMigrator;
|
import dev.vality.geck.migrator.kit.nop.NopMigrator;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
@ -1,6 +1,6 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit;
|
package dev.vality.geck.migrator.kit;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.MigrationSpec;
|
import dev.vality.geck.migrator.MigrationSpec;
|
||||||
|
|
||||||
public class BaseMigrationSpec<T> implements MigrationSpec<T> {
|
public class BaseMigrationSpec<T> implements MigrationSpec<T> {
|
||||||
private final T spec;
|
private final T spec;
|
@ -1,7 +1,7 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit;
|
package dev.vality.geck.migrator.kit;
|
||||||
|
|
||||||
import com.rbkmoney.geck.common.util.ObjectCache;
|
import dev.vality.geck.common.util.ObjectCache;
|
||||||
import com.rbkmoney.geck.migrator.*;
|
import dev.vality.geck.migrator.*;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -1,13 +1,13 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit;
|
package dev.vality.geck.migrator.kit;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.SerializerDef;
|
import dev.vality.geck.migrator.SerializerDef;
|
||||||
import com.rbkmoney.geck.migrator.ThriftDef;
|
import dev.vality.geck.migrator.ThriftDef;
|
||||||
import com.rbkmoney.geck.migrator.kit.jolt.JoltMigrator;
|
import dev.vality.geck.migrator.kit.jolt.JoltMigrator;
|
||||||
import com.rbkmoney.geck.migrator.kit.object.ObjectMigrator;
|
import dev.vality.geck.migrator.kit.object.ObjectMigrator;
|
||||||
import com.rbkmoney.geck.serializer.StructHandler;
|
import dev.vality.geck.serializer.StructHandler;
|
||||||
import com.rbkmoney.geck.serializer.StructProcessor;
|
import dev.vality.geck.serializer.StructProcessor;
|
||||||
import com.rbkmoney.geck.serializer.kit.object.ObjectHandler;
|
import dev.vality.geck.serializer.kit.object.ObjectHandler;
|
||||||
import com.rbkmoney.geck.serializer.kit.object.ObjectProcessor;
|
import dev.vality.geck.serializer.kit.object.ObjectProcessor;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,7 +1,7 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit;
|
package dev.vality.geck.migrator.kit;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.SerializerDef;
|
import dev.vality.geck.migrator.SerializerDef;
|
||||||
import com.rbkmoney.geck.migrator.SerializerSpec;
|
import dev.vality.geck.migrator.SerializerSpec;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
@ -1,12 +1,10 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit;
|
package dev.vality.geck.migrator.kit;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.MigrationException;
|
import dev.vality.geck.migrator.MigrationException;
|
||||||
import com.rbkmoney.geck.migrator.MigrationPoint;
|
import dev.vality.geck.migrator.MigrationPoint;
|
||||||
import com.rbkmoney.geck.migrator.MigrationSpec;
|
import dev.vality.geck.migrator.ThriftSpec;
|
||||||
import com.rbkmoney.geck.migrator.ThriftSpec;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public interface MigrationPointProvider {
|
public interface MigrationPointProvider {
|
@ -1,9 +1,7 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit;
|
package dev.vality.geck.migrator.kit;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.SerializerDef;
|
import dev.vality.geck.migrator.SerializerDef;
|
||||||
import com.rbkmoney.geck.migrator.SerializerSpec;
|
import dev.vality.geck.migrator.SerializerSpec;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class MutableSerializerSpec<I, O> implements SerializerSpec<I, O> {
|
public class MutableSerializerSpec<I, O> implements SerializerSpec<I, O> {
|
||||||
private SerializerDef<I> inDef;
|
private SerializerDef<I> inDef;
|
@ -1,6 +1,6 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit;
|
package dev.vality.geck.migrator.kit;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.ThriftDef;
|
import dev.vality.geck.migrator.ThriftDef;
|
||||||
|
|
||||||
public class MutableThriftDef extends ThriftDef {
|
public class MutableThriftDef extends ThriftDef {
|
||||||
private int version;
|
private int version;
|
@ -1,9 +1,9 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit;
|
package dev.vality.geck.migrator.kit;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.SerializerDef;
|
import dev.vality.geck.migrator.SerializerDef;
|
||||||
import com.rbkmoney.geck.migrator.ThriftDef;
|
import dev.vality.geck.migrator.ThriftDef;
|
||||||
import com.rbkmoney.geck.serializer.StructHandler;
|
import dev.vality.geck.serializer.StructHandler;
|
||||||
import com.rbkmoney.geck.serializer.StructProcessor;
|
import dev.vality.geck.serializer.StructProcessor;
|
||||||
|
|
||||||
public interface SerializerProvider {
|
public interface SerializerProvider {
|
||||||
<S> StructProcessor<S> getStructProcessor(SerializerDef<S> sDef, ThriftDef srcTypeDef);
|
<S> StructProcessor<S> getStructProcessor(SerializerDef<S> sDef, ThriftDef srcTypeDef);
|
@ -1,8 +1,8 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit;
|
package dev.vality.geck.migrator.kit;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.MigrationException;
|
import dev.vality.geck.migrator.MigrationException;
|
||||||
import com.rbkmoney.geck.migrator.MigrationPoint;
|
import dev.vality.geck.migrator.MigrationPoint;
|
||||||
import com.rbkmoney.geck.migrator.ThriftSpec;
|
import dev.vality.geck.migrator.ThriftSpec;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
@ -1,11 +1,11 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit.jolt;
|
package dev.vality.geck.migrator.kit.jolt;
|
||||||
|
|
||||||
import com.bazaarvoice.jolt.Chainr;
|
import com.bazaarvoice.jolt.Chainr;
|
||||||
import com.bazaarvoice.jolt.JsonUtils;
|
import com.bazaarvoice.jolt.JsonUtils;
|
||||||
import com.rbkmoney.geck.common.reflection.ClassFinder;
|
import dev.vality.geck.common.reflection.ClassFinder;
|
||||||
import com.rbkmoney.geck.migrator.*;
|
import dev.vality.geck.migrator.*;
|
||||||
import com.rbkmoney.geck.migrator.kit.BaseMigrationSpec;
|
import dev.vality.geck.migrator.kit.BaseMigrationSpec;
|
||||||
import com.rbkmoney.geck.migrator.kit.SimpleMigrationPointProvider;
|
import dev.vality.geck.migrator.kit.SimpleMigrationPointProvider;
|
||||||
|
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
@ -1,8 +1,8 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit.jolt;
|
package dev.vality.geck.migrator.kit.jolt;
|
||||||
|
|
||||||
import com.bazaarvoice.jolt.Chainr;
|
import com.bazaarvoice.jolt.Chainr;
|
||||||
import com.rbkmoney.geck.migrator.*;
|
import dev.vality.geck.migrator.*;
|
||||||
import com.rbkmoney.geck.migrator.kit.AbstractMigrator;
|
import dev.vality.geck.migrator.kit.AbstractMigrator;
|
||||||
|
|
||||||
public class JoltMigrator extends AbstractMigrator {
|
public class JoltMigrator extends AbstractMigrator {
|
||||||
public static final SerializerDef<Object> SERIALIZER_DEF = new SerializerDef<>(MigrationType.JOLT.getKey());
|
public static final SerializerDef<Object> SERIALIZER_DEF = new SerializerDef<>(MigrationType.JOLT.getKey());
|
@ -1,7 +1,7 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit.jolt;
|
package dev.vality.geck.migrator.kit.jolt;
|
||||||
|
|
||||||
import com.bazaarvoice.jolt.Chainr;
|
import com.bazaarvoice.jolt.Chainr;
|
||||||
import com.rbkmoney.geck.migrator.ThriftSpec;
|
import dev.vality.geck.migrator.ThriftSpec;
|
||||||
|
|
||||||
public class JoltSpec {
|
public class JoltSpec {
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit.nop;
|
package dev.vality.geck.migrator.kit.nop;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.MigrationException;
|
import dev.vality.geck.migrator.MigrationException;
|
||||||
import com.rbkmoney.geck.migrator.MigrationPoint;
|
import dev.vality.geck.migrator.MigrationPoint;
|
||||||
import com.rbkmoney.geck.migrator.MigrationType;
|
import dev.vality.geck.migrator.MigrationType;
|
||||||
import com.rbkmoney.geck.migrator.SerializerSpec;
|
import dev.vality.geck.migrator.SerializerSpec;
|
||||||
import com.rbkmoney.geck.migrator.kit.AbstractMigrator;
|
import dev.vality.geck.migrator.kit.AbstractMigrator;
|
||||||
|
|
||||||
public class NopMigrator extends AbstractMigrator {
|
public class NopMigrator extends AbstractMigrator {
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit.object;
|
package dev.vality.geck.migrator.kit.object;
|
||||||
|
|
||||||
import com.rbkmoney.geck.common.reflection.ClassFinder;
|
import dev.vality.geck.common.reflection.ClassFinder;
|
||||||
import com.rbkmoney.geck.migrator.MigrationException;
|
import dev.vality.geck.migrator.MigrationException;
|
||||||
import com.rbkmoney.geck.migrator.MigrationPoint;
|
import dev.vality.geck.migrator.MigrationPoint;
|
||||||
import com.rbkmoney.geck.migrator.MigrationType;
|
import dev.vality.geck.migrator.MigrationType;
|
||||||
import com.rbkmoney.geck.migrator.kit.BaseMigrationSpec;
|
import dev.vality.geck.migrator.kit.BaseMigrationSpec;
|
||||||
import com.rbkmoney.geck.migrator.kit.SimpleMigrationPointProvider;
|
import dev.vality.geck.migrator.kit.SimpleMigrationPointProvider;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ public class ObjectMigrationPointProvider extends SimpleMigrationPointProvider {
|
|||||||
|
|
||||||
private static final String CLASS_NAME_SUFFIX = "Spec";
|
private static final String CLASS_NAME_SUFFIX = "Spec";
|
||||||
|
|
||||||
private static final String DEFAULT_SPEC_PACKAGE = "com.rbkmoney.geck.migrator.spec.object";
|
private static final String DEFAULT_SPEC_PACKAGE = "dev.vality.geck.migrator.spec.object";
|
||||||
|
|
||||||
public static ObjectMigrationPointProvider newInstance() throws MigrationException {
|
public static ObjectMigrationPointProvider newInstance() throws MigrationException {
|
||||||
return newInstance(Arrays.asList(DEFAULT_SPEC_PACKAGE));
|
return newInstance(Arrays.asList(DEFAULT_SPEC_PACKAGE));
|
@ -1,8 +1,8 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit.object;
|
package dev.vality.geck.migrator.kit.object;
|
||||||
|
|
||||||
import com.rbkmoney.geck.common.util.TypeUtil;
|
import dev.vality.geck.common.util.TypeUtil;
|
||||||
import com.rbkmoney.geck.migrator.*;
|
import dev.vality.geck.migrator.*;
|
||||||
import com.rbkmoney.geck.migrator.kit.AbstractMigrator;
|
import dev.vality.geck.migrator.kit.AbstractMigrator;
|
||||||
|
|
||||||
public class ObjectMigrator extends AbstractMigrator {
|
public class ObjectMigrator extends AbstractMigrator {
|
||||||
public static final SerializerDef<Object> SERIALIZER_DEF = new SerializerDef<>(MigrationType.JOBJECT.getKey());
|
public static final SerializerDef<Object> SERIALIZER_DEF = new SerializerDef<>(MigrationType.JOBJECT.getKey());
|
@ -0,0 +1,9 @@
|
|||||||
|
package dev.vality.geck.migrator.kit.object;
|
||||||
|
|
||||||
|
import dev.vality.geck.migrator.MigrationException;
|
||||||
|
import dev.vality.geck.migrator.ThriftSpec;
|
||||||
|
|
||||||
|
public interface ObjectSpec {
|
||||||
|
Object apply(Object in) throws MigrationException;
|
||||||
|
ThriftSpec getThriftSpec();
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit;
|
package dev.vality.geck.migrator.kit;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.*;
|
import dev.vality.geck.migrator.*;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit.jolt;
|
package dev.vality.geck.migrator.kit.jolt;
|
||||||
|
|
||||||
import com.bazaarvoice.jolt.JsonUtils;
|
import com.bazaarvoice.jolt.JsonUtils;
|
||||||
import com.rbkmoney.geck.migrator.MigrationException;
|
import dev.vality.geck.migrator.MigrationException;
|
||||||
import com.rbkmoney.geck.migrator.MigrationManager;
|
import dev.vality.geck.migrator.MigrationManager;
|
||||||
import com.rbkmoney.geck.migrator.MigrationManagerBuilder;
|
import dev.vality.geck.migrator.MigrationManagerBuilder;
|
||||||
import com.rbkmoney.geck.migrator.ThriftDef;
|
import dev.vality.geck.migrator.ThriftDef;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
@ -1,8 +1,8 @@
|
|||||||
package com.rbkmoney.geck.migrator.kit.object;
|
package dev.vality.geck.migrator.kit.object;
|
||||||
|
|
||||||
import com.rbkmoney.geck.migrator.MigrationException;
|
import dev.vality.geck.migrator.MigrationException;
|
||||||
import com.rbkmoney.geck.migrator.ThriftDef;
|
import dev.vality.geck.migrator.ThriftDef;
|
||||||
import com.rbkmoney.geck.migrator.ThriftSpec;
|
import dev.vality.geck.migrator.ThriftSpec;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user