【问题标题】:Insufficient data written when inserting rows插入行时写入的数据不足
【发布时间】:2013-07-26 14:42:12
【问题描述】:

我今天在运行单元测试以将一些行插入到我的 bigquery 表中时遇到此错误:

Caused by: java.io.IOException: insufficient data written
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.close(HttpURLConnection.java:3213)
at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:81)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:960)
at com.google.api.client.googleapis.media.MediaHttpUploader.executeCurrentRequest(MediaHttpUploader.java:482)
at com.google.api.client.googleapis.media.MediaHttpUploader.executeCurrentRequestWithBackOffAndGZip(MediaHttpUploader.java:504)
at com.google.api.client.googleapis.media.MediaHttpUploader.executeUploadInitiation(MediaHttpUploader.java:456)
at com.google.api.client.googleapis.media.MediaHttpUploader.upload(MediaHttpUploader.java:348)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:418)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)

我认为这是由于新版本的 google-http-client (1.16.0.rc) 因为我在运行测试之前更新了。但是回滚到 1.15.0-rc 没有效果。

有什么想法吗?

【问题讨论】:

    标签: google-bigquery google-http-client


    【解决方案1】:

    我也是。此外,Bigquery 似乎只是停止接收任何数据的迹象。因为如果您在此异常之后通过 count(*) 查询您的表,结果将不再改变。如果我让我的程序运行一段时间,它会给我以下错误:

    javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1343)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1371)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355)
    

    等待答案...

    【讨论】:

      【解决方案2】:

      这些错误通常发生在通信失败时,特别是对于大文件。 避免它的方法是to use resumable upload

      【讨论】:

        猜你喜欢
        • 2014-06-29
        • 1970-01-01
        • 2014-09-21
        • 1970-01-01
        • 1970-01-01
        • 2013-10-05
        • 2016-10-13
        • 2016-03-26
        • 1970-01-01
        相关资源
        最近更新 更多