我正在尝试从 Couchbase 4.0.0-4051 社区版获取 cbworkloadgen 上传的 BinaryDocuments。Couchbase Java 客户端版本是 2.4.1。
解码器给出的例外是 -
WARNING: Decoding of document with BinaryTranscoder failed. exception: Flags (0x0) indicate non-binary document for id pymc0, could not decode., id: "pymc0", cas: 1486468016723525632, expiry: 0, flags: 0x0, status: SUCCESS, content size: 2048 bytes, content: "".
com.couchbase.client.java.error.TranscodingException: Flags (0x0) indicate non-binary document for id pymc0, could not decode.
com.couchbase.client.java.error.TranscodingException: Flags (0x0) indicate non-binary document for id pymc0, could not decode.
at com.couchbase.client.java.transcoder.BinaryTranscoder.doDecode(BinaryTranscoder.java:32)
at com.couchbase.client.java.transcoder.BinaryTranscoder.doDecode(BinaryTranscoder.java:26)
at com.couchbase.client.java.transcoder.AbstractTranscoder.decode(AbstractTranscoder.java:42)
at com.couchbase.client.java.CouchbaseAsyncBucket$1.call(CouchbaseAsyncBucket.java:274)
at com.couchbase.client.java.CouchbaseAsyncBucket$1.call(CouchbaseAsyncBucket.java:270)
at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:69)
我使用以下来获取文件-
AbstractDocument<?> doc = destinationBucket.get((String) row.key(), isJson ? JsonDocument.class : BinaryDocument.class);
对于 JsonDocument,一切正常。行是 AsyncViewRow。
我究竟做错了什么?有人可以告诉我吗?或者这是与标志字段中的错误值相关的错误?