美文网首页Spark
Spark Demo启动遇到的一些问题

Spark Demo启动遇到的一些问题

作者: 海边的贝壳林 | 来源:发表于2019-07-30 15:20 被阅读0次

    问题一

    Exception in thread "pool-21-thread-1197" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.createFileWithMode0(Ljava/lang/String;JJJI)Ljava/io/FileDescriptor;
        at org.apache.hadoop.io.nativeio.NativeIO$Windows.createFileWithMode0(Native Method)
        at org.apache.hadoop.io.nativeio.NativeIO$Windows.createFileOutputStreamWithMode(NativeIO.java:559)
        at org.apache.hadoop.fs.RawLocalFileSystem$LocalFSFileOutputStream.<init>(RawLocalFileSystem.java:219)
        at org.apache.hadoop.fs.RawLocalFileSystem$LocalFSFileOutputStream.<init>(RawLocalFileSystem.java:209)
        at org.apache.hadoop.fs.RawLocalFileSystem.createOutputStreamWithMode(RawLocalFileSystem.java:307)
        at org.apache.hadoop.fs.RawLocalFileSystem.create(RawLocalFileSystem.java:296)
        at org.apache.hadoop.fs.RawLocalFileSystem.create(RawLocalFileSystem.java:328)
        at org.apache.hadoop.fs.ChecksumFileSystem$ChecksumFSOutputSummer.<init>(ChecksumFileSystem.java:398)
        at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:461)
        at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:440)
        at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:911)
        at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:892)
        at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:789)
        at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:778)
        at org.apache.spark.streaming.CheckpointWriter$CheckpointWriteHandler.run(Checkpoint.scala:228)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
    

    解决

    找到hadoop.dll文件, 将其从环境中移走(或者删除), 如果你实在找不到这个问题在哪里的话, 可以使用everything这个软件来搜索, 非常的方便.

    问题二

    19/07/26 14:16:12 WARN CheckpointWriter: Error in attempt 1 of writing checkpoint to 'file:/D:/workspace/spark-demo/spark-checkpoint/checkpoint-1564121772000'
    java.io.IOException: (null) entry in command string: null chmod 0644 D:\workspace\spark-demo\spark-checkpoint\temp
        at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:770)
        at org.apache.hadoop.util.Shell.execCommand(Shell.java:866)
        at org.apache.hadoop.util.Shell.execCommand(Shell.java:849)
        at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:733)
        at org.apache.hadoop.fs.RawLocalFileSystem$LocalFSFileOutputStream.<init>(RawLocalFileSystem.java:225)
        at org.apache.hadoop.fs.RawLocalFileSystem$LocalFSFileOutputStream.<init>(RawLocalFileSystem.java:209)
        at org.apache.hadoop.fs.RawLocalFileSystem.createOutputStreamWithMode(RawLocalFileSystem.java:307)
        at org.apache.hadoop.fs.RawLocalFileSystem.create(RawLocalFileSystem.java:296)
        at org.apache.hadoop.fs.RawLocalFileSystem.create(RawLocalFileSystem.java:328)
        at org.apache.hadoop.fs.ChecksumFileSystem$ChecksumFSOutputSummer.<init>(ChecksumFileSystem.java:398)
        at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:461)
        at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:440)
        at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:911)
        at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:892)
        at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:789)
        at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:778)
        at org.apache.spark.streaming.CheckpointWriter$CheckpointWriteHandler.run(Checkpoint.scala:228)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
    19/07/26 14:16:12 INFO CheckpointWriter: Saving checkpoint for time 1564121772000 ms to file 'file:/D:/workspace/spark-demo/spark-checkpoint/checkpoint-1564121772000'
    Exception in thread "pool-21-thread-4" java.lang.NullPointerException
        at org.apache.spark.streaming.CheckpointWriter$CheckpointWriteHandler.run(Checkpoint.scala:225)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
    

    解决

    我这里是解决方法比较简单粗暴

    相关文章

      网友评论

        本文标题:Spark Demo启动遇到的一些问题

        本文链接:https://www.haomeiwen.com/subject/akorrctx.html