You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by lu...@apache.org on 2015/07/09 10:53:27 UTC
incubator-kylin git commit: Add missing license header
Repository: incubator-kylin
Updated Branches:
refs/heads/v0.7.2-release 6e97e2467 -> 091fb3df9
Add missing license header
Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/091fb3df
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/091fb3df
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/091fb3df
Branch: refs/heads/v0.7.2-release
Commit: 091fb3df9b9b48c5794693dc828d529c9af9b241
Parents: 6e97e24
Author: Luke Han <lu...@apache.org>
Authored: Thu Jul 9 16:53:14 2015 +0800
Committer: Luke Han <lu...@apache.org>
Committed: Thu Jul 9 16:53:14 2015 +0800
----------------------------------------------------------------------
bin/metastore.sh | 17 ++
.../kylin/common/debug/BackdoorToggles.java | 17 ++
.../kylin/common/persistence/RawResource.java | 18 ++
.../apache/kylin/job/tools/RowCounterCLI.java | 17 ++
pom.xml | 170 +++++++++++++++++++
.../checkstyle/checkstyle-java-header.txt | 16 ++
src/main/config/checkstyle/checkstyle.xml | 59 +++++++
src/main/config/checkstyle/suppressions.xml | 32 ++++
8 files changed, 346 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/091fb3df/bin/metastore.sh
----------------------------------------------------------------------
diff --git a/bin/metastore.sh b/bin/metastore.sh
index f08de31..bbb1f42 100644
--- a/bin/metastore.sh
+++ b/bin/metastore.sh
@@ -1,5 +1,22 @@
#!/bin/bash
+#
+# 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.
+#
+
dir=$(dirname ${0})
source ${dir}/check-env.sh
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/091fb3df/common/src/main/java/org/apache/kylin/common/debug/BackdoorToggles.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/kylin/common/debug/BackdoorToggles.java b/common/src/main/java/org/apache/kylin/common/debug/BackdoorToggles.java
index 5760798..e67eb84 100644
--- a/common/src/main/java/org/apache/kylin/common/debug/BackdoorToggles.java
+++ b/common/src/main/java/org/apache/kylin/common/debug/BackdoorToggles.java
@@ -1,3 +1,20 @@
+/*
+ * 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.common.debug;
import java.util.Map;
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/091fb3df/common/src/main/java/org/apache/kylin/common/persistence/RawResource.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/kylin/common/persistence/RawResource.java b/common/src/main/java/org/apache/kylin/common/persistence/RawResource.java
index 2c3238f..131fcfe 100644
--- a/common/src/main/java/org/apache/kylin/common/persistence/RawResource.java
+++ b/common/src/main/java/org/apache/kylin/common/persistence/RawResource.java
@@ -1,3 +1,21 @@
+/*
+ * 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.common.persistence;
import java.io.InputStream;
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/091fb3df/job/src/main/java/org/apache/kylin/job/tools/RowCounterCLI.java
----------------------------------------------------------------------
diff --git a/job/src/main/java/org/apache/kylin/job/tools/RowCounterCLI.java b/job/src/main/java/org/apache/kylin/job/tools/RowCounterCLI.java
index b80063d..524c480 100644
--- a/job/src/main/java/org/apache/kylin/job/tools/RowCounterCLI.java
+++ b/job/src/main/java/org/apache/kylin/job/tools/RowCounterCLI.java
@@ -1,3 +1,20 @@
+/*
+ * 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.job.tools;
import org.apache.hadoop.conf.Configuration;
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/091fb3df/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index cdd8191..5948762 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,6 +41,7 @@
<maven-model.version>3.1.1</maven-model.version>
<maven-release.version>2.5.1</maven-release.version>
<maven-assembly.version>2.4</maven-assembly.version>
+ <maven-license.plugin.version>2.6</maven-license.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -441,6 +442,9 @@
<target>${javaVersion}</target>
</configuration>
</plugin>
+
+
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
@@ -537,13 +541,76 @@
</execution>
</executions>
</plugin>
+ <!-- utility plugins -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly.version}</version>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.15</version>
+ </plugin>
+
</plugins>
</pluginManagement>
+
+ <plugins>
+ <!--
+ <plugin>
+ <groupId>com.mycila</groupId>
+ <artifactId>license-maven-plugin</artifactId>
+ <version>${maven-license.plugin.version}</version>
+ <configuration>
+ <header>License-Header.txt</header>
+ <licenseName>apache_v2</licenseName>
+ <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
+ <canUpdateCopyright>true</canUpdateCopyright>
+ <canUpdateDescription>true</canUpdateDescription>
+ <excludes>
+ <exclude>**/*.diff</exclude>
+ <exclude>*.patch</exclude>
+ <exclude>**/*.log</exclude>
+ <exclude>**/*.data</exclude>
+ <exclude>**/README.*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <!-- Checkstyle Plugin
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>validate</id>
+ <phase>validate</phase>
+ <configuration>
+ <configLocation>src/main/config/checkstyle/checkstyle.xml</configLocation>
+ <suppressionsLocation>src/main/config/checkstyle/suppressions.xml</suppressionsLocation>
+ <consoleOutput>true</consoleOutput>
+ <headerLocation>src/main/config/checkstyle/checkstyle-java-header.txt</headerLocation>
+ <failOnViolation>true</failOnViolation>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ </configuration>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+ </plugins>
+
</build>
<modules>
@@ -603,7 +670,94 @@
<argLine>-Xms1G -Xmx4G -XX:PermSize=128M -XX:MaxPermSize=512M</argLine>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <!-- Apache-RAT checks for files without headers.
+ If run on a messy developer's sandbox, it will fail.
+ This serves as a reminder to only build a release in a clean
+ sandbox! -->
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <configuration>
+ <numUnapprovedLicenses>0</numUnapprovedLicenses>
+ <excludes>
+ <exclude>.idea/**</exclude>
+ <exclude>.git/**</exclude>
+ <exclude>.settings/**</exclude>
+ <!-- text files without comments -->
+ <exclude>**/*.csv</exclude>
+ <exclude>**/*.json</exclude>
+ <exclude>**/*.md</exclude>
+ <!-- binary files -->
+ <exclude>**/*.dict</exclude>
+ <exclude>**/*.dic</exclude>
+ <exclude>**/*.snapshot</exclude>
+ <exclude>**/*.pdf</exclude>
+ <exclude>**/*.log</exclude>
+
+ <exclude>**/.checkstyle</exclude>
+
+ <!-- generated files -->
+ <exclude>**/target/**</exclude>
+ <exclude>lib/**</exclude>
+ <!-- Kylin's website content -->
+ <exclude>**/.sass-cache/**</exclude>
+ <exclude>docs/website/**</exclude>
+
+ <!-- tomcat package -->
+ <exclude>tomcat/**</exclude>
+ <!-- front end libary and generated files -->
+ <exclude>webapp/node_modules/**</exclude>
+ <exclude>webapp/dist/**</exclude>
+ <exclude>webapp/app/components/**</exclude>
+ <!-- json configuration file-->
+ <exclude>webapp/.bowerrc</exclude>
+ <exclude>webapp/.jshintrc</exclude>
+ <!-- generated dict files -->
+ <exclude>dictionary/metastore_db/**</exclude>
+
+ <!-- MIT license -->
+ <exclude>webapp/app/css/AdminLTE-fonts.css</exclude>
+ <exclude>webapp/app/css/AdminLTE.css</exclude>
+
+ <!-- jdbc log -->
+ <exclude>jdbc/kylin_jdbc.log*</exclude>
+
+ <!-- HBase MiniCluster Testing Data, for testing only -->
+ <exclude>examples/test_case_data/minicluster/hbase-export.tar.gz</exclude>
+ <exclude>examples/test_case_data/**/*.xml</exclude>
+
+ </excludes>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-core</artifactId>
+ <version>1.6</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </plugin>
</plugins>
</build>
</profile>
@@ -663,6 +817,14 @@
<id>apache-release</id>
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </plugin>
+
<!-- Override the parent assembly execution to customize the assembly
descriptor and final name. -->
<plugin>
@@ -743,6 +905,8 @@
<exclude>**/*.pdf</exclude>
<exclude>**/*.log</exclude>
+ <exclude>**/.checkstyle</exclude>
+
<!-- generated files -->
<exclude>**/target/**</exclude>
<exclude>lib/**</exclude>
@@ -821,5 +985,11 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>dev</id>
+ <properties>
+ <skipCheck>true</skipCheck>
+ </properties>
+ </profile>
</profiles>
</project>
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/091fb3df/src/main/config/checkstyle/checkstyle-java-header.txt
----------------------------------------------------------------------
diff --git a/src/main/config/checkstyle/checkstyle-java-header.txt b/src/main/config/checkstyle/checkstyle-java-header.txt
new file mode 100644
index 0000000..2a42971
--- /dev/null
+++ b/src/main/config/checkstyle/checkstyle-java-header.txt
@@ -0,0 +1,16 @@
+/*
+ * 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.
+ */
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/091fb3df/src/main/config/checkstyle/checkstyle.xml
----------------------------------------------------------------------
diff --git a/src/main/config/checkstyle/checkstyle.xml b/src/main/config/checkstyle/checkstyle.xml
new file mode 100644
index 0000000..8d46977
--- /dev/null
+++ b/src/main/config/checkstyle/checkstyle.xml
@@ -0,0 +1,59 @@
+<?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.
+-->
+
+<!--
+ This version of checkstyle is based on the Apache Giraph checkstyle
+ configuration, which in turn is based on Hadoop and common-math
+ configurations.
+
+ The documentation for checkstyle is available at
+
+ http://checkstyle.sourceforge.net
+-->
+
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<module name="Checker">
+ <property name="localeLanguage" value="en"/>
+
+ <!-- Checks for headers -->
+ <!-- See http://checkstyle.sf.net/config_header.html -->
+ <!-- Verify that EVERY source file has the appropriate license -->
+ <module name="Header">
+ <property name="headerFile" value="${checkstyle.header.file}"/>
+ </module>
+
+ <!-- Setup special comments to suppress specific checks from source files -->
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="CHECKSTYLE\: stop ([\w\|]+)"/>
+ <property name="onCommentFormat" value="CHECKSTYLE\: resume ([\w\|]+)"/>
+ <property name="checkFormat" value="$1"/>
+ </module>
+
+ <!-- Turn off all checks between OFF and ON -->
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="CHECKSTYLE\: OFF"/>
+ <property name="onCommentFormat" value="CHECKSTYLE\: ON"/>
+ </module>
+
+ <!-- Turn off checks for the next N lines. -->
+ <module name="SuppressWithNearbyCommentFilter">
+ <property name="commentFormat" value="CHECKSTYLE: +IGNORE (\d+)"/>
+ <property name="influenceFormat" value="$1"/>
+ </module>
+</module>
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/091fb3df/src/main/config/checkstyle/suppressions.xml
----------------------------------------------------------------------
diff --git a/src/main/config/checkstyle/suppressions.xml b/src/main/config/checkstyle/suppressions.xml
new file mode 100644
index 0000000..c6edc5f
--- /dev/null
+++ b/src/main/config/checkstyle/suppressions.xml
@@ -0,0 +1,32 @@
+<?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 suppressions PUBLIC
+ "-//Puppy Crawl//DTD Suppressions 1.1//EN"
+ "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
+
+<suppressions>
+ <!-- Suppress javadoc, line length, visibility checks for test code -->
+ <suppress checks="JavadocStyleCheck" files="Test*.java"/>
+ <suppress checks="JavadocTypeCheck" files="Test*.java"/>
+ <suppress checks="LineLength" files="Test*.java"/>
+ <suppress checks="Indentation" files="Test*.java"/>
+ <suppress checks="VisibilityModifier" files="Test*.java"/>
+
+</suppressions>