Skip to content

Commit

Permalink
Merge branch 'release/v1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
oalam committed Apr 8, 2020
2 parents 99e4172 + 45bfe5f commit 4478742
Show file tree
Hide file tree
Showing 642 changed files with 73,552 additions and 52,733 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ exclude_paths:
- logs/
- **/node_modules/*
- **/app/jspm_packages/*
- **/log/
- **/log/
2 changes: 1 addition & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
service_name: travis-pro
repo_token: UIMPDs7tbGDKReS0FYdvK4Sxju4F8rpfe
repo_token: UIMPDs7tbGDKReS0FYdvK4Sxju4F8rpfe
15 changes: 10 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
sudo: required
dist: trusty

dist: trusty
#services:
# - docker

Expand All @@ -16,10 +15,15 @@ cache:

language: java

#before_install:
# # Update Docker.
# - sudo apt-get update
# - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
before_install:
# - sudo mkdir -p /usr/local/share/java/opencv4/
# - wget https://github.com/Hurence/logisland/releases/download/v1.2.0/libopencv_java411.so
# - wget https://github.com/Hurence/logisland/releases/download/v1.2.0/opencv-411.jar
# - sudo mv libopencv_java411.so /usr/local/share/java/opencv4/
# - sudo mv opencv-411.jar /usr/local/share/java/opencv4/
# - sudo chmod 755 /usr/local/share/java/opencv4/*
# - mvn install:install-file -Dfile=/usr/local/share/java/opencv4/opencv-411.jar -DgroupId=opencv -DartifactId=opencv -Dversion=4.1.1 -Dpackaging=jar

#
# # Upgrade/install docker-compose.
# - sudo rm -f /usr/local/bin/docker-compose
Expand All @@ -28,6 +32,7 @@ language: java
# - sudo mv docker-compose /usr/local/bin
# # Print out the current docker-compose version.
# - docker-compose --version
- rm -rf sudo /home/travis/.m2/repository/org/apache/lucene/lucene-highlighter/6.6.2/*

script:
# Build
Expand Down
19 changes: 12 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,15 @@ to build from the source just clone source and package with maven (logisland req
cd logisland
mvn clean package
the final package is available at `logisland-assembly/target/logisland-1.2.0-bin.tar.gz`
the final package is available at `logisland-assembly/target/logisland-1.3.0-bin.tar.gz`

You can also download the `latest release build <https://github.com/Hurence/logisland/releases>`_


If you want to build with opencv support, please install OpenCV first and then

mvn clean package -Dopencv

Quick start
-----------

Expand Down Expand Up @@ -88,9 +93,9 @@ But you should choose the Spark version that is compatible with your environment
curl -s http://d3kbcqa49mib13.cloudfront.net/spark-<spark-version>-bin-hadoop<hadoop-version>.tgz | tar -xz -C /usr/local/
export SPARK_HOME=/usr/local/spark-<spark-version>-bin-hadoop<hadoop-version>
# install Logisland 1.2.0
# install Logisland 1.3.0
curl -s https://github.com/Hurence/logisland/releases/download/v1.0.0-RC2/logisland-1.0.0-RC2-bin.tar.gz | tar -xz -C /usr/local/
cd /usr/local/logisland-1.2.0
cd /usr/local/logisland-1.3.0
# launch a logisland job
bin/logisland.sh --conf conf/index-apache-logs.yml
Expand Down Expand Up @@ -119,9 +124,9 @@ Launching logisland streaming apps is just easy as unarchiving logisland distrib

.. code-block:: sh
# install Logisland 1.2.0
curl -s https://github.com/Hurence/logisland/releases/download/v0.10.0/logisland-1.2.0-bin-hdp2.5.tar.gz | tar -xz -C /usr/local/
cd /usr/local/logisland-1.2.0
# install Logisland 1.3.0
curl -s https://github.com/Hurence/logisland/releases/download/v0.10.0/logisland-1.3.0-bin-hdp2.5.tar.gz | tar -xz -C /usr/local/
cd /usr/local/logisland-1.3.0
bin/logisland.sh --conf conf/index-apache-logs.yml
Expand All @@ -142,7 +147,7 @@ The first part is the `ProcessingEngine` configuration (here a Spark streaming e

.. code-block:: yaml
version: 1.2.0
version: 1.3.0
documentation: LogIsland job config file
engine:
component: com.hurence.logisland.engine.spark.KafkaStreamProcessingEngine
Expand Down
8 changes: 4 additions & 4 deletions logisland-documentation/release.rst → RELEASING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Releasing guide
This guide will help you to perform the full release process for Logisland framework.


git hf release start v1.2.0
git hf release start v1.3.0

# update the version (you should run a dry run first)
# you should double escapte dots so it is correctly parsed, otherwise it will be considered as the any character
./update-version.sh -o 0\\.14\\.0 -n 1.2.0 -d
./update-version.sh -o 0\\.14\\.0 -n 1.2.0
./update-version.sh -o 0\\.14\\.0 -n 1.3.0 -d
./update-version.sh -o 0\\.14\\.0 -n 1.3.0

Build the code and run the tests
--------------------------------
Expand Down Expand Up @@ -46,7 +46,7 @@ Publish release assets to github

please refer to `https://developer.github.com/v3/repos/releases <https://developer.github.com/v3/repos/releases>`_

curl -XPOST https://uploads.github.com/repos/Hurence/logisland/releases/v1.2.0/assets?name=logisland-1.1.2-bin-hdp2.5.tar.gz -v --data-binary @logisland-assembly/target/logisland-0.10.3-bin-hdp2.5.tar.gz --user oalam -H 'Content-Type: application/gzip'
curl -XPOST https://uploads.github.com/repos/Hurence/logisland/releases/v1.3.0/assets?name=logisland-1.1.2-bin-hdp2.5.tar.gz -v --data-binary @logisland-assembly/target/logisland-0.10.3-bin-hdp2.5.tar.gz --user oalam -H 'Content-Type: application/gzip'



Expand Down
3 changes: 1 addition & 2 deletions launch-tuto.sh
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
2 changes: 1 addition & 1 deletion logisland-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.hurence.logisland</groupId>
<artifactId>logisland</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
</parent>
<artifactId>logisland-assembly</artifactId>
<packaging>pom</packaging>
Expand Down
6 changes: 5 additions & 1 deletion logisland-assembly/src/assembly/full-assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<include>com.hurence.logisland:logisland-service-cassandra-client</include>
<include>com.hurence.logisland:logisland-service-influxdb-client</include>
<include>com.hurence.logisland:logisland-service-redis</include>
<include>com.hurence.logisland:logisland-service-rest</include>
<!-- PROCESSORS -->
<include>com.hurence.logisland:logisland-processor-common</include>
<include>com.hurence.logisland:logisland-processor-xml</include>
Expand All @@ -58,14 +59,17 @@
<include>com.hurence.logisland:logisland-processor-useragent</include>
<include>com.hurence.logisland:logisland-processor-querymatcher</include>
<include>com.hurence.logisland:logisland-processor-outlier-detection</include>
<include>com.hurence.logisland:logisland-processor-timeseries</include>
<include>com.hurence.logisland:logisland-processor-computer-vision</include>
<include>com.hurence.logisland:logisland-processor-enrichment</include>
<include>com.hurence.logisland:logisland-processor-hbase</include>
<include>com.hurence.logisland:logisland-processor-elasticsearch</include>
<include>com.hurence.logisland:logisland-processor-excel</include>
<include>com.hurence.logisland:logisland-processor-scripting</include>
<include>com.hurence.logisland:logisland-processor-rest</include>
<!-- CONNECTORS -->
<include>com.hurence.logisland:logisland-connector-opc</include>

<include>com.hurence.logisland:logisland-connector-spooldir</include>
</includes>
<binaries>
<directoryMode>0770</directoryMode>
Expand Down
1 change: 1 addition & 0 deletions logisland-assembly/src/assembly/shared-dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<include>com.hurence.logisland:logisland-plugin-support</include>
<include>com.hurence.logisland:logisland-scripting-base</include>
<include>com.hurence.logisland:logisland-scripting-mvel</include>
<include>com.hurence.logisland:logisland-timeseries</include>
</includes>
<binaries>
<directoryMode>0770</directoryMode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.hurence.logisland</groupId>
<artifactId>logisland-connectors</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
</parent>
<packaging>jar</packaging>

Expand Down
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>
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;
}


}
Loading

0 comments on commit 4478742

Please sign in to comment.