德雷克:如何修复IOException?

时间:2019-03-04 14:00:32

标签: command-line data-science

我想签出drake,这是一种用于组织命令执行的工具。

我的Drakefile看起来像这样:

top-5 <-                                                    
    curl -s 'http://www.gutenberg.org/browse/scores/top' |  
    grep -E '^<li>' |                                       
    head -n 5 |                                             
    sed -E "s/.*ebooks\/([0-9]+).*/\\1/" > top-5            

执行drake时出现以下错误:

Using drip to start up JVM...
The following steps will be run, in order:
  1: /data/ml-latest-small/././top-5 <-  [no-input step]
Confirm? [y/n] y
Running 1 steps with concurrence of 1...

--- 0. Running (no-input step): /data/ml-latest-small/././top-5 <- 
Exception in thread "Thread-3" java.io.IOException: Resource temporarily unavailable
    at java.io.FileInputStream.readBytes(Native Method)
    at java.io.FileInputStream.read(FileInputStream.java:255)
    at org.flatland.drip.SwitchableInputStream.read(SwitchableInputStream.java:40)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
    at java.io.InputStreamReader.read(InputStreamReader.java:184)
    at java.io.BufferedReader.fill(BufferedReader.java:161)
    at java.io.BufferedReader.read(BufferedReader.java:182)
    at java.io.LineNumberReader.read(LineNumberReader.java:126)
    at java.io.FilterReader.read(FilterReader.java:65)
    at java.io.PushbackReader.read(PushbackReader.java:90)
    at clojure.lang.LineNumberingPushbackReader.read(LineNumberingPushbackReader.java:49)
    at clojure.lang.LineNumberingPushbackReader.readLine(LineNumberingPushbackReader.java:71)
    at clojure.core$read_line.invoke(core.clj:3485)
    at drake.stdin$fn__2045$fn__2047.invoke(stdin.clj:54)
    at clojure.lang.AFn.run(AFn.java:22)
    at java.lang.Thread.run(Thread.java:748)
grep: write error: Broken pipe
--- 0: /data/ml-latest-small/././top-5 <-  -> done in 0.67s
Done (1 steps run).

此示例摘自Data Science on the Command Line, Chapter 6.5

有人知道如何解决此问题吗?

0 个答案:

没有答案