- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在加载 Spark Framework 时遇到了问题,有这种日志。log4j 有问题,我不知道发生了什么。你能给我一些如何解决问题并正确运行的建议吗?
C:\dev\spark-1.6.0-bin-hadoop2.6\bin>spark-shell
log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.li
b.MutableMetricsFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more in
fo.
Using Spark's repl log4j profile: org/apache/spark/log4j-defaults-repl.propertie
s
To adjust logging level use sc.setLogLevel("INFO")
Welcome to
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ `/ __/ '_/
/___/ .__/\_,_/_/ /_/\_\ version 1.6.0
/_/
Using Scala version 2.10.5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_73)
Type in expressions to have them evaluated.
Type :help for more information.
Spark context available as sc.
16/02/25 22:20:12 WARN General: Plugin (Bundle) "org.datanucleus" is already reg
istered. Ensure you dont have multiple JAR versions of the same plugin in the cl
asspath. The URL "file:/C:/dev/spark-1.6.0-bin-hadoop2.6/bin/../lib/datanucleus-
core-3.2.10.jar" is already registered, and you are trying to register an identi
cal plugin located at URL "file:/C:/dev/spark-1.6.0-bin-hadoop2.6/lib/datanucleu
s-core-3.2.10.jar."
16/02/25 22:20:12 WARN General: Plugin (Bundle) "org.datanucleus.store.rdbms" is
already registered. Ensure you dont have multiple JAR versions of the same plug
in in the classpath. The URL "file:/C:/dev/spark-1.6.0-bin-hadoop2.6/lib/datanuc
leus-rdbms-3.2.9.jar" is already registered, and you are trying to register an i
dentical plugin located at URL "file:/C:/dev/spark-1.6.0-bin-hadoop2.6/bin/../li
b/datanucleus-rdbms-3.2.9.jar."
16/02/25 22:20:12 WARN General: Plugin (Bundle) "org.datanucleus.api.jdo" is alr
eady registered. Ensure you dont have multiple JAR versions of the same plugin i
n the classpath. The URL "file:/C:/dev/spark-1.6.0-bin-hadoop2.6/lib/datanucleus
-api-jdo-3.2.6.jar" is already registered, and you are trying to register an ide
ntical plugin located at URL "file:/C:/dev/spark-1.6.0-bin-hadoop2.6/bin/../lib/
datanucleus-api-jdo-3.2.6.jar."
16/02/25 22:20:13 WARN Connection: BoneCP specified but not present in CLASSPATH
(or one of dependencies)
16/02/25 22:20:13 WARN Connection: BoneCP specified but not present in CLASSPATH
(or one of dependencies)
16/02/25 22:20:21 WARN ObjectStore: Version information not found in metastore.
hive.metastore.schema.verification is not enabled so recording the schema versio
n 1.2.0
16/02/25 22:20:21 WARN ObjectStore: Failed to get database default, returning No
SuchObjectException
16/02/25 22:20:22 WARN : Your hostname, iMEiL resolves to a loopback/non-reachab
le address: fe80:0:0:0:19ea:ffe2:e70c:3da7%wlan1, but we couldn't find any exter
nal IP address!
java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.jav
a:522)
at org.apache.spark.sql.hive.client.ClientWrapper.<init>(ClientWrapper.s
cala:194)
at org.apache.spark.sql.hive.client.IsolatedClientLoader.createClient(Is
olatedClientLoader.scala:238)
at org.apache.spark.sql.hive.HiveContext.executionHive$lzycompute(HiveCo
ntext.scala:218)
at org.apache.spark.sql.hive.HiveContext.executionHive(HiveContext.scala
:208)
at org.apache.spark.sql.hive.HiveContext.functionRegistry$lzycompute(Hiv
eContext.scala:462)
at org.apache.spark.sql.hive.HiveContext.functionRegistry(HiveContext.sc
ala:461)
at org.apache.spark.sql.UDFRegistration.<init>(UDFRegistration.scala:40)
at org.apache.spark.sql.SQLContext.<init>(SQLContext.scala:330)
at org.apache.spark.sql.hive.HiveContext.<init>(HiveContext.scala:90)
at org.apache.spark.sql.hive.HiveContext.<init>(HiveContext.scala:101)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.spark.repl.SparkILoop.createSQLContext(SparkILoop.scala:10
28)
at $iwC$$iwC.<init>(<console>:15)
at $iwC.<init>(<console>:24)
at <init>(<console>:26)
at .<init>(<console>:30)
at .<clinit>(<console>)
at .<init>(<console>:7)
at .<clinit>(<console>)
at $print(<console>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.spark.repl.SparkIMain$ReadEvalPrint.call(SparkIMain.scala:
1065)
at org.apache.spark.repl.SparkIMain$Request.loadAndRun(SparkIMain.scala:
1346)
at org.apache.spark.repl.SparkIMain.loadAndRunReq$1(SparkIMain.scala:840
)
at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:871)
at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:819)
at org.apache.spark.repl.SparkILoop.reallyInterpret$1(SparkILoop.scala:8
57)
at org.apache.spark.repl.SparkILoop.interpretStartingWith(SparkILoop.sca
la:902)
at org.apache.spark.repl.SparkILoop.command(SparkILoop.scala:814)
at org.apache.spark.repl.SparkILoopInit$$anonfun$initializeSpark$1.apply
(SparkILoopInit.scala:132)
at org.apache.spark.repl.SparkILoopInit$$anonfun$initializeSpark$1.apply
(SparkILoopInit.scala:124)
at org.apache.spark.repl.SparkIMain.beQuietDuring(SparkIMain.scala:324)
at org.apache.spark.repl.SparkILoopInit$class.initializeSpark(SparkILoop
Init.scala:124)
at org.apache.spark.repl.SparkILoop.initializeSpark(SparkILoop.scala:64)
at org.apache.spark.repl.SparkILoop$$anonfun$org$apache$spark$repl$Spark
ILoop$$process$1$$anonfun$apply$mcZ$sp$5.apply$mcV$sp(SparkILoop.scala:974)
at org.apache.spark.repl.SparkILoopInit$class.runThunks(SparkILoopInit.s
cala:159)
at org.apache.spark.repl.SparkILoop.runThunks(SparkILoop.scala:64)
at org.apache.spark.repl.SparkILoopInit$class.postInitialization(SparkIL
oopInit.scala:108)
at org.apache.spark.repl.SparkILoop.postInitialization(SparkILoop.scala:
64)
at org.apache.spark.repl.SparkILoop$$anonfun$org$apache$spark$repl$Spark
ILoop$$process$1.apply$mcZ$sp(SparkILoop.scala:991)
at org.apache.spark.repl.SparkILoop$$anonfun$org$apache$spark$repl$Spark
ILoop$$process$1.apply(SparkILoop.scala:945)
at org.apache.spark.repl.SparkILoop$$anonfun$org$apache$spark$repl$Spark
ILoop$$process$1.apply(SparkILoop.scala:945)
at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClass
Loader.scala:135)
at org.apache.spark.repl.SparkILoop.org$apache$spark$repl$SparkILoop$$pr
ocess(SparkILoop.scala:945)
at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:1059)
at org.apache.spark.repl.Main$.main(Main.scala:31)
at org.apache.spark.repl.Main.main(Main.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSub
mit$$runMain(SparkSubmit.scala:731)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:18
1)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.NullPointerException
at java.lang.ProcessBuilder.start(Unknown Source)
at org.apache.hadoop.util.Shell.runCommand(Shell.java:482)
at org.apache.hadoop.util.Shell.run(Shell.java:455)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:
715)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:808)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:791)
at org.apache.hadoop.fs.FileUtil.execCommand(FileUtil.java:1097)
at org.apache.hadoop.fs.RawLocalFileSystem$DeprecatedRawLocalFileStatus.
loadPermissionInfo(RawLocalFileSystem.java:582)
at org.apache.hadoop.fs.RawLocalFileSystem$DeprecatedRawLocalFileStatus.
getPermission(RawLocalFileSystem.java:557)
at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(Sess
ionState.java:599)
at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(Sess
ionState.java:554)
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.jav
a:508)
... 62 more
<console>:16: error: not found: value sqlContext
import sqlContext.implicits._
^
<console>:16: error: not found: value sqlContext
import sqlContext.sql
^
最佳答案
Spark 使用 log4j 进行日志记录,但是,它需要进行配置,因此您会收到这些警告。您可以通过在 conf 目录中添加一个 log4j.properties 文件来配置它。在同一目录中应该有一个 log4j.properties.template,您需要将 log4j.jar 下载到您的 Java 类路径。
关于java - 运行 Apache.Spark - log4j :WARN Please initialize the log4j system properly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35639159/
warnings.warn() 和有什么区别?和 logging.warn()就它们的作用和应该如何使用而言? 最佳答案 我同意另一个答案——logging 用于记录,warning 用于警告——但我
这是我写的代码: #usr/bin/python3 import warnings def tt(): warnings.warn("123") return 10 x = tt()
我正在尝试使用基于文档中显示的示例的代码片段来提出DeprecationWarning。 http://docs.python.org/2/library/warnings.html#warnings
我正在尝试提出一个 DeprecationWarning,其中包含基于文档中显示的示例的代码片段。 http://docs.python.org/2/library/warnings.html#war
我有兴趣尝试在调用时操纵警告,而无需围绕方法创建支持基础设施。也就是说,我需要能够捕获警告,而无需使用以下代码包装代码: tryCatch(..., warning = function() { ac
我是 js 我正在尝试使用 this.setState({但我收到警告。 你们能告诉我为什么我收到以下警告吗 warning.js:45 警告:setState(...):只能更新已安装或正在安装的组
我的最小例子是 #!/usr/bin/python3 import warnings warnings.warn('Run Forest run!', stacklevel=2) warnings.w
本文整理了Java中com.ibm.wala.util.warnings.Warnings.asString()方法的一些代码示例,展示了Warnings.asString()的具体用法。这些代码示例
本文整理了Java中com.ibm.wala.util.warnings.Warnings.clear()方法的一些代码示例,展示了Warnings.clear()的具体用法。这些代码示例主要来源于G
本文整理了Java中com.ibm.wala.util.warnings.Warnings.add()方法的一些代码示例,展示了Warnings.add()的具体用法。这些代码示例主要来源于Githu
我一定是错误地理解了警告文档。我读它的方式,这段代码: use warnings; use warnings FATAL => 'all'; warnings::warn('numeric', 'bl
我在 Linux 上使用 OpenMP 指令编译 C 代码时收到此警告: warning: ignoring #pragma omp parallel Gcc 版本是 4.4。 这只是一个我不应该关心
我有一个奇怪的 g++ 行为,当显示任何其他警告时,它会显示有关无法识别的命令行选项的警告。 例子: struct Foo{virtual int bar() = 0;}; struct Bar:pu
在 Visual Studio 2010 中使用 C++ native 解决方案。 #pragma warning (push) 用于 cpp 文件的开头,在所有包含之后。之后,#pragma war
我习惯于开始我的每一个脚本 use strict; use warnings; 但是这里的一些知名人士推荐 use warnings 'all'; 如果我理解正确,后者甚至比第一个更好。所以我通读了d
我正在编码C#。我使用NCrunch在后台运行单元测试。我已经在CSPROJ文件中设置了(新的CSPROJ格式)。 我想将FxCop分析仪用作NuGet软件包:https://docs.microso
谁能帮我解决这个问题,我收到此警告消息 log4j:WARN No appenders could be found for logger (com.akak.book.shop.listener.L
我正在尝试了解更多关于 linux 内核中的 kobject 的信息,并且在尝试编写一个使用此类工具的模块时,我收到了错误和警告消息,因此我将相关数据的精简版本放在这里结构和相应的gcc的错误和警告信
http://docs.python.org/2/howto/logging.html 上的样本同时使用 warn 和 warning。 最佳答案 logging.warn 自 Python 3.3
警告[nuxt]两个解析为相同名称ProseCode的组件文件:。警告[nuxt]两个解析为相同名称ProsePre的组件文件:。更新nuxt 3后的警告->3.7&nuxt/内容2.4->2.8。如
我是一名优秀的程序员,十分优秀!