在AWS中使用Pyspark,Ipython,如何抑制常量输出流?

时间:2015-02-20 00:01:53

标签: amazon-web-services apache-spark ipython pyspark

我通过以下方式在AWS ec2实例中在ipython中启动了pyspark:

IPYTHON=1 ./spark/bin/pyspark

Ipython发布,事情似乎有效。然而,现在发生的事情是,即使我没有做任何事情,我也会得到这种持续的反馈流:

15/02/19 23:47:34 INFO client.AppClient$ClientActor: Executor updated: app- 
20150219234524-0001/46 is now LOADING
15/02/19 23:47:34 INFO client.AppClient$ClientActor: Executor updated: app-   
20150219234524-0001/38 is now EXITED (Command exited with code 1)
15/02/19 23:47:34 INFO cluster.SparkDeploySchedulerBackend: Executor app-
20150219234524-0001/38 removed: Command exited with code 1
15/02/19 23:47:34 ERROR cluster.SparkDeploySchedulerBackend: Asked to remove 
non-existent executor 38
15/02/19 23:47:34 INFO client.AppClient$ClientActor: Executor added: app-
20150219234524-0001/47 on worker-20150219205401-ip-172-31-57-   
73.ec2.internal-40221 (ip-172-31-57-73.ec2.internal:40221) with 4 cores
15/02/19 23:47:34 INFO cluster.SparkDeploySchedulerBackend: Granted executor 
ID app-20150219234524-0001/47 on hostPort ip-172-31-57-73.ec2.internal:40221 
with 4 cores, 12.7 GB RAM

我仍然可以运行命令。只需按几次输入即可显示命令行。然而,不断滚动的大量文本使事情变得困难。有没有办法压制这种反馈?

1 个答案:

答案 0 :(得分:0)

两种方法:

  • 将log4j级别设置为OFF,最简单的方法是在spark-defaults.conf中设置它,例如:

spark.driver.extraJavaOptions -Dspark.driver.log.level=OFF

  • 将它传递给/ dev / null或者以通常的方式更好地理解文件。

前者你也可以通过命令行设置。