Couchbase cbdocloader 不从 zip 文件加载文档
Couchbase cbdocloader not loading documents from zip file
我最近安装了 Couchbase 4.5 beta on Windows 10. I'm following along with the free training videos and labs at learn.couchbase.com,特别是 CB110 课程。
实验室中的一个步骤要求我使用 cbdocloader 加载样本数据。我之前在 Couchbase 4.5 开发者预览版中这样做过并且工作正常,但现在它没有加载任何文档。
它会创建存储桶,但不会将文档加载到其中。这是我的 powershell 输出:
PS C:\Users\mgroves\Desktop> cbdocloader -u Administrator -p password -b couchmu
sic1 -n 127.0.0.1:8091 -s 100 .\couchmusic1-countries-20151228-win.zip
[2016-05-12 10:23:50,480] - [rest_client] [6240] - INFO - existing buckets : [u'
couchmusic1', u'hello-couchbase', u'travel-sample']
[2016-05-12 10:23:50,496] - [rest_client] [6240] - INFO - found bucket couchmusi
c1
bucket creation is successful
.
bucket: couchmusic1-countries-20151228-win.zip, msgs transferred...
: total | last | per sec
byte : 0 | 0 | 0.0
done
PS C:\Users\mgroves\Desktop>
如果您想尝试,我已经在保管箱上提供了一个 zip 文件:couchmusic1-countries-20151228.zip
我怀疑这可能是用户错误,与 Couchbase 版本无关,但我不确定。
UPDATE:我 运行 带有 -v 标志(v 代表 "verbose"),下面是它的输出。我还是没看出问题所在:
PS C:\Users\mgroves\Desktop> cbdocloader -u Administrator -p password -b couchmu
sic1 -n 127.0.0.1:8091 -s 100 -v .\couchmusic1-countries-20151228-win.zip
[2016-05-12 10:40:06,549] - [rest_client] [7764] - INFO - existing buckets : [u'
couchmusic1', u'hello-couchbase', u'travel-sample']
[2016-05-12 10:40:06,561] - [rest_client] [7764] - INFO - found bucket couchmusi
c1
bucket creation is successful
2016-05-12 10:40:06,594: mt cbtransfer...
2016-05-12 10:40:06,595: mt source : json://.\couchmusic1-countries-20151228-wi
n.zip
2016-05-12 10:40:06,605: mt sink : http://127.0.0.1:8091
2016-05-12 10:40:06,612: mt opts : {'username': '<xxx>', 'destination_vbucket
_state': 'active', 'verbose': 1, 'extra': {'max_retry': 10.0, 'rehash': 0.0, 'dc
p_consumer_queue_length': 1000.0, 'data_only': 0.0, 'uncompress': 0.0, 'nmv_retr
y': 1.0, 'conflict_resolve': 1.0, 'cbb_max_mb': 100000.0, 'report': 5.0, 'mcd_co
mpatible': 1.0, 'try_xwm': 1.0, 'backoff_cap': 10.0, 'batch_max_bytes': 400000.0
, 'report_full': 2000.0, 'flow_control': 1.0, 'batch_max_size': 1000.0, 'seqno':
0.0, 'design_doc_only': 0.0, 'recv_min_bytes': 4096.0}, 'ssl': False, 'threads'
: 4, 'key': None, 'password': '<xxx>', 'id': None, 'destination_operation': None
, 'source_vbucket_state': 'active', 'silent': False, 'dry_run': False, 'single_n
ode': False, 'bucket_destination': 'couchmusic1', 'vbucket_list': None, 'bucket_
source': None}
2016-05-12 10:40:06,726: mt bucket: couchmusic1-countries-20151228-win.zip
2016-05-12 10:40:06,749: w3 source : json://.\couchmusic1-countries-20151228-w
in.zip(couchmusic1-countries-20151228-win.zip@N/A)
2016-05-12 10:40:06,760: w3 sink : http://127.0.0.1:8091(couchmusic1-countri
es-20151228-win.zip@N/A)
2016-05-12 10:40:06,767: w3 : total | last | pe
r sec
2016-05-12 10:40:06,772: w3 batch : 1 | 1 |
28.6
2016-05-12 10:40:06,776: w3 byte : 0 | 0 |
0.0
2016-05-12 10:40:06,779: w3 msg : 0 | 0 |
0.0
.
bucket: couchmusic1-countries-20151228-win.zip, msgs transferred...
: total | last | per sec
batch : 1 | 1 | 8.0
byte : 0 | 0 | 0.0
msg : 0 | 0 | 0.0
done
PS C:\Users\mgroves\Desktop>
事实证明,这是由于 Couchbase 4.5 开发人员预览版和 Couchbase 4.5 beta 之间的更改而导致的问题。
显然,这些 couchmusic json 文件的格式不正确。为了向后兼容,允许导入这些无效的 json zip 文件(参见 https://github.com/couchbase/couchbase-cli/commit/3794ffa8fdfcdd5224cb4e332d5ef882aa8140b5). However, another case appears to have broken this (see: https://github.com/couchbase/couchbase-cli/commit/c892c9241d1e6997fa30317af791d6fcde73aeaa)。
无论如何,有两个问题:
1) couchmusic 的示例 json 文件格式不正确
2) 向后兼容性导入被破坏
我已经与 Couchbase 支持团队谈过,他们将尝试在 Couchbase 4.5 发布之前重新激活并修复此问题(如果您愿意,可以在此处查看问题:https://issues.couchbase.com/browse/MB-18905)
我最近安装了 Couchbase 4.5 beta on Windows 10. I'm following along with the free training videos and labs at learn.couchbase.com,特别是 CB110 课程。
实验室中的一个步骤要求我使用 cbdocloader 加载样本数据。我之前在 Couchbase 4.5 开发者预览版中这样做过并且工作正常,但现在它没有加载任何文档。
它会创建存储桶,但不会将文档加载到其中。这是我的 powershell 输出:
PS C:\Users\mgroves\Desktop> cbdocloader -u Administrator -p password -b couchmu
sic1 -n 127.0.0.1:8091 -s 100 .\couchmusic1-countries-20151228-win.zip
[2016-05-12 10:23:50,480] - [rest_client] [6240] - INFO - existing buckets : [u'
couchmusic1', u'hello-couchbase', u'travel-sample']
[2016-05-12 10:23:50,496] - [rest_client] [6240] - INFO - found bucket couchmusi
c1
bucket creation is successful
.
bucket: couchmusic1-countries-20151228-win.zip, msgs transferred...
: total | last | per sec
byte : 0 | 0 | 0.0
done
PS C:\Users\mgroves\Desktop>
如果您想尝试,我已经在保管箱上提供了一个 zip 文件:couchmusic1-countries-20151228.zip
我怀疑这可能是用户错误,与 Couchbase 版本无关,但我不确定。
UPDATE:我 运行 带有 -v 标志(v 代表 "verbose"),下面是它的输出。我还是没看出问题所在:
PS C:\Users\mgroves\Desktop> cbdocloader -u Administrator -p password -b couchmu
sic1 -n 127.0.0.1:8091 -s 100 -v .\couchmusic1-countries-20151228-win.zip
[2016-05-12 10:40:06,549] - [rest_client] [7764] - INFO - existing buckets : [u'
couchmusic1', u'hello-couchbase', u'travel-sample']
[2016-05-12 10:40:06,561] - [rest_client] [7764] - INFO - found bucket couchmusi
c1
bucket creation is successful
2016-05-12 10:40:06,594: mt cbtransfer...
2016-05-12 10:40:06,595: mt source : json://.\couchmusic1-countries-20151228-wi
n.zip
2016-05-12 10:40:06,605: mt sink : http://127.0.0.1:8091
2016-05-12 10:40:06,612: mt opts : {'username': '<xxx>', 'destination_vbucket
_state': 'active', 'verbose': 1, 'extra': {'max_retry': 10.0, 'rehash': 0.0, 'dc
p_consumer_queue_length': 1000.0, 'data_only': 0.0, 'uncompress': 0.0, 'nmv_retr
y': 1.0, 'conflict_resolve': 1.0, 'cbb_max_mb': 100000.0, 'report': 5.0, 'mcd_co
mpatible': 1.0, 'try_xwm': 1.0, 'backoff_cap': 10.0, 'batch_max_bytes': 400000.0
, 'report_full': 2000.0, 'flow_control': 1.0, 'batch_max_size': 1000.0, 'seqno':
0.0, 'design_doc_only': 0.0, 'recv_min_bytes': 4096.0}, 'ssl': False, 'threads'
: 4, 'key': None, 'password': '<xxx>', 'id': None, 'destination_operation': None
, 'source_vbucket_state': 'active', 'silent': False, 'dry_run': False, 'single_n
ode': False, 'bucket_destination': 'couchmusic1', 'vbucket_list': None, 'bucket_
source': None}
2016-05-12 10:40:06,726: mt bucket: couchmusic1-countries-20151228-win.zip
2016-05-12 10:40:06,749: w3 source : json://.\couchmusic1-countries-20151228-w
in.zip(couchmusic1-countries-20151228-win.zip@N/A)
2016-05-12 10:40:06,760: w3 sink : http://127.0.0.1:8091(couchmusic1-countri
es-20151228-win.zip@N/A)
2016-05-12 10:40:06,767: w3 : total | last | pe
r sec
2016-05-12 10:40:06,772: w3 batch : 1 | 1 |
28.6
2016-05-12 10:40:06,776: w3 byte : 0 | 0 |
0.0
2016-05-12 10:40:06,779: w3 msg : 0 | 0 |
0.0
.
bucket: couchmusic1-countries-20151228-win.zip, msgs transferred...
: total | last | per sec
batch : 1 | 1 | 8.0
byte : 0 | 0 | 0.0
msg : 0 | 0 | 0.0
done
PS C:\Users\mgroves\Desktop>
事实证明,这是由于 Couchbase 4.5 开发人员预览版和 Couchbase 4.5 beta 之间的更改而导致的问题。
显然,这些 couchmusic json 文件的格式不正确。为了向后兼容,允许导入这些无效的 json zip 文件(参见 https://github.com/couchbase/couchbase-cli/commit/3794ffa8fdfcdd5224cb4e332d5ef882aa8140b5). However, another case appears to have broken this (see: https://github.com/couchbase/couchbase-cli/commit/c892c9241d1e6997fa30317af791d6fcde73aeaa)。
无论如何,有两个问题: 1) couchmusic 的示例 json 文件格式不正确 2) 向后兼容性导入被破坏
我已经与 Couchbase 支持团队谈过,他们将尝试在 Couchbase 4.5 发布之前重新激活并修复此问题(如果您愿意,可以在此处查看问题:https://issues.couchbase.com/browse/MB-18905)