Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
update version to 1.4.11
Browse files Browse the repository at this point in the history
  • Loading branch information
川石 committed Mar 7, 2019
1 parent 98d3f2f commit f138ec2
Show file tree
Hide file tree
Showing 46 changed files with 87 additions and 65 deletions.
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
# Tauris - 日志处理、清洗与转发工具
# Tauris

## 背景
日志处理、清洗与传输工具,你可以使用tauris作为

* 日志传输工具
* 消息适配器
* 阿里云日志服务和消息服务的客户端
* 分析日志输出监控指标数据的转换器


## Tauris能做什么?
* 它可以作为日志传输工具
* 它可以作为消息适配器
* 它可以作为阿里云日志服务和消息服务的客户端
* 它可以分析日志得到监控数据



Tauris在设计思想和配置方式方面借鉴了[logstash](https://www.elastic.co/cn/products/logstash)

# 目录
## 目录
1. [Introduction](docs/introduction.md)
2. [Installation](docs/installation.md)
3. [Tutorial](docs/tutorial.md)
Expand All @@ -23,3 +19,12 @@ Tauris在设计思想和配置方式方面借鉴了[logstash](https://www.elasti
6. [Plugin References](docs/plugins/index.md)
7. [Use Cases](docs/usecases.md)



## License

[Licensed under the Apache License, Version 2.0](LICENSE).

## 特别说明

Tauris在设计思想和配置方式方面借鉴了[logstash](https://www.elastic.co/cn/products/logstash)
4 changes: 2 additions & 2 deletions config/tauris.log4j.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<!--
Author: chuanshi.zl@alibaba-inc.com
Author: rockis@gmail.com
-->
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

Expand Down Expand Up @@ -61,4 +61,4 @@
<appender-ref ref="default-appender"/>
</root>

</log4j:configuration>
</log4j:configuration>
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.aliyun.tauris</groupId>
<artifactId>tauris-parent</artifactId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Tauris</name>

Expand All @@ -31,6 +31,7 @@
<module>tauris-plugins-filter</module>
<module>tauris-plugins-bundle</module>
<module>tauris-plugins-resource</module>
<module>tauris-example</module>
</modules>
</profile>

Expand Down Expand Up @@ -309,9 +310,9 @@
</dependency>

<dependency>
<groupId>net.sf.opencsv</groupId>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>2.3</version>
<version>4.5</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion tauris-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-parent</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-boot</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions tauris-codecs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-parent</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-codecs</artifactId>
Expand All @@ -30,7 +30,7 @@
</dependency>

<dependency>
<groupId>net.sf.opencsv</groupId>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package com.aliyun.tauris.plugins.codec;

import au.com.bytecode.opencsv.CSVParser;
import com.aliyun.tauris.DecodeException;
import com.aliyun.tauris.TEvent;
import com.aliyun.tauris.annotations.Name;
import com.aliyun.tauris.annotations.Required;
import com.opencsv.CSVParser;
import com.opencsv.CSVParserBuilder;

import javax.annotation.Nullable;
import java.io.IOException;
Expand All @@ -30,10 +31,9 @@ public class CSVDecoder extends AbstractDecoder {

boolean strict = false;

private CSVParser parser;
private ThreadLocal<CSVParser> threadLocal = new ThreadLocal<>();

public void init() {
parser = new CSVParser(separator, quotechar, escape);
}

@Override
Expand All @@ -58,9 +58,18 @@ public TEvent decode(String source) throws DecodeException {
return event;
}

private CSVParser getParser() {
CSVParser parser = threadLocal.get();
if (parser == null) {
parser = new CSVParserBuilder().withSeparator(separator).withQuoteChar(quotechar).withEscapeChar(escape).build();
threadLocal.set(parser);
}
return parser;
}

private void decode(String source, BiConsumer<String, String> put) throws DecodeException {
try {
String[] cols = parser.parseLine(source);
String[] cols = getParser().parseLine(source);
if (strict && cols.length != fields.length) {
throw new DecodeException("column's length not match");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.aliyun.tauris.plugins.codec;

import au.com.bytecode.opencsv.CSVWriter;
import com.aliyun.tauris.EncodeException;
import com.aliyun.tauris.TEncoder;
import com.aliyun.tauris.TEvent;
import com.aliyun.tauris.TPrinter;
import com.aliyun.tauris.annotations.Name;
import com.aliyun.tauris.annotations.Required;
import com.opencsv.CSVWriter;

import javax.annotation.concurrent.NotThreadSafe;
import java.io.*;
Expand Down Expand Up @@ -51,7 +51,7 @@ public CSVPrinter(String[] fields, char separator, char quotechar, char escape,
@Override
public TPrinter wrap(OutputStream out) {
CSVPrinter printer = new CSVPrinter(fields, separator, quotechar, escape, delimiter);
printer.writer = new CSVWriter(new OutputStreamWriter(out), separator, quotechar, escape);
printer.writer = new CSVWriter(new OutputStreamWriter(out), separator, quotechar, escape, delimiter);
printer.buffer = new String[fields.length];
return printer;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* Class KVCodecTest
*
* @author chuanshi.zl<[email protected]>
* @author zhanglei
* @date 2018-09-05
*/
public class CSVCodecTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Class KVCodecTest
*
* @author chuanshi.zl<[email protected]>
* @author zhanglei
* @date 2018-09-05
*/
public class KLVCodecTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* Class KVCodecTest
*
* @author chuanshi.zl<[email protected]>
* @author zhanglei
* @date 2018-09-05
*/
public class KVSCodecTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Class KVCodecTest
*
* @author chuanshi.zl<[email protected]>
* @author zhanglei
* @date 2018-09-05
*/
public class MsgPackCodecTest {
Expand Down
2 changes: 1 addition & 1 deletion tauris-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-parent</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-config</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tauris-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-parent</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public TEvent filter(TEvent event) {
}
return event;
} catch (Exception e) {
logger.ERROR("filter %s raise an uncatched exception", e, lastFilter.id());
logger.EXCEPTION(String.format("filter %s raise an uncatched exception", lastFilter.id()), e);
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Class TPluginGroup
*
* @author chuanshi.zl<[email protected]>
* @author Zhangei
* @date 2018-09-25
*/
public class TPluginGroup implements TPlugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ public void EXCEPTION(Throwable e) {
this.error(msg, e);
}

public void EXCEPTION(String msg, Throwable e) {
if (this.pluginId != null) {
this.error("[" + pluginId + "]" + msg);
}
this.error(msg, e);
}

public void WARN2(String message, String detail) {
if (verbose && detail != null) {
message = message + ", verbose: '" + detail + "'";
Expand Down
2 changes: 1 addition & 1 deletion tauris-plugins-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-parent</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-plugins-base</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tauris-plugins-bundle/http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-plugins-bundle</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-plugins-bundle-http</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tauris-plugins-bundle/influxdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-plugins-bundle</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-plugins-bundle-influxdb</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* Class InfluxdbDecoderTest
*
* @author chuanshi.zl<[email protected]>
* @author zhanglei
* @date 2018-09-04
*/
public class InfluxdbDecoderTest {
Expand Down
2 changes: 1 addition & 1 deletion tauris-plugins-bundle/mns/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-plugins-bundle</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-plugins-bundle-mns</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tauris-plugins-bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-parent</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<artifactId>tauris-plugins-bundle</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion tauris-plugins-bundle/scroll/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-plugins-bundle</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-plugins-bundle-scroll</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tauris-plugins-bundle/sls/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-plugins-bundle</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-plugins-bundle-sls</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tauris-plugins-bundle/syslog/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-plugins-bundle</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-plugins-bundle-syslog</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tauris-plugins-bundle/tcp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-plugins-bundle</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-plugins-bundle-tcp</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tauris-plugins-bundle/udp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-plugins-bundle</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-plugins-bundle-udp</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tauris-plugins-filter/codec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-plugins-filter</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-plugins-filter-codec</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tauris-plugins-filter/iploc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>tauris-plugins-filter</artifactId>
<groupId>com.aliyun.tauris</groupId>
<version>1.4.10-SNAPSHOT</version>
<version>1.4.11-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>tauris-plugins-filter-iploc</artifactId>
Expand Down
Loading

0 comments on commit f138ec2

Please sign in to comment.