This is an automated email from the ASF dual-hosted git repository.
xxyu pushed a commit to branch kylin-on-parquet-v2
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/kylin-on-parquet-v2 by this
push:
new 3d14e97 KYLIN-4680 Avoid annoying log messages of unit test and
integration test
3d14e97 is described below
commit 3d14e97233f8d4074e34690b1a89b1d63c76fd68
Author: rupengwang <[email protected]>
AuthorDate: Tue Aug 4 16:08:12 2020 +0800
KYLIN-4680 Avoid annoying log messages of unit test and integration test
---
.../kylin/engine/spark/job/SparkCubingJobTest.java | 1 +
.../src/test/resources/log4j.properties | 30 ++++++++++++++++++++++
.../spark2/NManualBuildAndQueryCuboidTest.java | 1 +
3 files changed, 32 insertions(+)
diff --git
a/kylin-spark-project/kylin-spark-engine/src/test/java/org/apache/kylin/engine/spark/job/SparkCubingJobTest.java
b/kylin-spark-project/kylin-spark-engine/src/test/java/org/apache/kylin/engine/spark/job/SparkCubingJobTest.java
index 6a36ecb..7b82b59 100644
---
a/kylin-spark-project/kylin-spark-engine/src/test/java/org/apache/kylin/engine/spark/job/SparkCubingJobTest.java
+++
b/kylin-spark-project/kylin-spark-engine/src/test/java/org/apache/kylin/engine/spark/job/SparkCubingJobTest.java
@@ -66,6 +66,7 @@ public class SparkCubingJobTest extends
LocalWithSparkSessionTest {
@Override
public void setup() throws SchedulerException {
super.setup();
+ ss.sparkContext().setLogLevel("WARN");
kylinConfig = KylinConfig.getInstanceFromEnv();
kylinConfig.setProperty("kylin.source.provider.0",
"org.apache.kylin.engine.spark.source.HiveSource");
cubeMgr = CubeManager.getInstance(kylinConfig);
diff --git
a/kylin-spark-project/kylin-spark-engine/src/test/resources/log4j.properties
b/kylin-spark-project/kylin-spark-engine/src/test/resources/log4j.properties
new file mode 100644
index 0000000..824aab8
--- /dev/null
+++ b/kylin-spark-project/kylin-spark-engine/src/test/resources/log4j.properties
@@ -0,0 +1,30 @@
+#
+# 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.
+#
+
+log4j.rootLogger=INFO,stderr
+
+log4j.appender.stderr=org.apache.log4j.ConsoleAppender
+log4j.appender.stderr.Target=System.out
+log4j.appender.stderr.layout=org.apache.log4j.PatternLayout
+#Don't add line number (%L) as it's too costly!
+log4j.appender.stderr.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2} :
%m%n
+
+log4j.logger.org.apache.kylin=DEBUG
+log4j.logger.org.springframework=WARN
+log4j.logger.org.apache.spark=ERROR
+log4j.logger.org.apache.kylin.engine.spark.builder=WARN
diff --git
a/kylin-spark-project/kylin-spark-test/src/test/java/org/apache/kylin/engine/spark2/NManualBuildAndQueryCuboidTest.java
b/kylin-spark-project/kylin-spark-test/src/test/java/org/apache/kylin/engine/spark2/NManualBuildAndQueryCuboidTest.java
index c144e4a..8bcdd49 100644
---
a/kylin-spark-project/kylin-spark-test/src/test/java/org/apache/kylin/engine/spark2/NManualBuildAndQueryCuboidTest.java
+++
b/kylin-spark-project/kylin-spark-test/src/test/java/org/apache/kylin/engine/spark2/NManualBuildAndQueryCuboidTest.java
@@ -62,6 +62,7 @@ public class NManualBuildAndQueryCuboidTest extends
NManualBuildAndQueryTest {
@Override
public void setup() throws SchedulerException {
super.setup();
+ ss.sparkContext().setLogLevel("WARN");
System.setProperty("spark.local", "true");
System.setProperty("noBuild", "false");
System.setProperty("isDeveloperMode", "false");