2016-03-14 103 views
0

我真的:火花提交信息的日誌

/home/ubuntu/spark-1.2.1/bin/spark-submit --master spark://11.11.11.11:7077 --driver-class-path /home/ubuntu/spark-cassandra-connector-java-assembly-1.2.1-FAT.jar --class "$class" "$jar 

而且我得到的輸出很多日誌:

> 16/03/14 09:59:53 INFO AppClient$ClientActor: Connecting to master 
> spark://11.11.11.11:7077... 16/03/14 09:59:54 INFO 
> SparkDeploySchedulerBackend: Connected to Spark cluster with app ID 
> app-20160314095954-0001 16/03/14 09:59:54 INFO AppClient$ClientActor: 
> Executor added: app-20160314095954-0001/0 on 
> worker-20160314095247-ip-11.11.11.11.ec2.internal-54560 (ip 
> -11.11.11.11.ec2.internal:54560) with 4 cores 16/03/14 09:59:54 INFO SparkDeploySchedulerBackend: Granted executor ID 
> app-20160314095954-0001/0 on hostPort 
> ip-11.11.11.11.ec2.internal:54560 with 4 cores, 10.0 GB RAM 16/03/14 
> 09:59:54 INFO AppClient$ClientActor: Executor added: 
> app-20160314095954-0001/1 on 
> worker-20160314095247-ip-11.11.11.11.ec2.internal-46194 (ip 
> -11.11.11.11.ec2.internal:46194) with 4 cores 16/03/14 09:59:54 INFO SparkDeploySchedulerBackend: Granted executor ID 
> app-20160314095954-0001/1 on hostPort 
> ip-11.11.11.11.ec2.internal:46194 with 4 cores, 10.0 GB RAM 16/03/14 
> 09:59:54 INFO AppClient$ClientActor: Executor added: 
> app-20160314095954-0001/2 on 
> worker-20160314095247-ip-11.11.11.11.ec2.internal-38895 (ip 
> -11.11.11.11.ec2.internal:38895) with 4 cores 16/03/14 09:59:54 INFO SparkDeploySchedulerBackend: Granted executor ID 
> app-20160314095954-0001/2 on hostPort 
> ip-11.11.11.11.ec2.internal:38895 with 4 cores, 10.0 GB RAM 16/03/14 
> 09:59:54 INFO AppClient$ClientActor: Executor updated: 
> app-20160314095954-0001/1 is now LOADING 16/03/14 09:59:54 INFO 
> AppClient$ClientActor: Executor updated: app-20160314095954-0001/0 is 
> now LOADING 16/03/14 09:59:54 INFO AppClient$ClientActor: Executor 
> updated: app-20160314095954-0001/2 is now LOADING 16/03/14 09:59:54 
> INFO AppClient$ClientActor: Executor updated: 
> app-20160314095954-0001/0 is now RUNNING 16/03/14 09:59:54 INFO 
> AppClient$ClientActor: Executor updated: app-20160314095954-0001/1 is 
> now RUNNING 16/03/14 09:59:54 INFO AppClient$ClientActor: Executor 
> updated: app-20160314095954-0001/2 is now RUNNING 

如何禁用INFO日誌?

回答

1

您可以創建log4j.xml文件在你的JAR的資源,補充一點:

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> 
    <logger name="org.apache.spark"> 
     <level value="warn"/> 
    </logger> 
</log4j:configuration> 

其將所有的org.apache.spark消息的默認記錄水平WARN

+0

謝謝你,它的工作。 – Rada