This is an automated email from the ASF dual-hosted git repository.

pfzhan pushed a commit to branch kylin5
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/kylin5 by this push:
     new 667298a63d fix (#2327)
667298a63d is described below

commit 667298a63dca07be68b08196ddc5d29a70f4752b
Author: Pengfei.Zhan <dethr...@gmail.com>
AuthorDate: Mon Mar 10 16:54:46 2025 +0800

    fix (#2327)
---
 dev-support/checkstyle-apache.xml                  |  13 ++-
 ...pache-header.txt => checkstyle-java-header.txt} |   0
 dev-support/checkstyle-prop-header.txt             |  16 ++++
 dev-support/checkstyle-xml-header.txt              |  16 ++++
 pom.xml                                            |  23 +----
 .../src/main/resources/config/init_min.properties  |   1 +
 src/jdbc/src/main/resources/kylin-jdbc.properties  |  15 ++-
 .../resources/org-apache-kylin-jdbc.properties     |  15 ++-
 .../src/main/resources/config/init.properties      |  34 +++----
 .../src/main/resources/config/init_min.properties  |  34 +++----
 .../datasources/json/QueryRecHistorySchema.scala   | 103 ---------------------
 11 files changed, 96 insertions(+), 174 deletions(-)

diff --git a/dev-support/checkstyle-apache.xml 
b/dev-support/checkstyle-apache.xml
index d1c0032962..6909f02ef5 100644
--- a/dev-support/checkstyle-apache.xml
+++ b/dev-support/checkstyle-apache.xml
@@ -28,10 +28,17 @@
     </module>
 
     <module name="Header">
-        <property name="headerFile" 
value="dev-support/checkstyle-apache-header.txt"/>
-        <property name="fileExtensions" value="java"/>
+        <property name="headerFile" 
value="dev-support/checkstyle-java-header.txt"/>
+        <property name="fileExtensions" value="java, scala"/>
+    </module>
+    <module name="Header">
+        <property name="headerFile" 
value="dev-support/checkstyle-prop-header.txt"/>
+        <property name="fileExtensions" value="properties"/>
+    </module>
+    <module name="Header">
+        <property name="headerFile" 
value="dev-support/checkstyle-xml-header.txt"/>
+        <property name="fileExtensions" value="xml"/>
     </module>
-
     <module name="FileTabCharacter"/>
     <module name="SuppressWarningsFilter"/>
     <module name="NewlineAtEndOfFile"/>
diff --git a/dev-support/checkstyle-apache-header.txt 
b/dev-support/checkstyle-java-header.txt
similarity index 100%
rename from dev-support/checkstyle-apache-header.txt
rename to dev-support/checkstyle-java-header.txt
diff --git a/dev-support/checkstyle-prop-header.txt 
b/dev-support/checkstyle-prop-header.txt
new file mode 100644
index 0000000000..cce3acad34
--- /dev/null
+++ b/dev-support/checkstyle-prop-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.
+#
diff --git a/dev-support/checkstyle-xml-header.txt 
b/dev-support/checkstyle-xml-header.txt
new file mode 100644
index 0000000000..9af6e8733c
--- /dev/null
+++ b/dev-support/checkstyle-xml-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.
+-->
diff --git a/pom.xml b/pom.xml
index 8ad6215186..3071825103 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,8 @@
   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/maven-v4_0_0.xsd";>
+<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/maven-v4_0_0.xsd";>
 
     <parent>
         <!-- https://infra.apache.org/publishing-maven-artifacts.html -->
@@ -3390,6 +3391,9 @@
                                 
<configLocation>dev-support/checkstyle-apache.xml</configLocation>
                                 
<suppressionsLocation>dev-support/checkstyle-apache-suppressions.xml
                                 </suppressionsLocation>
+                                <includes>
+                                    
src/main/java/**/*.java,src/main/scala/**/*.scala,src/main/scala/**/*.java,src/test/java/**/*.java,src/test/scala/**/*.scala,src/test/scala/**/*.java
+                                </includes>
                                 
<includeTestSourceDirectory>true</includeTestSourceDirectory>
                                 <consoleOutput>true</consoleOutput>
                                 <failsOnError>true</failsOnError>
@@ -3972,23 +3976,6 @@
                                 <exclude>**/*.bmp</exclude>
 
                                 
<exclude>src/main/codegen/javacc/org/apache/kylin/query/util/CommentParser.jj</exclude>
-
-                                <!-- protobuf generated -->
-                                <exclude>
-                                    
src/main/java/org/apache/kylin/storage/hbase/ii/coprocessor/endpoint/generated/IIProtos.java
-                                </exclude>
-                                <exclude>
-                                    
src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/generated/FilterProtosExt.java
-                                </exclude>
-                                <exclude>
-                                    
src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/generated/CubeVisitProtos.java
-                                </exclude>
-                                <exclude>
-                                    
storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/generated/CubeVisitProtos.java
-                                </exclude>
-                                <exclude>
-                                    examples/test_case_data/sample_local/UUID
-                                </exclude>
                             </excludes>
                         </configuration>
                         <executions>
diff --git a/src/common-booter/src/main/resources/config/init_min.properties 
b/src/common-booter/src/main/resources/config/init_min.properties
index b96d781a51..1f10abe807 100644
--- a/src/common-booter/src/main/resources/config/init_min.properties
+++ b/src/common-booter/src/main/resources/config/init_min.properties
@@ -14,6 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+
 kylin.metadata.url=${KYLIN_METADATA_URL}
 kylin.metadata.audit-log.max-size=3000000
 kylin.metadata.ops-cron=0 0 0 * * *
diff --git a/src/jdbc/src/main/resources/kylin-jdbc.properties 
b/src/jdbc/src/main/resources/kylin-jdbc.properties
index 006f204282..e656ed8954 100644
--- a/src/jdbc/src/main/resources/kylin-jdbc.properties
+++ b/src/jdbc/src/main/resources/kylin-jdbc.properties
@@ -1,13 +1,12 @@
 #
-# 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
+# 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
+#    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,
diff --git a/src/jdbc/src/main/resources/org-apache-kylin-jdbc.properties 
b/src/jdbc/src/main/resources/org-apache-kylin-jdbc.properties
index 6bf75836fe..51f0b9d58e 100644
--- a/src/jdbc/src/main/resources/org-apache-kylin-jdbc.properties
+++ b/src/jdbc/src/main/resources/org-apache-kylin-jdbc.properties
@@ -1,13 +1,12 @@
 #
-# 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
+# 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
+#    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,
diff --git a/src/rec-booter/src/main/resources/config/init.properties 
b/src/rec-booter/src/main/resources/config/init.properties
index 6b200e7a36..6f966e92b7 100644
--- a/src/rec-booter/src/main/resources/config/init.properties
+++ b/src/rec-booter/src/main/resources/config/init.properties
@@ -1,20 +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.
-##
+#
+# 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.
+#
+
 kylin.metadata.url=${KYLIN_METADATA_URL}
 kylin.metadata.audit-log.max-size=3000000
 kylin.metadata.ops-cron=0 0 0 * * *
diff --git a/src/rec-booter/src/main/resources/config/init_min.properties 
b/src/rec-booter/src/main/resources/config/init_min.properties
index 653ae24db3..a41dbd9a2f 100644
--- a/src/rec-booter/src/main/resources/config/init_min.properties
+++ b/src/rec-booter/src/main/resources/config/init_min.properties
@@ -1,20 +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.
-##
+#
+# 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.
+#
+
 kylin.metadata.url=${KYLIN_METADATA_URL}
 kylin.metadata.audit-log.max-size=3000000
 kylin.metadata.ops-cron=0 0 0 * * *
diff --git 
a/src/spark-project/engine-spark/src/main/scala/org/apache/spark/sql/execution/datasources/json/QueryRecHistorySchema.scala
 
b/src/spark-project/engine-spark/src/main/scala/org/apache/spark/sql/execution/datasources/json/QueryRecHistorySchema.scala
deleted file mode 100644
index cf0edc6683..0000000000
--- 
a/src/spark-project/engine-spark/src/main/scala/org/apache/spark/sql/execution/datasources/json/QueryRecHistorySchema.scala
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-* Copyright (C) 2016 Kyligence Inc. All rights reserved.
-*
-* http://kyligence.io
-*
-* This software is the confidential and proprietary information of
-* Kyligence Inc. ("Confidential Information"). You shall not disclose
-* such Confidential Information and shall use it only in accordance
-* with the terms of the license agreement you entered into with
-* Kyligence Inc.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-package org.apache.spark.sql.execution.datasources.json
-
-import org.apache.spark.sql.types._
-
-object QueryRecHistorySchema {
-  def queryRecHistorySchema(): StructType = {
-    val recDetailInfoMeta = Array(
-      StructField("modelId", StringType, nullable = false),
-      StructField("semanticVersion", IntegerType, nullable = false),
-      StructField("layouts", ArrayType(layoutRecInfoSchema())),
-      StructField("layoutRecs", ArrayType(layoutRecInfoSchema()))
-    )
-
-    StructType(Array(
-      StructField("queryTime", LongType),
-      StructField("cpuTime", LongType),
-      StructField("duration", LongType),
-      StructField("recDetailMap", MapType(StringType, 
DataTypes.createStructType(recDetailInfoMeta)))
-    ))
-  }
-
-  def layoutRecInfoSchema(): StructType = {
-    val recMeasureMeta = Array(
-      StructField("name", StringType),
-      StructField("function", DataTypes.createStructType(
-        Array(
-          StructField("expression", StringType),
-          StructField("parameters", ArrayType(DataTypes.createStructType(
-            Array(
-              StructField("type", StringType),
-              StructField("value", StringType)
-            ),
-          )
-          )
-          ))
-      )
-      ),
-      StructField("column", StringType)
-    )
-    DataTypes.createStructType(Array(
-      StructField("uniqueId", StringType, nullable = false),
-      StructField("columns", ArrayType(StringType)),
-      StructField("dimensions", ArrayType(StringType)),
-      StructField("shardBy", ArrayType(StringType)),
-      StructField("sortBy", ArrayType(StringType)),
-      StructField("measures", 
ArrayType(DataTypes.createStructType(recMeasureMeta))),
-      StructField("ccExpression", DataTypes.createMapType(StringType, 
StringType)),
-      StructField("ccType", DataTypes.createMapType(StringType, StringType))
-    ))
-  }
-
-  def flatRecInfoSchema(): StructType = {
-    StructType(Array(
-      StructField("recId", StringType, nullable = false),
-      StructField("day", StringType, nullable = false),
-      StructField("cpuTime", LongType, nullable = false),
-      StructField("detailInfo", layoutRecInfoSchema(), nullable = false)
-    ))
-  }
-
-  def flatRecInfoSchema2(): StructType = {
-    StructType(Array(
-      StructField("recId", StringType, nullable = false),
-      StructField("cpuTime", LongType, nullable = false),
-      StructField("recInfo", layoutRecInfoSchema(), nullable = false)
-    ))
-  }
-
-  def dailyStatsSchema(): StructType = {
-    StructType(Array(
-      StructField("recId", StringType, nullable = false),
-      StructField("countNum", LongType, nullable = false),
-      StructField("sumCpuTime", LongType, nullable = false),
-      StructField("day", StringType, nullable = false),
-      StructField("detailInfo", layoutRecInfoSchema(), nullable = false)
-    ))
-  }
-
-}

Reply via email to