在本地开发测试Spark Streaming 的时候 日志信息输出太多,不方便查看数据流的输出
- 方法一
val conf = new SparkConf().setMaster("local[2]").setAppName("NetworkWordCount")
val ssc = new StreamingContext(conf, Seconds(5))
//日志输出
ssc.sparkContext.setLogLevel("ERROR")
- 方法二
修改 log4j.properties INFO 改为 ERRO
其中 log4j.properties是从 $SPARK_HOME/conf 下拿的
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional ERRORrmation 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