KYLIN-2428 more cleaning

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

Branch: refs/heads/master
Commit: 8b277d5e492d8d54e6fd1f38eef7cf8d174f2b00
Parents: 0396923
Author: Hongbin Ma <mahong...@apache.org>
Authored: Fri May 5 21:12:46 2017 +0800
Committer: liyang-gmt8 <liy...@apache.org>
Committed: Sun May 7 21:22:28 2017 +0800

----------------------------------------------------------------------
 assembly/pom.xml                                |  4 --
 core-common/pom.xml                             |  5 --
 core-cube/pom.xml                               |  4 +-
 core-dictionary/pom.xml                         |  5 --
 engine-mr/pom.xml                               |  5 --
 engine-spark/pom.xml                            |  8 +--
 kylin-it/pom.xml                                |  5 --
 pom.xml                                         | 60 ++++++++++++-------
 server/pom.xml                                  | 15 -----
 source-hive/pom.xml                             |  5 --
 source-kafka/pom.xml                            |  7 +--
 .../kylin/source/kafka/DateTimeParser.java      | 62 --------------------
 storage-hbase/pom.xml                           |  4 +-
 tool-assembly/pom.xml                           |  5 ++
 14 files changed, 51 insertions(+), 143 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/assembly/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/pom.xml b/assembly/pom.xml
index 121ccee..dae7152 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -207,10 +207,6 @@
                                     
<shadedPattern>${shadeBase}.org.apache.commons.codec</shadedPattern>
                                 </relocation>
                                 <relocation>
-                                    
<pattern>org.apache.commons.collections</pattern>
-                                    
<shadedPattern>${shadeBase}.org.apache.commons.collections</shadedPattern>
-                                </relocation>
-                                <relocation>
                                     <pattern>org.apache.commons.lang3</pattern>
                                     
<shadedPattern>${shadeBase}.org.apache.commons.lang3</shadedPattern>
                                 </relocation>

http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/core-common/pom.xml
----------------------------------------------------------------------
diff --git a/core-common/pom.xml b/core-common/pom.xml
index 55f025f..8852743 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -64,11 +64,6 @@
     
         <!-- Env & Test -->
         <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/core-cube/pom.xml
----------------------------------------------------------------------
diff --git a/core-cube/pom.xml b/core-cube/pom.xml
index cd382ef..930b6cd 100644
--- a/core-cube/pom.xml
+++ b/core-cube/pom.xml
@@ -44,12 +44,12 @@
             <artifactId>kylin-core-dictionary</artifactId>
         </dependency>
 
+
+        <!-- Provided -->
         <dependency>
             <groupId>commons-collections</groupId>
             <artifactId>commons-collections</artifactId>
         </dependency>
-
-        <!-- Provided -->
         <dependency>
             <groupId>commons-lang</groupId>
             <artifactId>commons-lang</artifactId>

http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/core-dictionary/pom.xml
----------------------------------------------------------------------
diff --git a/core-dictionary/pom.xml b/core-dictionary/pom.xml
index 09dde1e..c292982 100644
--- a/core-dictionary/pom.xml
+++ b/core-dictionary/pom.xml
@@ -41,11 +41,6 @@
 
         <!-- Env & Test -->
         <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.kylin</groupId>
             <artifactId>kylin-core-common</artifactId>
             <type>test-jar</type>

http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/engine-mr/pom.xml
----------------------------------------------------------------------
diff --git a/engine-mr/pom.xml b/engine-mr/pom.xml
index 8aab79d..f2cedf6 100644
--- a/engine-mr/pom.xml
+++ b/engine-mr/pom.xml
@@ -55,11 +55,6 @@
         <!-- Env & Test -->
         <dependency>
             <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-hdfs</artifactId>
             <scope>provided</scope>
             <!-- protobuf version conflict with hbase -->

http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/engine-spark/pom.xml
----------------------------------------------------------------------
diff --git a/engine-spark/pom.xml b/engine-spark/pom.xml
index c5d23ce..93b6f9b 100644
--- a/engine-spark/pom.xml
+++ b/engine-spark/pom.xml
@@ -69,12 +69,6 @@
 
         <!-- Hadoop dependency -->
         <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
             <groupId>org.apache.hbase</groupId>
             <artifactId>hbase-common</artifactId>
             <scope>provided</scope>
@@ -120,4 +114,4 @@
         </dependency>
     </dependencies>
 
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/kylin-it/pom.xml
----------------------------------------------------------------------
diff --git a/kylin-it/pom.xml b/kylin-it/pom.xml
index 0ede4ff..e82867f 100644
--- a/kylin-it/pom.xml
+++ b/kylin-it/pom.xml
@@ -154,11 +154,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-annotations</artifactId>
             <scope>provided</scope>
         </dependency>

http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4e5956d..2fcc6fa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,8 +78,9 @@
         <jsch.version>0.1.53</jsch.version>
         <commons-cli.version>1.2</commons-cli.version>
         <commons-lang.version>2.6</commons-lang.version>
-        <commons-io.version>2.5</commons-io.version>
-        <commons-math3.version>3.6.1</commons-math3.version>
+        <commons-io.version>2.4</commons-io.version>
+        <commons-math3.version>3.1.1</commons-math3.version>
+        <commons-collections.version>3.2.2</commons-collections.version>
 
         <!-- Calcite deps, keep compatible with calcite.version -->
         <jackson.version>2.6.3</jackson.version>
@@ -95,8 +96,6 @@
 
         <!-- Commons -->
         <commons-lang3.version>3.4</commons-lang3.version>
-        <commons-collections.version>3.2.2</commons-collections.version>
-        <commons-daemon.version>1.0.15</commons-daemon.version>
         <commons-email.version>1.4</commons-email.version>
 
         <!-- Utility -->
@@ -342,7 +341,7 @@
                 <groupId>org.apache.hadoop</groupId>
                 <artifactId>hadoop-common</artifactId>
                 <version>${hadoop2.version}</version>
-                <scope>compile</scope>
+                <scope>provided</scope>
                 <exclusions>
                     <exclusion>
                         <groupId>javax.servlet</groupId>
@@ -352,6 +351,10 @@
                         <groupId>net.java.dev.jets3t</groupId>
                         <artifactId>jets3t</artifactId>
                     </exclusion>
+                    <exclusion>
+                        <groupId>javax.servlet.jsp</groupId>
+                        <artifactId>jsp-api</artifactId>
+                    </exclusion>
                 </exclusions>
             </dependency>
             <dependency>
@@ -466,6 +469,12 @@
                 <version>${commons-io.version}</version>
                 <scope>provided</scope>
             </dependency>
+            <dependency>
+                <groupId>commons-collections</groupId>
+                <artifactId>commons-collections</artifactId>
+                <version>${commons-collections.version}</version>
+                <scope>provided</scope>
+            </dependency>
 
             <!-- HBase2 dependencies -->
             <dependency>
@@ -603,16 +612,6 @@
                 <version>${commons-lang3.version}</version>
             </dependency>
             <dependency>
-                <groupId>commons-collections</groupId>
-                <artifactId>commons-collections</artifactId>
-                <version>${commons-collections.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>commons-daemon</groupId>
-                <artifactId>commons-daemon</artifactId>
-                <version>${commons-daemon.version}</version>
-            </dependency>
-            <dependency>
                 <groupId>org.apache.commons</groupId>
                 <artifactId>commons-email</artifactId>
                 <version>${commons-email.version}</version>
@@ -828,6 +827,11 @@
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
         </dependency>
+        <!--for transitive dependencies like commons-collectinos, commons-lang 
-->
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-common</artifactId>
+        </dependency>
     </dependencies>
 
     <repositories>
@@ -861,7 +865,6 @@
             </releases>
             <snapshots>
                 <enabled>true</enabled>
-                <updatePolicy>always</updatePolicy>
             </snapshots>
         </repository>
     </repositories>
@@ -926,11 +929,6 @@
                 </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-dependency-plugin</artifactId>
-                    <version>2.10</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-antrun-plugin</artifactId>
                 </plugin>
                 <plugin>
@@ -1046,6 +1044,11 @@
                     <artifactId>spring-boot-maven-plugin</artifactId>
                     <version>1.3.6.RELEASE</version>
                 </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-dependency-plugin</artifactId>
+                    <version>2.10</version>
+                </plugin>
             </plugins>
         </pluginManagement>
         <plugins>
@@ -1057,6 +1060,21 @@
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>findbugs-maven-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>analyze</id>
+                        <goals>
+                            <goal>analyze-only</goal>
+                        </goals>
+                        <!--<configuration>-->
+                        <!--<failOnWarning>true</failOnWarning>-->
+                        <!--</configuration>-->
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/server/pom.xml
----------------------------------------------------------------------
diff --git a/server/pom.xml b/server/pom.xml
index afa96e8..652efc2 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -120,21 +120,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-common</artifactId>
-            <scope>provided</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>javax.servlet</groupId>
-                    <artifactId>servlet-api</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>javax.servlet.jsp</groupId>
-                    <artifactId>jsp-api</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-mapreduce-client-core</artifactId>
             <scope>provided</scope>
             <exclusions>

http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/source-hive/pom.xml
----------------------------------------------------------------------
diff --git a/source-hive/pom.xml b/source-hive/pom.xml
index 6e1693b..abe8af5 100644
--- a/source-hive/pom.xml
+++ b/source-hive/pom.xml
@@ -48,11 +48,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
             <scope>provided</scope>
         </dependency>

http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/source-kafka/pom.xml
----------------------------------------------------------------------
diff --git a/source-kafka/pom.xml b/source-kafka/pom.xml
index 4c222cb..e4ca76f 100644
--- a/source-kafka/pom.xml
+++ b/source-kafka/pom.xml
@@ -51,11 +51,6 @@
         <!-- Env & Test -->
         <dependency>
             <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-common</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
             <scope>provided</scope>
         </dependency>
@@ -73,4 +68,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/source-kafka/src/main/java/org/apache/kylin/source/kafka/DateTimeParser.java
----------------------------------------------------------------------
diff --git 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/DateTimeParser.java 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/DateTimeParser.java
deleted file mode 100644
index 3382783..0000000
--- 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/DateTimeParser.java
+++ /dev/null
@@ -1,62 +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.
-*/
-
-package org.apache.kylin.source.kafka;
-
-import org.apache.commons.lang3.time.FastDateFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Map;
-
-/**
- */
-public class DateTimeParser extends AbstractTimeParser {
-
-    private static final Logger logger = 
LoggerFactory.getLogger(DateTimeParser.class);
-    private String tsPattern  = null;
-
-    private FastDateFormat formatter = null;
-
-    //call by reflection
-    public DateTimeParser(Map<String, String> properties) {
-        super(properties);
-        tsPattern = properties.get(StreamingParser.PROPERTY_TS_PATTERN);
-
-        try {
-            formatter = 
org.apache.kylin.common.util.DateFormat.getDateFormat(tsPattern);
-        } catch (Throwable e) {
-            throw new IllegalStateException("Invalid tsPattern: '" + tsPattern 
+ "'.");
-        }
-    }
-
-    /**
-     * Parse a string time to a long value (epoch time)
-     *
-     * @param timeStr
-     * @return
-     */
-    public long parseTime(String timeStr) throws IllegalArgumentException {
-
-        try {
-            return formatter.parse(timeStr).getTime();
-        } catch (Throwable e) {
-            throw new IllegalArgumentException("Invalid value: pattern: '" + 
tsPattern + "', value: '" + timeStr + "'", e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/storage-hbase/pom.xml
----------------------------------------------------------------------
diff --git a/storage-hbase/pom.xml b/storage-hbase/pom.xml
index 6c99101..54bb2a4 100644
--- a/storage-hbase/pom.xml
+++ b/storage-hbase/pom.xml
@@ -17,7 +17,8 @@
  limitations under the License.
 -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+<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>
 
@@ -37,6 +38,7 @@
     </properties>
 
     <dependencies>
+
         <dependency>
             <groupId>org.apache.kylin</groupId>
             <artifactId>kylin-engine-mr</artifactId>

http://git-wip-us.apache.org/repos/asf/kylin/blob/8b277d5e/tool-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/tool-assembly/pom.xml b/tool-assembly/pom.xml
index 0adf26e..0595bdd 100644
--- a/tool-assembly/pom.xml
+++ b/tool-assembly/pom.xml
@@ -61,6 +61,7 @@
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
+            <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
@@ -119,6 +120,10 @@
                                     
<shadedPattern>${shadeBase}.org.apache.commons.lang</shadedPattern>
                                 </relocation>
                                 <relocation>
+                                    <pattern>org.apache.commons.lang3</pattern>
+                                    
<shadedPattern>${shadeBase}.org.apache.commons.lang3</shadedPattern>
+                                </relocation>
+                                <relocation>
                                     <pattern>org.apache.http</pattern>
                                     
<shadedPattern>${shadeBase}.org.apache.http</shadedPattern>
                                 </relocation>

Reply via email to