-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#384 Refactor Extractor. Fix some Codacy issues
- Loading branch information
1 parent
f1bf5ec
commit 3754b7c
Showing
71 changed files
with
1,111 additions
and
1,304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/java/com/sngular/kloadgen/parsedschema/AbstractParsedSchema.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.sngular.kloadgen.parsedschema; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public abstract class AbstractParsedSchema<T> { | ||
|
||
private final T schema; | ||
private final String schemaType; | ||
private final String name; | ||
|
||
public AbstractParsedSchema(final String name, final String type, final T schema) { | ||
this.name = name; | ||
this.schemaType = type; | ||
this.schema = schema; | ||
} | ||
|
||
public final T schema() { | ||
return this.schema; | ||
} | ||
|
||
public final String schemaType() { | ||
return this.schemaType; | ||
} | ||
|
||
public abstract T getRawSchema(); | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/sngular/kloadgen/parsedschema/AvroParsedSchema.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.sngular.kloadgen.parsedschema; | ||
|
||
import org.apache.avro.Schema; | ||
|
||
public class AvroParsedSchema extends AbstractParsedSchema<Schema> { | ||
|
||
public AvroParsedSchema(final String name, final Schema schema) { | ||
super(name, "AVRO", schema); | ||
} | ||
|
||
@Override | ||
public final Schema getRawSchema() { | ||
return getSchema(); | ||
} | ||
} |
13 changes: 0 additions & 13 deletions
13
src/main/java/com/sngular/kloadgen/parsedschema/IParsedSchema.java
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
src/main/java/com/sngular/kloadgen/parsedschema/JsonParsedSchema.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.sngular.kloadgen.parsedschema; | ||
|
||
public class JsonParsedSchema extends AbstractParsedSchema<String> { | ||
|
||
public JsonParsedSchema(final String name, final String schema) { | ||
super(name, "JSON", schema); | ||
} | ||
|
||
@Override | ||
public final String getRawSchema() { | ||
return getSchema(); | ||
} | ||
} |
Oops, something went wrong.