-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
642 changed files
with
73,552 additions
and
52,733 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,4 +41,4 @@ exclude_paths: | |
- logs/ | ||
- **/node_modules/* | ||
- **/app/jspm_packages/* | ||
- **/log/ | ||
- **/log/ |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
service_name: travis-pro | ||
repo_token: UIMPDs7tbGDKReS0FYdvK4Sxju4F8rpfe | ||
repo_token: UIMPDs7tbGDKReS0FYdvK4Sxju4F8rpfe |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/bin/bash | ||
|
||
logisland-assembly/target/logisland-1.1.2-bin/logisland-1.1.2/bin/logisland.sh \ | ||
--conf logisland-core/logisland-framework/logisland-resources/src/main/resources/conf/$1 | ||
logisland-assembly/target/logisland-1.3.0-full-bin/logisland-1.3.0/bin/logisland.sh --conf $1 |
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
126 changes: 126 additions & 0 deletions
126
logisland-components/logisland-connectors/logisland-connector-spooldir/pom.xml
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,126 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.hurence.logisland</groupId> | ||
<artifactId>logisland-connectors</artifactId> | ||
<version>1.3.0</version> | ||
</parent> | ||
<packaging>jar</packaging> | ||
|
||
<artifactId>logisland-connector-spooldir</artifactId> | ||
<name>Spool dir Connector Plugin</name> | ||
<description> | ||
This Kafka Connect connector provides the capability to watch a directory for files and | ||
read the data as new files are written to the input directory. | ||
Each of the records in the input file will be converted based on the user supplied schema. | ||
</description> | ||
|
||
<repositories> | ||
<repository> | ||
<id>jitpack.io</id> | ||
<url>https://jitpack.io</url> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
</repository> | ||
</repositories> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.kafka</groupId> | ||
<artifactId>kafka-clients</artifactId> | ||
<version>0.10.2.1</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.kafka</groupId> | ||
<artifactId>connect-api</artifactId> | ||
<optional>true</optional> | ||
<version>0.10.2.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>net.sourceforge.argparse4j</groupId> | ||
<artifactId>argparse4j</artifactId> | ||
<version>0.7.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.opencsv</groupId> | ||
<artifactId>opencsv</artifactId> | ||
<version>3.8</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
<version>2.10.1</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>2.10.1</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.github.jcustenborder.kafka.connect</groupId> | ||
<artifactId>connect-utils</artifactId> | ||
<version>0.2.86</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
<version>28.0-jre</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
<version>28.0-jre</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
|
||
|
||
|
||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>2.25.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.google.code.gson</groupId> | ||
<artifactId>gson</artifactId> | ||
<scope>test</scope> | ||
<version>2.8.5</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.hurence.logisland</groupId> | ||
<artifactId>logisland-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
72 changes: 72 additions & 0 deletions
72
...tor-spooldir/src/main/java/com/hurence/logisland/connect/spooldir/CsvSchemaGenerator.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,72 @@ | ||
/** | ||
* Copyright © 2016 Jeremy Custenborder ([email protected]) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.hurence.logisland.connect.spooldir; | ||
|
||
import com.opencsv.CSVParser; | ||
import com.opencsv.CSVReader; | ||
import org.apache.kafka.connect.data.Schema; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.io.InputStreamReader; | ||
import java.util.LinkedHashMap; | ||
import java.util.Map; | ||
|
||
public class CsvSchemaGenerator extends SchemaGenerator<SpoolDirCsvSourceConnectorConfig> { | ||
private static final Logger log = LoggerFactory.getLogger(CsvSchemaGenerator.class); | ||
|
||
public CsvSchemaGenerator(Map<String, ?> settings) { | ||
super(settings); | ||
} | ||
|
||
@Override | ||
protected SpoolDirCsvSourceConnectorConfig config(Map<String, ?> settings) { | ||
return new SpoolDirCsvSourceConnectorConfig(false, settings); | ||
} | ||
|
||
@Override | ||
protected Map<String, Schema.Type> determineFieldTypes(InputStream inputStream) throws IOException { | ||
Map<String, Schema.Type> typeMap = new LinkedHashMap<>(); | ||
CSVParser parserBuilder = this.config.createCSVParserBuilder().build(); | ||
try (InputStreamReader reader = new InputStreamReader(inputStream)) { | ||
try (CSVReader csvReader = new CSVReader(reader, 0, parserBuilder)) { | ||
String[] headers = null; | ||
|
||
if (this.config.firstRowAsHeader) { | ||
headers = csvReader.readNext(); | ||
} | ||
|
||
String[] row = csvReader.readNext(); | ||
|
||
if (null == headers) { | ||
headers = new String[row.length]; | ||
for (int i = 1; i <= row.length; i++) { | ||
headers[(i - 1)] = String.format("column%02d", i); | ||
} | ||
} | ||
|
||
for (String s : headers) { | ||
typeMap.put(s, Schema.Type.STRING); | ||
} | ||
} | ||
} | ||
return typeMap; | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.