flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szabofe...@apache.org
Subject [3/3] flume git commit: FLUME-3280 Improve maven build to help code reviews by adding static …
Date Thu, 08 Nov 2018 17:13:03 GMT
FLUME-3280 Improve maven build to help code reviews by adding static …

…code analyzer

Adding spotbugs, pmd to the build.
moving flume-checkstyle to a new build-support module that contains
any future build tool configuration.

Fixed some trivial checkstyle issues.

Updated apache parent version and maven plugin versions.
Added maxAllowedViolations so this commit could contain only the new checks
and not any code change.

Did some cleanup in the pom files.

This closes #232

Reviewers: Peter Turcsanyi, Endre Major

(Ferenc Szabo via Ferenc Szabo)


Project: http://git-wip-us.apache.org/repos/asf/flume/repo
Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/fb16ffc0
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/fb16ffc0
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/fb16ffc0

Branch: refs/heads/trunk
Commit: fb16ffc076de9917be7585e5583344bf3fd1c62a
Parents: 493b53b
Author: Ferenc Szabo <szaboferee@apache.org>
Authored: Thu Nov 8 18:11:27 2018 +0100
Committer: Ferenc Szabo <szaboferee@apache.org>
Committed: Thu Nov 8 18:11:27 2018 +0100

----------------------------------------------------------------------
 .gitignore                                      |   1 +
 .mvn/wrapper/MavenWrapperDownloader.java        | 110 ++++++
 .mvn/wrapper/maven-wrapper.properties           |   1 +
 .travis.yml                                     |   2 +-
 build-support/pom.xml                           |  31 ++
 .../checkstyle/checkstyle-suppressions.xml      |  74 ++++
 .../resources/config/checkstyle/checkstyle.xml  | 200 +++++++++++
 flume-checkstyle/pom.xml                        |  41 ---
 .../resources/flume/checkstyle-suppressions.xml |  74 ----
 .../src/main/resources/flume/checkstyle.xml     | 196 -----------
 flume-ng-auth/pom.xml                           |  36 +-
 flume-ng-channels/flume-file-channel/pom.xml    |  13 +-
 .../java/org/apache/flume/channel/file/Log.java |   2 +-
 .../apache/flume/channel/file/LogFileV2.java    |   2 +-
 .../FileChannelCounterMBean.java                |   4 +-
 flume-ng-channels/flume-jdbc-channel/pom.xml    |  20 +-
 flume-ng-channels/flume-kafka-channel/pom.xml   |   6 +
 .../flume-spillable-memory-channel/pom.xml      |  13 +-
 flume-ng-channels/pom.xml                       |  10 -
 flume-ng-clients/flume-ng-log4jappender/pom.xml |  11 +-
 .../log4jappender/TestLog4jAppender.java        |   1 -
 .../pom.xml                                     |   2 -
 .../pom.xml                                     |   1 -
 .../TestExternalProcessConfigFilter.java        |   1 -
 .../pom.xml                                     |   1 -
 flume-ng-configuration/pom.xml                  |  13 +-
 .../channel/ChannelSelectorConfiguration.java   |   1 -
 flume-ng-core/pom.xml                           |  11 +-
 .../java/org/apache/flume/SinkProcessor.java    |   1 -
 .../apache/flume/channel/AbstractChannel.java   |   2 -
 .../channel/ReplicatingChannelSelector.java     |   1 -
 .../avro/ReliableSpoolingFileEventReader.java   |   1 -
 .../flume/formatter/output/BucketPath.java      |   4 +-
 .../kafka/KafkaChannelCounter.java              |   1 -
 .../serialization/AvroEventDeserializer.java    |   2 -
 .../serialization/DurablePositionTracker.java   |   2 +-
 .../flume/serialization/EventSerializer.java    |   2 +-
 .../FlumeEventAvroEventSerializer.java          |   2 -
 .../org/apache/flume/sink/AbstractRpcSink.java  |   3 -
 .../java/org/apache/flume/sink/AvroSink.java    |  13 -
 .../java/org/apache/flume/sink/SinkGroup.java   |   1 -
 .../org/apache/flume/source/SyslogParser.java   |   1 -
 .../org/apache/flume/source/SyslogUtils.java    |   6 +-
 .../flume/source/shaded/guava/RateLimiter.java  |   1 -
 .../java/org/apache/flume/TestCounterGroup.java |   1 -
 .../client/avro/TestBufferedLineReader.java     |   3 +-
 .../TestDurablePositionTracker.java             |   1 -
 .../TestResettableFileInputStream.java          |   2 +-
 .../org/apache/flume/sink/TestThriftSink.java   |   1 -
 .../flume/source/TestPollableSourceRunner.java  |   1 -
 .../apache/flume/source/TestStressSource.java   |   1 -
 .../flume/source/TestSyslogUdpSource.java       |   2 -
 .../apache/flume/source/TestThriftSource.java   |   3 -
 .../flume/tools/TestFlumeConfigurator.java      |   2 -
 flume-ng-dist/pom.xml                           |   6 -
 flume-ng-dist/src/main/assembly/src.xml         |   1 +
 flume-ng-doc/site.xml                           |   2 +-
 flume-ng-doc/sphinx/FlumeUserGuide.rst          |  38 +--
 flume-ng-embedded-agent/pom.xml                 |   5 +
 .../flume-avro-source/pom.xml                   |   6 +-
 .../flume-thrift-source/pom.xml                 |   6 +
 .../source/thriftLegacy/ThriftLegacySource.java |   1 -
 flume-ng-legacy-sources/pom.xml                 |  10 -
 flume-ng-node/pom.xml                           |  28 +-
 flume-ng-sdk/pom.xml                            |   6 +
 .../org/apache/flume/api/FailoverRpcClient.java |   1 -
 .../java/org/apache/flume/api/RpcClient.java    |   4 +-
 .../org/apache/flume/api/RpcClientFactory.java  |   4 +-
 flume-ng-sinks/flume-dataset-sink/pom.xml       |  19 +-
 flume-ng-sinks/flume-hdfs-sink/pom.xml          |  13 +-
 flume-ng-sinks/flume-hive-sink/pom.xml          |  15 +-
 flume-ng-sinks/flume-http-sink/pom.xml          |  13 +-
 .../apache/flume/sink/http/TestHttpSink.java    |   2 -
 flume-ng-sinks/flume-irc-sink/pom.xml           |  12 +-
 .../flume-ng-elasticsearch-sink/pom.xml         |  13 +-
 .../sink/elasticsearch/ContentBuilderUtil.java  |   1 -
 flume-ng-sinks/flume-ng-hbase-sink/pom.xml      |  14 +-
 .../flume/sink/hbase/TestAsyncHBaseSink.java    |   2 +-
 .../apache/flume/sink/hbase/TestHBaseSink.java  |   2 +-
 flume-ng-sinks/flume-ng-hbase2-sink/pom.xml     |  13 +-
 .../flume/sink/hbase2/TestHBase2Sink.java       |   2 +-
 flume-ng-sinks/flume-ng-kafka-sink/pom.xml      |  10 +-
 .../apache/flume/sink/kafka/util/TestUtil.java  |   2 -
 .../flume-ng-morphline-solr-sink/pom.xml        |  22 +-
 .../resources/solr/collection1/conf/schema.xml  |  54 +--
 flume-ng-sinks/pom.xml                          |   9 -
 flume-ng-sources/flume-jms-source/pom.xml       |   6 +
 flume-ng-sources/flume-kafka-source/pom.xml     |  13 +-
 flume-ng-sources/flume-scribe-source/pom.xml    |   6 +
 flume-ng-sources/flume-taildir-source/pom.xml   |   6 +
 .../source/taildir/TestTaildirEventReader.java  |   3 +-
 flume-ng-sources/flume-twitter-source/pom.xml   |   6 +
 .../flume/source/twitter/TwitterSource.java     |   1 -
 .../flume/source/twitter/TestTwitterSource.java |   1 -
 flume-ng-sources/pom.xml                        |   9 -
 flume-ng-tests/pom.xml                          |   1 -
 .../flume/test/agent/TestSpooldirSource.java    |   3 -
 flume-shared/flume-shared-kafka-test/pom.xml    |  10 +-
 flume-shared/pom.xml                            |   8 -
 flume-tools/pom.xml                             |   3 +
 mvnw                                            | 286 ++++++++++++++++
 mvnw.cmd                                        | 161 +++++++++
 pom.xml                                         | 338 +++++++++++--------
 103 files changed, 1293 insertions(+), 842 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index b387391..0f26790 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@ derby.log
 *.iml
 nb-configuration.xml
 .DS_Store
+/.mvn/wrapper/maven-wrapper.jar

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/.mvn/wrapper/MavenWrapperDownloader.java
----------------------------------------------------------------------
diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java
new file mode 100755
index 0000000..fa4f7b4
--- /dev/null
+++ b/.mvn/wrapper/MavenWrapperDownloader.java
@@ -0,0 +1,110 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+*/
+
+import java.net.*;
+import java.io.*;
+import java.nio.channels.*;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+    /**
+     * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+     */
+    private static final String DEFAULT_DOWNLOAD_URL =
+            "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar";
+
+    /**
+     * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+     * use instead of the default one.
+     */
+    private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+            ".mvn/wrapper/maven-wrapper.properties";
+
+    /**
+     * Path where the maven-wrapper.jar will be saved to.
+     */
+    private static final String MAVEN_WRAPPER_JAR_PATH =
+            ".mvn/wrapper/maven-wrapper.jar";
+
+    /**
+     * Name of the property which should be used to override the default download url for the wrapper.
+     */
+    private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+    public static void main(String args[]) {
+        System.out.println("- Downloader started");
+        File baseDirectory = new File(args[0]);
+        System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+        // If the maven-wrapper.properties exists, read it and check if it contains a custom
+        // wrapperUrl parameter.
+        File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+        String url = DEFAULT_DOWNLOAD_URL;
+        if(mavenWrapperPropertyFile.exists()) {
+            FileInputStream mavenWrapperPropertyFileInputStream = null;
+            try {
+                mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+                Properties mavenWrapperProperties = new Properties();
+                mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+                url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+            } catch (IOException e) {
+                System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+            } finally {
+                try {
+                    if(mavenWrapperPropertyFileInputStream != null) {
+                        mavenWrapperPropertyFileInputStream.close();
+                    }
+                } catch (IOException e) {
+                    // Ignore ...
+                }
+            }
+        }
+        System.out.println("- Downloading from: : " + url);
+
+        File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+        if(!outputFile.getParentFile().exists()) {
+            if(!outputFile.getParentFile().mkdirs()) {
+                System.out.println(
+                        "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+            }
+        }
+        System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+        try {
+            downloadFileFromURL(url, outputFile);
+            System.out.println("Done");
+            System.exit(0);
+        } catch (Throwable e) {
+            System.out.println("- Error downloading");
+            e.printStackTrace();
+            System.exit(1);
+        }
+    }
+
+    private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+        URL website = new URL(urlString);
+        ReadableByteChannel rbc;
+        rbc = Channels.newChannel(website.openStream());
+        FileOutputStream fos = new FileOutputStream(destination);
+        fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+        fos.close();
+        rbc.close();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/.mvn/wrapper/maven-wrapper.properties
----------------------------------------------------------------------
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
new file mode 100755
index 0000000..00d32aa
--- /dev/null
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index ce66ed9..2c8e71f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,4 +23,4 @@ before_install:
 install:
   - # Skip mvn install. See https://docs.travis-ci.com/user/languages/java/
 script:
-  - MAVEN_OPTS="-Xms512m -Xmx1024m" mvn clean install -DskipTests -B
+  - MAVEN_OPTS="-Xms512m -Xmx1024m" ./mvnw clean install -DskipTests -B -fae

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/build-support/pom.xml
----------------------------------------------------------------------
diff --git a/build-support/pom.xml b/build-support/pom.xml
new file mode 100644
index 0000000..e4c92c3
--- /dev/null
+++ b/build-support/pom.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         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>
+
+    <groupId>org.apache.flume</groupId>
+    <artifactId>build-support</artifactId>
+    <version>1.9.0-SNAPSHOT</version>
+    <name>Build Support</name>
+    <description>Build tools and Configuration</description>
+    <properties>
+        <maven.site.skip>true</maven.site.skip>
+    </properties>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/build-support/src/main/resources/config/checkstyle/checkstyle-suppressions.xml
----------------------------------------------------------------------
diff --git a/build-support/src/main/resources/config/checkstyle/checkstyle-suppressions.xml b/build-support/src/main/resources/config/checkstyle/checkstyle-suppressions.xml
new file mode 100644
index 0000000..5981468
--- /dev/null
+++ b/build-support/src/main/resources/config/checkstyle/checkstyle-suppressions.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+
+<!-- NOTE: All path separators must be specified as [/\\] in order to maintain
+     build compatibility with both UNIX and Windows. -->
+
+<suppressions>
+
+    <!-- Suppress all style checks for generated code -->
+    <suppress checks=".*"
+              files="generated-sources|com[/\\]cloudera[/\\]flume[/\\]handlers[/\\]thrift|org[/\\]apache[/\\]flume[/\\]thrift[/\\]|org[/\\]apache[/\\]flume[/\\]source[/\\]scribe|ProtosFactory.java"/>
+
+    <!-- The "legacy" sources have a weird camelCaps package name -->
+    <suppress checks="PackageName"
+              files="org[/\\]apache[/\\]flume[/\\]source[/\\]avroLegacy|org[/\\]apache[/\\]flume[/\\]source[/\\]thriftLegacy"/>
+
+    <!-- Allow unicode escapes in tests -->
+    <suppress checks="AvoidEscapedUnicodeCharacters"
+              files="Test.*\.java"/>
+
+    <!-- TODO: Rearrange methods in below classes to keep overloaded methods adjacent -->
+    <suppress checks="OverloadMethodsDeclarationOrder"
+              files="channel[/\\]file|RpcClientFactory\.java|BucketPath\.java|SinkGroup\.java|DefaultSinkProcessor\.java|RegexExtractorInterceptorMillisSerializer\.java|SimpleAsyncHbaseEventSerializer\.java|hdfs[/\\]BucketWriter\.java|AbstractBasicChannelSemanticsTest\.java"/>
+
+    <!-- TODO: Fix inner class names to follow standard convention -->
+    <suppress checks="TypeName"
+              files="SyslogUDPSource\.java|SyslogTcpSource\.java|TaildirSource\.java"/>
+
+    <!-- TODO: Method names must follow standard Java naming conventions -->
+    <suppress checks="MethodNameCheck"
+              files="TestBucketWriter\.java|TestSyslogUtils\.java"/>
+
+    <!-- TODO: Add default cases to switch statements -->
+    <suppress checks="MissingSwitchDefault"
+              files="SyslogUtils\.java|ReliableTaildirEventReader\.java|AbstractBasicChannelSemanticsTest\.java"/>
+
+    <!-- TODO: Avoid empty catch blocks -->
+    <suppress checks="EmptyCatchBlock"
+              files="channel[/\\]file[/\\]LogFile\.java|TestDatasetSink\.java|CountingSourceRunner\.java|CountingSinkRunner\.java|TestKafkaChannel\.java|TestTaildirSource\.java|TestChannelProcessor\.java|TestHiveSink\.java|AbstractBasicChannelSemanticsTest\.java|TestJMSSource\.java|TestEmbeddedAgent\.java|TestAsyncHBaseSink\.java"/>
+
+    <!-- TODO: Avoid empty if blocks -->
+    <suppress checks="EmptyBlockCheck"
+              files="ElasticSearchClientFactory\.java"/>
+
+    <!-- TODO: Fix line length issues -->
+    <suppress checks="LineLengthCheck"
+              files="channel[/\\]MemoryChannel\.java|ReliableSpoolingFileEventReader\.java|TestAvroSink\.java"/>
+
+    <!-- TODO: Move helper classes to their own files -->
+    <suppress checks="OneTopLevelClass"
+              files="KafkaSource\.java|KafkaChannel\.java|KafkaSink\.java|TestElasticSearchSink\.java"/>
+
+</suppressions>

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/build-support/src/main/resources/config/checkstyle/checkstyle.xml
----------------------------------------------------------------------
diff --git a/build-support/src/main/resources/config/checkstyle/checkstyle.xml b/build-support/src/main/resources/config/checkstyle/checkstyle.xml
new file mode 100644
index 0000000..16f3669
--- /dev/null
+++ b/build-support/src/main/resources/config/checkstyle/checkstyle.xml
@@ -0,0 +1,200 @@
+<?xml version="1.0"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+
+<!DOCTYPE module PUBLIC
+        "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
+        "https://checkstyle.org/dtds/configuration_1_3.dtd">
+
+<!--
+    Checkstyle configuration that checks the Google coding conventions from Google Java Style
+    that can be found at https://google.github.io/styleguide/javaguide.html.
+
+    Checkstyle is very configurable. Be sure to read the documentation at
+    http://checkstyle.sf.net (or in your downloaded distribution).
+
+    To completely disable a check, just comment it out or delete it from the file.
+
+    Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
+ -->
+
+<module name = "Checker">
+    <property name="charset" value="UTF-8"/>
+
+    <property name="severity" value="error"/>
+
+    <property name="fileExtensions" value="java, properties, xml"/>
+    <!-- Checks for whitespace                               -->
+    <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <module name="FileTabCharacter">
+            <property name="eachLine" value="true"/>
+        </module>
+    <!-- Suppress generated sources -->
+    <module name="SuppressionFilter">
+        <property name="file" value="${checkstyle.suppressions.file}"/>
+        <property name="optional" value="false"/>
+    </module>
+
+    <module name="TreeWalker">
+        <module name="OuterTypeFilename"/>
+        <module name="IllegalTokenText">
+            <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
+            <property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
+            <property name="message" value="Avoid using corresponding octal or Unicode escape."/>
+        </module>
+        <module name="AvoidEscapedUnicodeCharacters">
+            <property name="allowEscapesForControlCharacters" value="true"/>
+            <property name="allowByTailComment" value="true"/>
+            <property name="allowNonPrintableEscapes" value="true"/>
+        </module>
+        <module name="LineLength">
+            <property name="max" value="100"/>
+            <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
+        </module>
+        <module name="AvoidStarImport">
+            <property name="allowStaticMemberImports" value="true"/>
+        </module>
+        <module name="OneTopLevelClass"/>
+        <module name="NoLineWrap"/>
+        <module name="EmptyBlock">
+            <property name="option" value="TEXT"/>
+            <property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
+        </module>
+        <module name="NeedBraces">
+            <property name="allowSingleLineStatement" value="true"/>
+        </module>
+        <module name="LeftCurly"/>
+        <module name="RightCurly">
+            <property name="option" value="alone"/>
+            <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, STATIC_INIT, INSTANCE_INIT"/>
+        </module>
+        <module name="WhitespaceAround">
+            <property name="allowEmptyConstructors" value="true"/>
+            <property name="allowEmptyMethods" value="true"/>
+            <property name="allowEmptyTypes" value="true"/>
+            <property name="allowEmptyLoops" value="true"/>
+            <message key="ws.notFollowed"
+             value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
+             <message key="ws.notPreceded"
+             value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
+        </module>
+        <module name="OneStatementPerLine"/>
+        <module name="ArrayTypeStyle"/>
+        <module name="MissingSwitchDefault"/>
+        <module name="FallThrough"/>
+        <module name="UpperEll"/>
+        <module name="ModifierOrder"/>
+        <module name="EmptyLineSeparator">
+            <property name="allowNoEmptyLineBetweenFields" value="true"/>
+            <property name="allowMultipleEmptyLines" value="false"/>
+            <property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
+            <property name="tokens" value="IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, STATIC_INIT, INSTANCE_INIT, CTOR_DEF, VARIABLE_DEF"/>
+        </module>
+        <module name="SeparatorWrap">
+            <property name="tokens" value="DOT"/>
+            <property name="option" value="nl"/>
+        </module>
+        <module name="SeparatorWrap">
+            <property name="tokens" value="COMMA"/>
+            <property name="option" value="EOL"/>
+        </module>
+        <module name="PackageName">
+            <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
+            <message key="name.invalidPattern"
+             value="Package name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="TypeName">
+            <message key="name.invalidPattern"
+             value="Type name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="ClassTypeParameterName">
+            <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
+            <message key="name.invalidPattern"
+             value="Class type name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="MethodTypeParameterName">
+            <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
+            <message key="name.invalidPattern"
+             value="Method type name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="InterfaceTypeParameterName">
+            <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
+            <message key="name.invalidPattern"
+             value="Interface type name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="NoFinalizer"/>
+        <module name="GenericWhitespace">
+            <message key="ws.followed"
+             value="GenericWhitespace ''{0}'' is followed by whitespace."/>
+             <message key="ws.preceded"
+             value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
+             <message key="ws.illegalFollow"
+             value="GenericWhitespace ''{0}'' should followed by whitespace."/>
+             <message key="ws.notPreceded"
+             value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
+        </module>
+        <module name="Indentation">
+            <property name="basicOffset" value="2"/>
+            <property name="braceAdjustment" value="0"/>
+            <property name="caseIndent" value="2"/>
+            <property name="throwsIndent" value="4"/>
+            <property name="lineWrappingIndentation" value="4"/>
+            <property name="arrayInitIndent" value="2"/>
+        </module>
+        <module name="OverloadMethodsDeclarationOrder"/>
+        <module name="MethodParamPad"/>
+        <module name="AnnotationLocation">
+            <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
+        </module>
+        <module name="AnnotationLocation">
+            <property name="tokens" value="VARIABLE_DEF"/>
+            <property name="allowSamelineMultipleAnnotations" value="true"/>
+        </module>
+        <module name="AtclauseOrder">
+            <property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
+            <property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
+        </module>
+        <module name="JavadocMethod">
+            <property name="scope" value="public"/>
+            <property name="allowMissingJavadoc" value="true"/>
+            <property name="allowMissingParamTags" value="true"/>
+            <property name="allowMissingThrowsTags" value="true"/>
+            <property name="allowMissingReturnTag" value="true"/>
+            <property name="minLineCount" value="0"/>
+            <property name="allowedAnnotations" value="Override, Test"/>
+            <property name="allowThrowsTagsForSubclasses" value="true"/>
+        </module>
+        <module name="MethodName">
+            <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
+            <message key="name.invalidPattern"
+             value="Method name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="SingleLineJavadoc">
+            <property name="ignoreInlineTags" value="false"/>
+        </module>
+        <module name="EmptyCatchBlock">
+            <property name="exceptionVariableName" value="expected"/>
+        </module>
+        <module name="CommentsIndentation">
+            <property name="tokens" value="BLOCK_COMMENT_BEGIN"/>
+        </module>
+        <module name="UnusedImports"/>
+        <module name="RedundantImport"/>
+    </module>
+</module>

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-checkstyle/pom.xml
----------------------------------------------------------------------
diff --git a/flume-checkstyle/pom.xml b/flume-checkstyle/pom.xml
deleted file mode 100644
index a0396e3..0000000
--- a/flume-checkstyle/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you 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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  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>org.apache</groupId>
-    <artifactId>apache</artifactId>
-    <version>18</version>
-  </parent>
-
-  <groupId>org.apache.flume</groupId>
-  <artifactId>flume-checkstyle</artifactId>
-  <version>1.9.0-SNAPSHOT</version>
-
-  <name>Flume checkstyle project</name>
-
-  <properties>
-    <!-- Set default encoding to UTF-8 to remove maven complaints -->
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-
-</project>

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-checkstyle/src/main/resources/flume/checkstyle-suppressions.xml
----------------------------------------------------------------------
diff --git a/flume-checkstyle/src/main/resources/flume/checkstyle-suppressions.xml b/flume-checkstyle/src/main/resources/flume/checkstyle-suppressions.xml
deleted file mode 100644
index 5981468..0000000
--- a/flume-checkstyle/src/main/resources/flume/checkstyle-suppressions.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you 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.
--->
-
-<!DOCTYPE suppressions PUBLIC
-    "-//Puppy Crawl//DTD Suppressions 1.0//EN"
-    "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
-
-<!-- NOTE: All path separators must be specified as [/\\] in order to maintain
-     build compatibility with both UNIX and Windows. -->
-
-<suppressions>
-
-    <!-- Suppress all style checks for generated code -->
-    <suppress checks=".*"
-              files="generated-sources|com[/\\]cloudera[/\\]flume[/\\]handlers[/\\]thrift|org[/\\]apache[/\\]flume[/\\]thrift[/\\]|org[/\\]apache[/\\]flume[/\\]source[/\\]scribe|ProtosFactory.java"/>
-
-    <!-- The "legacy" sources have a weird camelCaps package name -->
-    <suppress checks="PackageName"
-              files="org[/\\]apache[/\\]flume[/\\]source[/\\]avroLegacy|org[/\\]apache[/\\]flume[/\\]source[/\\]thriftLegacy"/>
-
-    <!-- Allow unicode escapes in tests -->
-    <suppress checks="AvoidEscapedUnicodeCharacters"
-              files="Test.*\.java"/>
-
-    <!-- TODO: Rearrange methods in below classes to keep overloaded methods adjacent -->
-    <suppress checks="OverloadMethodsDeclarationOrder"
-              files="channel[/\\]file|RpcClientFactory\.java|BucketPath\.java|SinkGroup\.java|DefaultSinkProcessor\.java|RegexExtractorInterceptorMillisSerializer\.java|SimpleAsyncHbaseEventSerializer\.java|hdfs[/\\]BucketWriter\.java|AbstractBasicChannelSemanticsTest\.java"/>
-
-    <!-- TODO: Fix inner class names to follow standard convention -->
-    <suppress checks="TypeName"
-              files="SyslogUDPSource\.java|SyslogTcpSource\.java|TaildirSource\.java"/>
-
-    <!-- TODO: Method names must follow standard Java naming conventions -->
-    <suppress checks="MethodNameCheck"
-              files="TestBucketWriter\.java|TestSyslogUtils\.java"/>
-
-    <!-- TODO: Add default cases to switch statements -->
-    <suppress checks="MissingSwitchDefault"
-              files="SyslogUtils\.java|ReliableTaildirEventReader\.java|AbstractBasicChannelSemanticsTest\.java"/>
-
-    <!-- TODO: Avoid empty catch blocks -->
-    <suppress checks="EmptyCatchBlock"
-              files="channel[/\\]file[/\\]LogFile\.java|TestDatasetSink\.java|CountingSourceRunner\.java|CountingSinkRunner\.java|TestKafkaChannel\.java|TestTaildirSource\.java|TestChannelProcessor\.java|TestHiveSink\.java|AbstractBasicChannelSemanticsTest\.java|TestJMSSource\.java|TestEmbeddedAgent\.java|TestAsyncHBaseSink\.java"/>
-
-    <!-- TODO: Avoid empty if blocks -->
-    <suppress checks="EmptyBlockCheck"
-              files="ElasticSearchClientFactory\.java"/>
-
-    <!-- TODO: Fix line length issues -->
-    <suppress checks="LineLengthCheck"
-              files="channel[/\\]MemoryChannel\.java|ReliableSpoolingFileEventReader\.java|TestAvroSink\.java"/>
-
-    <!-- TODO: Move helper classes to their own files -->
-    <suppress checks="OneTopLevelClass"
-              files="KafkaSource\.java|KafkaChannel\.java|KafkaSink\.java|TestElasticSearchSink\.java"/>
-
-</suppressions>

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-checkstyle/src/main/resources/flume/checkstyle.xml
----------------------------------------------------------------------
diff --git a/flume-checkstyle/src/main/resources/flume/checkstyle.xml b/flume-checkstyle/src/main/resources/flume/checkstyle.xml
deleted file mode 100644
index 7035e09..0000000
--- a/flume-checkstyle/src/main/resources/flume/checkstyle.xml
+++ /dev/null
@@ -1,196 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you 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.
--->
-
-<!DOCTYPE module PUBLIC
-          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
-          "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
-
-<!--
-    Checkstyle configuration that checks the Google coding conventions from Google Java Style
-    that can be found at https://google.github.io/styleguide/javaguide.html.
-
-    Checkstyle is very configurable. Be sure to read the documentation at
-    http://checkstyle.sf.net (or in your downloaded distribution).
-
-    To completely disable a check, just comment it out or delete it from the file.
-
-    Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
- -->
-
-<module name = "Checker">
-    <property name="charset" value="UTF-8"/>
-
-    <property name="severity" value="error"/>
-
-    <property name="fileExtensions" value="java, properties, xml"/>
-    <!-- Checks for whitespace                               -->
-    <!-- See http://checkstyle.sf.net/config_whitespace.html -->
-        <module name="FileTabCharacter">
-            <property name="eachLine" value="true"/>
-        </module>
-
-    <module name="TreeWalker">
-        <module name="OuterTypeFilename"/>
-        <module name="IllegalTokenText">
-            <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
-            <property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
-            <property name="message" value="Avoid using corresponding octal or Unicode escape."/>
-        </module>
-        <module name="AvoidEscapedUnicodeCharacters">
-            <property name="allowEscapesForControlCharacters" value="true"/>
-            <property name="allowByTailComment" value="true"/>
-            <property name="allowNonPrintableEscapes" value="true"/>
-        </module>
-        <module name="LineLength">
-            <property name="max" value="100"/>
-            <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
-        </module>
-        <module name="AvoidStarImport">
-            <property name="allowStaticMemberImports" value="true"/>
-        </module>
-        <module name="OneTopLevelClass"/>
-        <module name="NoLineWrap"/>
-        <module name="EmptyBlock">
-            <property name="option" value="TEXT"/>
-            <property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
-        </module>
-        <module name="NeedBraces">
-            <property name="allowSingleLineStatement" value="true"/>
-        </module>
-        <module name="LeftCurly">
-            <property name="maxLineLength" value="100"/>
-        </module>
-        <module name="RightCurly"/>
-        <module name="RightCurly">
-            <property name="option" value="alone"/>
-            <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
-        </module>
-        <module name="WhitespaceAround">
-            <property name="allowEmptyConstructors" value="true"/>
-            <property name="allowEmptyMethods" value="true"/>
-            <property name="allowEmptyTypes" value="true"/>
-            <property name="allowEmptyLoops" value="true"/>
-            <message key="ws.notFollowed"
-             value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
-             <message key="ws.notPreceded"
-             value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
-        </module>
-        <module name="OneStatementPerLine"/>
-        <module name="ArrayTypeStyle"/>
-        <module name="MissingSwitchDefault"/>
-        <module name="FallThrough"/>
-        <module name="UpperEll"/>
-        <module name="ModifierOrder"/>
-        <module name="EmptyLineSeparator">
-            <property name="allowNoEmptyLineBetweenFields" value="true"/>
-            <property name="allowMultipleEmptyLines" value="false"/>
-            <property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
-            <property name="tokens" value="IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, STATIC_INIT, INSTANCE_INIT, CTOR_DEF, VARIABLE_DEF"/>
-        </module>
-        <module name="SeparatorWrap">
-            <property name="tokens" value="DOT"/>
-            <property name="option" value="nl"/>
-        </module>
-        <module name="SeparatorWrap">
-            <property name="tokens" value="COMMA"/>
-            <property name="option" value="EOL"/>
-        </module>
-        <module name="PackageName">
-            <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
-            <message key="name.invalidPattern"
-             value="Package name ''{0}'' must match pattern ''{1}''."/>
-        </module>
-        <module name="TypeName">
-            <message key="name.invalidPattern"
-             value="Type name ''{0}'' must match pattern ''{1}''."/>
-        </module>
-        <module name="ClassTypeParameterName">
-            <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
-            <message key="name.invalidPattern"
-             value="Class type name ''{0}'' must match pattern ''{1}''."/>
-        </module>
-        <module name="MethodTypeParameterName">
-            <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
-            <message key="name.invalidPattern"
-             value="Method type name ''{0}'' must match pattern ''{1}''."/>
-        </module>
-        <module name="InterfaceTypeParameterName">
-            <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
-            <message key="name.invalidPattern"
-             value="Interface type name ''{0}'' must match pattern ''{1}''."/>
-        </module>
-        <module name="NoFinalizer"/>
-        <module name="GenericWhitespace">
-            <message key="ws.followed"
-             value="GenericWhitespace ''{0}'' is followed by whitespace."/>
-             <message key="ws.preceded"
-             value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
-             <message key="ws.illegalFollow"
-             value="GenericWhitespace ''{0}'' should followed by whitespace."/>
-             <message key="ws.notPreceded"
-             value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
-        </module>
-        <module name="Indentation">
-            <property name="basicOffset" value="2"/>
-            <property name="braceAdjustment" value="0"/>
-            <property name="caseIndent" value="2"/>
-            <property name="throwsIndent" value="4"/>
-            <property name="lineWrappingIndentation" value="4"/>
-            <property name="arrayInitIndent" value="2"/>
-        </module>
-        <module name="OverloadMethodsDeclarationOrder"/>
-        <module name="MethodParamPad"/>
-        <module name="AnnotationLocation">
-            <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
-        </module>
-        <module name="AnnotationLocation">
-            <property name="tokens" value="VARIABLE_DEF"/>
-            <property name="allowSamelineMultipleAnnotations" value="true"/>
-        </module>
-        <module name="AtclauseOrder">
-            <property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
-            <property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
-        </module>
-        <module name="JavadocMethod">
-            <property name="scope" value="public"/>
-            <property name="allowMissingJavadoc" value="true"/>
-            <property name="allowMissingParamTags" value="true"/>
-            <property name="allowMissingThrowsTags" value="true"/>
-            <property name="allowMissingReturnTag" value="true"/>
-            <property name="minLineCount" value="0"/>
-            <property name="allowedAnnotations" value="Override, Test"/>
-            <property name="allowThrowsTagsForSubclasses" value="true"/>
-        </module>
-        <module name="MethodName">
-            <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
-            <message key="name.invalidPattern"
-             value="Method name ''{0}'' must match pattern ''{1}''."/>
-        </module>
-        <module name="SingleLineJavadoc">
-            <property name="ignoreInlineTags" value="false"/>
-        </module>
-        <module name="EmptyCatchBlock">
-            <property name="exceptionVariableName" value="expected"/>
-        </module>
-        <module name="CommentsIndentation">
-            <property name="tokens" value="BLOCK_COMMENT_BEGIN"/>
-        </module>
-    </module>
-</module>

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-auth/pom.xml
----------------------------------------------------------------------
diff --git a/flume-ng-auth/pom.xml b/flume-ng-auth/pom.xml
index e07e881..43d5eec 100644
--- a/flume-ng-auth/pom.xml
+++ b/flume-ng-auth/pom.xml
@@ -28,20 +28,11 @@ limitations under the License.
   <name>Flume Auth</name>
   <description>Flume Authentication</description>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <inherited>true</inherited>
-        <extensions>true</extensions>
-      </plugin>
-    </plugins>
-  </build>
+  <properties>
+    <!-- TODO fix spotbugs/pmd violations -->
+    <spotbugs.maxAllowedViolations>1</spotbugs.maxAllowedViolations>
+    <pmd.maxAllowedViolations>7</pmd.maxAllowedViolations>
+  </properties>
 
   <dependencies>
 
@@ -90,18 +81,13 @@ limitations under the License.
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-minikdc</artifactId>
-      <version>${hadoop2.version}</version>
       <scope>test</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>log4j</groupId>
-          <artifactId>log4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.slf4j</groupId>
-          <artifactId>slf4j-log4j12</artifactId>
-        </exclusion>
-      </exclusions>
+    </dependency>
+    <dependency>
+      <!-- add this to satisfy the dependency requirement of apacheds-jdbm1 in minikdc-->
+      <groupId>org.apache.directory.jdbm</groupId>
+      <artifactId>apacheds-jdbm1</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>com.google.guava</groupId>

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-channels/flume-file-channel/pom.xml
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-file-channel/pom.xml b/flume-ng-channels/flume-file-channel/pom.xml
index 6e580c9..c746b77 100644
--- a/flume-ng-channels/flume-file-channel/pom.xml
+++ b/flume-ng-channels/flume-file-channel/pom.xml
@@ -31,14 +31,11 @@
   <artifactId>flume-file-channel</artifactId>
   <name>Flume NG file-based channel</name>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
+  <properties>
+    <!-- TODO fix spotbugs violations -->
+    <spotbugs.maxAllowedViolations>86</spotbugs.maxAllowedViolations>
+    <pmd.maxAllowedViolations>486</pmd.maxAllowedViolations>
+  </properties>
 
   <dependencies>
 

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java
index efc8d14..5cfb7ab 100644
--- a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java
+++ b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java
@@ -640,7 +640,7 @@ public class Log {
    *
    * @param transactionID
    * @param event
-   * @return
+   * @return FlumeEventPointer
    * @throws IOException
    */
   FlumeEventPointer put(long transactionID, Event event)

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFileV2.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFileV2.java b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFileV2.java
index 62b8cb9..f2469b2 100644
--- a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFileV2.java
+++ b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFileV2.java
@@ -97,7 +97,7 @@ class LogFileV2 extends LogFile {
         long usableSpaceRefreshInterval)
         throws IOException {
       super(file, logFileID, maxFileSize, null, usableSpaceRefreshInterval,
-        true, 0);
+          true, 0);
       RandomAccessFile writeFileHandle = getFileHandle();
       writeFileHandle.writeInt(getVersion());
       writeFileHandle.writeInt(logFileID);

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/instrumentation/FileChannelCounterMBean.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/instrumentation/FileChannelCounterMBean.java b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/instrumentation/FileChannelCounterMBean.java
index 9386094..5e23b70 100644
--- a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/instrumentation/FileChannelCounterMBean.java
+++ b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/instrumentation/FileChannelCounterMBean.java
@@ -18,7 +18,6 @@
  */
 package org.apache.flume.channel.file.instrumentation;
 
-import org.apache.flume.Event;
 import org.apache.flume.instrumentation.ChannelCounterMBean;
 
 public interface FileChannelCounterMBean extends ChannelCounterMBean {
@@ -45,7 +44,8 @@ public interface FileChannelCounterMBean extends ChannelCounterMBean {
 
   /**
    * A count of the number of IOExceptions encountered while trying to put() onto the channel.
-   * @see org.apache.flume.channel.file.FileChannel.FileBackedTransaction#doPut(Event)
+   * @see org.apache.flume.channel.file.FileChannel.FileBackedTransaction
+   #doPut(org.apache.flume.Event)
    */
   long getEventPutErrorCount();
 

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-channels/flume-jdbc-channel/pom.xml
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-jdbc-channel/pom.xml b/flume-ng-channels/flume-jdbc-channel/pom.xml
index 16479a4..2f353af 100644
--- a/flume-ng-channels/flume-jdbc-channel/pom.xml
+++ b/flume-ng-channels/flume-jdbc-channel/pom.xml
@@ -30,21 +30,11 @@ limitations under the License.
   <artifactId>flume-jdbc-channel</artifactId>
   <name>Flume NG JDBC channel</name>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <argLine>-Xmx1024m</argLine>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
+  <properties>
+    <!-- TODO fix spotbugs/pmd violations -->
+    <spotbugs.maxAllowedViolations>31</spotbugs.maxAllowedViolations>
+    <pmd.maxAllowedViolations>16</pmd.maxAllowedViolations>
+  </properties>
 
   <dependencies>
     <dependency>

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-channels/flume-kafka-channel/pom.xml
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-kafka-channel/pom.xml b/flume-ng-channels/flume-kafka-channel/pom.xml
index 390caf6..be5bf74 100644
--- a/flume-ng-channels/flume-kafka-channel/pom.xml
+++ b/flume-ng-channels/flume-kafka-channel/pom.xml
@@ -28,6 +28,12 @@ limitations under the License.
   <groupId>org.apache.flume.flume-ng-channels</groupId>
   <artifactId>flume-kafka-channel</artifactId>
 
+  <properties>
+    <!-- TODO fix spotbugs/pmd violations -->
+    <spotbugs.maxAllowedViolations>13</spotbugs.maxAllowedViolations>
+    <pmd.maxAllowedViolations>13</pmd.maxAllowedViolations>
+  </properties>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.flume</groupId>

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-channels/flume-spillable-memory-channel/pom.xml
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-spillable-memory-channel/pom.xml b/flume-ng-channels/flume-spillable-memory-channel/pom.xml
index 29a3819..4c4776b 100644
--- a/flume-ng-channels/flume-spillable-memory-channel/pom.xml
+++ b/flume-ng-channels/flume-spillable-memory-channel/pom.xml
@@ -31,14 +31,11 @@
   <artifactId>flume-spillable-memory-channel</artifactId>
   <name>Flume NG Spillable Memory channel</name>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
+  <properties>
+    <!-- TODO fix spotbugs/pmd violations -->
+    <spotbugs.maxAllowedViolations>2</spotbugs.maxAllowedViolations>
+    <pmd.maxAllowedViolations>8</pmd.maxAllowedViolations>
+  </properties>
 
   <dependencies>
 

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-channels/pom.xml
----------------------------------------------------------------------
diff --git a/flume-ng-channels/pom.xml b/flume-ng-channels/pom.xml
index d86b9a4..3f3d441 100644
--- a/flume-ng-channels/pom.xml
+++ b/flume-ng-channels/pom.xml
@@ -26,20 +26,10 @@ limitations under the License.
     <version>1.9.0-SNAPSHOT</version>
   </parent>
 
-  <groupId>org.apache.flume</groupId>
   <artifactId>flume-ng-channels</artifactId>
   <name>Flume NG Channels</name>
   <packaging>pom</packaging>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
   <modules>
     <module>flume-jdbc-channel</module>
     <module>flume-file-channel</module>

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-clients/flume-ng-log4jappender/pom.xml
----------------------------------------------------------------------
diff --git a/flume-ng-clients/flume-ng-log4jappender/pom.xml b/flume-ng-clients/flume-ng-log4jappender/pom.xml
index 4d25c2b..8fc57af 100644
--- a/flume-ng-clients/flume-ng-log4jappender/pom.xml
+++ b/flume-ng-clients/flume-ng-log4jappender/pom.xml
@@ -29,14 +29,15 @@ limitations under the License.
   <artifactId>flume-ng-log4jappender</artifactId>
   <name>Flume NG Log4j Appender</name>
 
+  <properties>
+    <!-- TODO fix spotbugs/pmd violations -->
+    <spotbugs.maxAllowedViolations>2</spotbugs.maxAllowedViolations>
+    <pmd.maxAllowedViolations>1</pmd.maxAllowedViolations>
+  </properties>
+
   <build>
     <plugins>
       <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-      </plugin>
-
-      <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
         <configuration>
           <descriptorRefs>

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-clients/flume-ng-log4jappender/src/test/java/org/apache/flume/clients/log4jappender/TestLog4jAppender.java
----------------------------------------------------------------------
diff --git a/flume-ng-clients/flume-ng-log4jappender/src/test/java/org/apache/flume/clients/log4jappender/TestLog4jAppender.java b/flume-ng-clients/flume-ng-log4jappender/src/test/java/org/apache/flume/clients/log4jappender/TestLog4jAppender.java
index 3f8ba37..891cb66 100644
--- a/flume-ng-clients/flume-ng-log4jappender/src/test/java/org/apache/flume/clients/log4jappender/TestLog4jAppender.java
+++ b/flume-ng-clients/flume-ng-log4jappender/src/test/java/org/apache/flume/clients/log4jappender/TestLog4jAppender.java
@@ -22,7 +22,6 @@ import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
 import java.net.ServerSocket;
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-configfilters/flume-ng-environment-variable-config-filter/pom.xml
----------------------------------------------------------------------
diff --git a/flume-ng-configfilters/flume-ng-environment-variable-config-filter/pom.xml b/flume-ng-configfilters/flume-ng-environment-variable-config-filter/pom.xml
index fbc11c2..0181a56 100644
--- a/flume-ng-configfilters/flume-ng-environment-variable-config-filter/pom.xml
+++ b/flume-ng-configfilters/flume-ng-environment-variable-config-filter/pom.xml
@@ -35,13 +35,11 @@ limitations under the License.
         <dependency>
             <groupId>com.github.stefanbirkner</groupId>
             <artifactId>system-rules</artifactId>
-            <version>1.17.0</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>4.8.2</version>
             <scope>test</scope>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-configfilters/flume-ng-external-process-config-filter/pom.xml
----------------------------------------------------------------------
diff --git a/flume-ng-configfilters/flume-ng-external-process-config-filter/pom.xml b/flume-ng-configfilters/flume-ng-external-process-config-filter/pom.xml
index 460c266..ae08a13 100644
--- a/flume-ng-configfilters/flume-ng-external-process-config-filter/pom.xml
+++ b/flume-ng-configfilters/flume-ng-external-process-config-filter/pom.xml
@@ -40,7 +40,6 @@ limitations under the License.
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>4.8.2</version>
             <scope>test</scope>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-configfilters/flume-ng-external-process-config-filter/src/test/java/org/apache/flume/configfilter/TestExternalProcessConfigFilter.java
----------------------------------------------------------------------
diff --git a/flume-ng-configfilters/flume-ng-external-process-config-filter/src/test/java/org/apache/flume/configfilter/TestExternalProcessConfigFilter.java b/flume-ng-configfilters/flume-ng-external-process-config-filter/src/test/java/org/apache/flume/configfilter/TestExternalProcessConfigFilter.java
index 47553f0c..33791cd 100644
--- a/flume-ng-configfilters/flume-ng-external-process-config-filter/src/test/java/org/apache/flume/configfilter/TestExternalProcessConfigFilter.java
+++ b/flume-ng-configfilters/flume-ng-external-process-config-filter/src/test/java/org/apache/flume/configfilter/TestExternalProcessConfigFilter.java
@@ -18,7 +18,6 @@
  */
 package org.apache.flume.configfilter;
 
-import org.apache.flume.configfilter.ExternalProcessConfigFilter;
 import org.junit.Before;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-configfilters/flume-ng-hadoop-credential-store-config-filter/pom.xml
----------------------------------------------------------------------
diff --git a/flume-ng-configfilters/flume-ng-hadoop-credential-store-config-filter/pom.xml b/flume-ng-configfilters/flume-ng-hadoop-credential-store-config-filter/pom.xml
index 1290069..e5207a0 100644
--- a/flume-ng-configfilters/flume-ng-hadoop-credential-store-config-filter/pom.xml
+++ b/flume-ng-configfilters/flume-ng-hadoop-credential-store-config-filter/pom.xml
@@ -46,7 +46,6 @@ limitations under the License.
         <dependency>
             <groupId>com.github.stefanbirkner</groupId>
             <artifactId>system-rules</artifactId>
-            <version>1.17.0</version>
             <scope>test</scope>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-configuration/pom.xml
----------------------------------------------------------------------
diff --git a/flume-ng-configuration/pom.xml b/flume-ng-configuration/pom.xml
index 9fe136c..5d6fa32 100644
--- a/flume-ng-configuration/pom.xml
+++ b/flume-ng-configuration/pom.xml
@@ -25,15 +25,12 @@ limitations under the License.
   </parent>
   <artifactId>flume-ng-configuration</artifactId>
   <name>Flume NG Configuration</name>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-      </plugin>
 
-    </plugins>
-  </build>
+  <properties>
+    <!-- TODO fix spotbugs violations -->
+    <spotbugs.maxAllowedViolations>8</spotbugs.maxAllowedViolations>
+    <pmd.maxAllowedViolations>17</pmd.maxAllowedViolations>
+  </properties>
 
   <dependencies>
 

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-configuration/src/main/java/org/apache/flume/conf/channel/ChannelSelectorConfiguration.java
----------------------------------------------------------------------
diff --git a/flume-ng-configuration/src/main/java/org/apache/flume/conf/channel/ChannelSelectorConfiguration.java b/flume-ng-configuration/src/main/java/org/apache/flume/conf/channel/ChannelSelectorConfiguration.java
index 7e23284..97f9182 100644
--- a/flume-ng-configuration/src/main/java/org/apache/flume/conf/channel/ChannelSelectorConfiguration.java
+++ b/flume-ng-configuration/src/main/java/org/apache/flume/conf/channel/ChannelSelectorConfiguration.java
@@ -20,7 +20,6 @@ import java.util.Set;
 
 import org.apache.flume.conf.ComponentConfiguration;
 import org.apache.flume.conf.ConfigurationException;
-import org.apache.flume.conf.channel.ChannelConfiguration.ChannelConfigurationType;
 
 public class ChannelSelectorConfiguration extends
     ComponentConfiguration {

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/pom.xml
----------------------------------------------------------------------
diff --git a/flume-ng-core/pom.xml b/flume-ng-core/pom.xml
index 3d72aba..f28b98f 100644
--- a/flume-ng-core/pom.xml
+++ b/flume-ng-core/pom.xml
@@ -29,6 +29,12 @@ limitations under the License.
   <artifactId>flume-ng-core</artifactId>
   <name>Flume NG Core</name>
 
+  <properties>
+    <!-- TODO fix spotbugs violations -->
+    <spotbugs.maxAllowedViolations>115</spotbugs.maxAllowedViolations>
+    <pmd.maxAllowedViolations>112</pmd.maxAllowedViolations>
+  </properties>
+
   <build>
     <pluginManagement>
       <plugins>
@@ -118,11 +124,6 @@ limitations under the License.
         </executions>
       </plugin>
 
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-      </plugin>
-
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/SinkProcessor.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/SinkProcessor.java b/flume-ng-core/src/main/java/org/apache/flume/SinkProcessor.java
index c0c7c29..d863ed0 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/SinkProcessor.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/SinkProcessor.java
@@ -21,7 +21,6 @@ import java.util.List;
 
 import org.apache.flume.Sink.Status;
 import org.apache.flume.conf.Configurable;
-import org.apache.flume.conf.ConfigurableComponent;
 import org.apache.flume.lifecycle.LifecycleAware;
 
 /**

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/channel/AbstractChannel.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/channel/AbstractChannel.java b/flume-ng-core/src/main/java/org/apache/flume/channel/AbstractChannel.java
index 750cd91..6ea5dac 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/channel/AbstractChannel.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/channel/AbstractChannel.java
@@ -26,8 +26,6 @@ import org.apache.flume.conf.Configurable;
 import org.apache.flume.lifecycle.LifecycleAware;
 import org.apache.flume.lifecycle.LifecycleState;
 
-import java.util.Map;
-
 @InterfaceAudience.Public
 @InterfaceStability.Stable
 public abstract class AbstractChannel

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/channel/ReplicatingChannelSelector.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/channel/ReplicatingChannelSelector.java b/flume-ng-core/src/main/java/org/apache/flume/channel/ReplicatingChannelSelector.java
index 47c6aca..924f7a3 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/channel/ReplicatingChannelSelector.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/channel/ReplicatingChannelSelector.java
@@ -19,7 +19,6 @@
 package org.apache.flume.channel;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java b/flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java
index e8d5a36..1e1fbc0 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableSpoolingFileEventReader.java
@@ -60,7 +60,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Set;
-import java.util.UUID;
 import java.util.regex.Pattern;
 
 /**

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/formatter/output/BucketPath.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/formatter/output/BucketPath.java b/flume-ng-core/src/main/java/org/apache/flume/formatter/output/BucketPath.java
index 88a9166..393733d 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/formatter/output/BucketPath.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/formatter/output/BucketPath.java
@@ -189,7 +189,7 @@ public class BucketPath {
     return replaceShorthand(c, headers, timeZone, needRounding, unit,
         roundDown, false, ts);
   }
-  
+
   protected static final ThreadLocal<HashMap<String, SimpleDateFormat>> simpleDateFormatCache =
       new ThreadLocal<HashMap<String, SimpleDateFormat>>() {
 
@@ -218,7 +218,7 @@ public class BucketPath {
   @VisibleForTesting
   protected static String replaceStaticString(String key) {
     String replacementString = "";
-    
+
     switch (key.toLowerCase()) {
       case "localhost":
         replacementString = InetAddressCache.hostName;

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/instrumentation/kafka/KafkaChannelCounter.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/instrumentation/kafka/KafkaChannelCounter.java b/flume-ng-core/src/main/java/org/apache/flume/instrumentation/kafka/KafkaChannelCounter.java
index 28d3c8c..e2f9d03 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/instrumentation/kafka/KafkaChannelCounter.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/instrumentation/kafka/KafkaChannelCounter.java
@@ -17,7 +17,6 @@
  */
 package org.apache.flume.instrumentation.kafka;
 
-import org.apache.commons.lang.ArrayUtils;
 import org.apache.flume.instrumentation.ChannelCounter;
 
 public class KafkaChannelCounter extends ChannelCounter

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java b/flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java
index c648958..e09c6bb 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventDeserializer.java
@@ -33,8 +33,6 @@ import org.apache.commons.codec.binary.Hex;
 import org.apache.flume.Context;
 import org.apache.flume.Event;
 import org.apache.flume.FlumeException;
-import org.apache.flume.annotations.InterfaceAudience;
-import org.apache.flume.annotations.InterfaceStability;
 import org.apache.flume.event.EventBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/serialization/DurablePositionTracker.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/serialization/DurablePositionTracker.java b/flume-ng-core/src/main/java/org/apache/flume/serialization/DurablePositionTracker.java
index a4511a7..690bca5 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/serialization/DurablePositionTracker.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/serialization/DurablePositionTracker.java
@@ -62,7 +62,7 @@ public class DurablePositionTracker implements PositionTracker {
    * our writes may never be visible.
    * @param trackerFile
    * @param target
-   * @return
+   * @return DurablePositionTracker
    * @throws IOException
    */
   public static DurablePositionTracker getInstance(File trackerFile,

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializer.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializer.java b/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializer.java
index e230e34..618de18 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializer.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializer.java
@@ -120,7 +120,7 @@ public interface EventSerializer {
   /**
    * Specify whether this output format supports reopening files for append.
    * For example, this method should return {@code false} if
-   * {@link beforeClose()} writes a trailer that "finalizes" the file
+   * {@link #beforeClose()} writes a trailer that "finalizes" the file
    * (this type of behavior is file format-specific).<br/>
    * Could have been named {@code supportsAppend()}.
    */

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/serialization/FlumeEventAvroEventSerializer.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/serialization/FlumeEventAvroEventSerializer.java b/flume-ng-core/src/main/java/org/apache/flume/serialization/FlumeEventAvroEventSerializer.java
index 791116d..88aab59 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/serialization/FlumeEventAvroEventSerializer.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/serialization/FlumeEventAvroEventSerializer.java
@@ -18,12 +18,10 @@
  */
 package org.apache.flume.serialization;
 
-import org.apache.flume.serialization.AbstractAvroEventSerializer;
 import java.io.OutputStream;
 import org.apache.avro.Schema;
 import org.apache.flume.Context;
 import org.apache.flume.Event;
-import org.apache.flume.serialization.EventSerializer;
 
 public class FlumeEventAvroEventSerializer extends AbstractAvroEventSerializer<Event> {
 

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/sink/AbstractRpcSink.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/sink/AbstractRpcSink.java b/flume-ng-core/src/main/java/org/apache/flume/sink/AbstractRpcSink.java
index da347e0..12e2874 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/sink/AbstractRpcSink.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/sink/AbstractRpcSink.java
@@ -20,7 +20,6 @@ package org.apache.flume.sink;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 import com.google.common.collect.Lists;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import org.apache.flume.Channel;
@@ -46,8 +45,6 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
 
 /**
  * This sink provides the basic RPC functionality for Flume. This sink takes

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/sink/AvroSink.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/sink/AvroSink.java b/flume-ng-core/src/main/java/org/apache/flume/sink/AvroSink.java
index 34f9fa6..06991fa 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/sink/AvroSink.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/sink/AvroSink.java
@@ -19,29 +19,16 @@
 
 package org.apache.flume.sink;
 
-import java.util.List;
 import java.util.Properties;
 
 import org.apache.flume.Channel;
-import org.apache.flume.ChannelException;
-import org.apache.flume.Context;
-import org.apache.flume.Event;
-import org.apache.flume.EventDeliveryException;
-import org.apache.flume.FlumeException;
 import org.apache.flume.Sink;
-import org.apache.flume.Transaction;
 import org.apache.flume.api.RpcClient;
-import org.apache.flume.api.RpcClientConfigurationConstants;
 import org.apache.flume.api.RpcClientFactory;
-import org.apache.flume.conf.Configurable;
-import org.apache.flume.instrumentation.SinkCounter;
 import org.apache.flume.source.AvroSource;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-
 /**
  * <p>
  * A {@link Sink} implementation that can send events to an RPC server (such as

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/sink/SinkGroup.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/sink/SinkGroup.java b/flume-ng-core/src/main/java/org/apache/flume/sink/SinkGroup.java
index d23f9ea..59f62bb 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/sink/SinkGroup.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/sink/SinkGroup.java
@@ -18,7 +18,6 @@
 package org.apache.flume.sink;
 
 import java.util.List;
-import java.util.Map;
 
 import org.apache.flume.Context;
 import org.apache.flume.FlumeException;

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/source/SyslogParser.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/source/SyslogParser.java b/flume-ng-core/src/main/java/org/apache/flume/source/SyslogParser.java
index de727f6..9ad306b 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/source/SyslogParser.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/source/SyslogParser.java
@@ -22,7 +22,6 @@
 
 package org.apache.flume.source;
 
-import com.google.common.base.Charsets;
 import com.google.common.base.Preconditions;
 import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java b/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java
index e9d4d8f..2df5ae0 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java
@@ -197,11 +197,7 @@ public class SyslogUtils {
   }
 
   public SyslogUtils(Integer defaultSize, Set<String> keepFields, boolean isUdp) {
-      this(defaultSize,
-              keepFields,
-              isUdp,
-              Clock.system(Clock.systemDefaultZone().getZone())
-      );
+    this(defaultSize, keepFields, isUdp, Clock.system(Clock.systemDefaultZone().getZone()));
   }
 
   public SyslogUtils(Integer eventSize, Set<String> keepFields, boolean isUdp, Clock clock) {

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/main/java/org/apache/flume/source/shaded/guava/RateLimiter.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/source/shaded/guava/RateLimiter.java b/flume-ng-core/src/main/java/org/apache/flume/source/shaded/guava/RateLimiter.java
index c00a106..6867db7 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/source/shaded/guava/RateLimiter.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/source/shaded/guava/RateLimiter.java
@@ -24,7 +24,6 @@ import static java.util.concurrent.TimeUnit.SECONDS;
 
 import com.google.common.annotations.Beta;
 import com.google.common.annotations.VisibleForTesting;
-import org.apache.flume.source.shaded.guava.Stopwatch;
 import org.apache.flume.source.shaded.guava.SmoothRateLimiter.SmoothBursty;
 import org.apache.flume.source.shaded.guava.SmoothRateLimiter.SmoothWarmingUp;
 

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/test/java/org/apache/flume/TestCounterGroup.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/test/java/org/apache/flume/TestCounterGroup.java b/flume-ng-core/src/test/java/org/apache/flume/TestCounterGroup.java
index 951d6bf..34dec10 100644
--- a/flume-ng-core/src/test/java/org/apache/flume/TestCounterGroup.java
+++ b/flume-ng-core/src/test/java/org/apache/flume/TestCounterGroup.java
@@ -23,7 +23,6 @@ import java.util.concurrent.atomic.AtomicLong;
 
 import junit.framework.Assert;
 
-import org.apache.flume.CounterGroup;
 import org.junit.Before;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/test/java/org/apache/flume/client/avro/TestBufferedLineReader.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/test/java/org/apache/flume/client/avro/TestBufferedLineReader.java b/flume-ng-core/src/test/java/org/apache/flume/client/avro/TestBufferedLineReader.java
index eb86f23..2c70502 100644
--- a/flume-ng-core/src/test/java/org/apache/flume/client/avro/TestBufferedLineReader.java
+++ b/flume-ng-core/src/test/java/org/apache/flume/client/avro/TestBufferedLineReader.java
@@ -22,8 +22,7 @@ package org.apache.flume.client.avro;
 import static org.apache.flume.client.avro.TestSpoolingFileLineReader.bodyAsString;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.apache.flume.client.avro.TestSpoolingFileLineReader
-    .bodiesAsStrings;
+import static org.apache.flume.client.avro.TestSpoolingFileLineReader.bodiesAsStrings;
 
 import java.io.File;
 import java.io.FileReader;

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/test/java/org/apache/flume/serialization/TestDurablePositionTracker.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/test/java/org/apache/flume/serialization/TestDurablePositionTracker.java b/flume-ng-core/src/test/java/org/apache/flume/serialization/TestDurablePositionTracker.java
index 0c76cc9..85edaa3 100644
--- a/flume-ng-core/src/test/java/org/apache/flume/serialization/TestDurablePositionTracker.java
+++ b/flume-ng-core/src/test/java/org/apache/flume/serialization/TestDurablePositionTracker.java
@@ -27,7 +27,6 @@ import org.slf4j.LoggerFactory;
 import java.io.File;
 import java.io.IOException;
 import java.net.URISyntaxException;
-import java.net.URL;
 
 public class TestDurablePositionTracker {
 

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/test/java/org/apache/flume/serialization/TestResettableFileInputStream.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/test/java/org/apache/flume/serialization/TestResettableFileInputStream.java b/flume-ng-core/src/test/java/org/apache/flume/serialization/TestResettableFileInputStream.java
index 9f336eb..41cdf0b 100644
--- a/flume-ng-core/src/test/java/org/apache/flume/serialization/TestResettableFileInputStream.java
+++ b/flume-ng-core/src/test/java/org/apache/flume/serialization/TestResettableFileInputStream.java
@@ -588,7 +588,7 @@ public class TestResettableFileInputStream {
    * Helper function to read a line from a character stream.
    * @param in
    * @param maxLength
-   * @return
+   * @return Line as string
    * @throws IOException
    */
   private static String readLine(ResettableInputStream in, int maxLength)

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/test/java/org/apache/flume/sink/TestThriftSink.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/test/java/org/apache/flume/sink/TestThriftSink.java b/flume-ng-core/src/test/java/org/apache/flume/sink/TestThriftSink.java
index c573fe7..5008067 100644
--- a/flume-ng-core/src/test/java/org/apache/flume/sink/TestThriftSink.java
+++ b/flume-ng-core/src/test/java/org/apache/flume/sink/TestThriftSink.java
@@ -39,7 +39,6 @@ import org.junit.Before;
 import org.junit.Test;
 
 import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.TrustManagerFactory;
 
 import java.net.ServerSocket;
 import java.nio.charset.Charset;

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/test/java/org/apache/flume/source/TestPollableSourceRunner.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/test/java/org/apache/flume/source/TestPollableSourceRunner.java b/flume-ng-core/src/test/java/org/apache/flume/source/TestPollableSourceRunner.java
index d706e9b..65bbeae 100644
--- a/flume-ng-core/src/test/java/org/apache/flume/source/TestPollableSourceRunner.java
+++ b/flume-ng-core/src/test/java/org/apache/flume/source/TestPollableSourceRunner.java
@@ -30,7 +30,6 @@ import org.apache.flume.EventDeliveryException;
 import org.apache.flume.PollableSource;
 import org.apache.flume.Transaction;
 import org.apache.flume.channel.ChannelProcessor;
-import org.apache.flume.channel.ChannelSelectorFactory;
 import org.apache.flume.channel.MemoryChannel;
 import org.apache.flume.channel.ReplicatingChannelSelector;
 import org.apache.flume.conf.Configurables;

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/test/java/org/apache/flume/source/TestStressSource.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/test/java/org/apache/flume/source/TestStressSource.java b/flume-ng-core/src/test/java/org/apache/flume/source/TestStressSource.java
index a7db6c4..043f4dc 100644
--- a/flume-ng-core/src/test/java/org/apache/flume/source/TestStressSource.java
+++ b/flume-ng-core/src/test/java/org/apache/flume/source/TestStressSource.java
@@ -26,7 +26,6 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import junit.framework.Assert;

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogUdpSource.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogUdpSource.java b/flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogUdpSource.java
index 06122e6..76c5759 100644
--- a/flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogUdpSource.java
+++ b/flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogUdpSource.java
@@ -40,8 +40,6 @@ import java.net.DatagramPacket;
 import java.net.DatagramSocket;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
-import java.net.SocketException;
-import java.net.UnknownHostException;
 import java.util.ArrayList;
 import java.util.List;
 

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/test/java/org/apache/flume/source/TestThriftSource.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/test/java/org/apache/flume/source/TestThriftSource.java b/flume-ng-core/src/test/java/org/apache/flume/source/TestThriftSource.java
index 610d6fc..57cf203 100644
--- a/flume-ng-core/src/test/java/org/apache/flume/source/TestThriftSource.java
+++ b/flume-ng-core/src/test/java/org/apache/flume/source/TestThriftSource.java
@@ -45,9 +45,6 @@ import org.junit.Test;
 import org.mockito.Mockito;
 import org.mockito.internal.util.reflection.Whitebox;
 
-import javax.net.ssl.TrustManagerFactory;
-import javax.net.ssl.KeyManagerFactory;
-
 import java.io.IOException;
 import java.net.ServerSocket;
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/flume/blob/fb16ffc0/flume-ng-core/src/test/java/org/apache/flume/tools/TestFlumeConfigurator.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/test/java/org/apache/flume/tools/TestFlumeConfigurator.java b/flume-ng-core/src/test/java/org/apache/flume/tools/TestFlumeConfigurator.java
index 26ecb0a..6163e8a 100644
--- a/flume-ng-core/src/test/java/org/apache/flume/tools/TestFlumeConfigurator.java
+++ b/flume-ng-core/src/test/java/org/apache/flume/tools/TestFlumeConfigurator.java
@@ -27,8 +27,6 @@ import java.util.concurrent.ThreadLocalRandom;
 
 import org.apache.flume.Context;
 import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import junit.framework.Assert;
 


Mime
View raw message