我需要将数据从 同步MongoDB
到Solr
。
当我发出命令时
mongo-connector -m dbserver:27018 -n shop -t http://localhost:8983/solr/Search --auto-commit-interval=0 -d solr_doc_manager
错误日志是:
2016-12-13 15:21:40,461 [CRITICAL] mongo_connector.oplog_manager:630 - Exception during collection dump
Traceback (most recent call last):
File "c:\program files (x86)\python35-32\lib\site-packages\mongo_connector\oplog_manager.py", line 583, in do_dump
upsert_all(dm)
File "c:\program files (x86)\python35-32\lib\site-packages\mongo_connector\oplog_manager.py", line 567, in upsert_all
dm.bulk_upsert(docs_to_dump(namespace), mapped_ns, long_ts)
File "c:\program files (x86)\python35-32\lib\site-packages\mongo_connector\util.py", line 32, in wrapped
return f(*args, **kwargs)
File "c:\program files (x86)\python35-32\lib\site-packages\mongo_connector\doc_managers\solr_doc_manager.py", line 288, in bulk_upsert
batch = list(next(cleaned) for i in range(self.chunk_size))
File "c:\program files (x86)\python35-32\lib\site-packages\mongo_connector\doc_managers\solr_doc_manager.py", line 288, in <genexpr>
batch = list(next(cleaned) for i in range(self.chunk_size))
File "c:\program files (x86)\python35-32\lib\site-packages\mongo_connector\doc_managers\solr_doc_manager.py", line 286, in <genexpr>
cleaned = (self._clean_doc(d, namespace, timestamp) for d in docs)
File "c:\program files (x86)\python35-32\lib\site-packages\mongo_connector\oplog_manager.py", line 509, in docs_to_dump
database, coll = namespace.split('.', 1)
ValueError: not enough values to unpack (expected 2, got 1)
2016-12-13 15:21:40,464 [ERROR] mongo_connector.oplog_manager:638 - OplogThread: Failed during dump collection cannot recover! Collection(Database(MongoClient(host=['dbserver:27018'], document_class=dict, tz_aware=False, connect=True, replicaset='shop'), 'local'), 'oplog.rs')
2016-12-13 15:21:41,460 [ERROR] mongo_connector.connector:304 - MongoConnector: OplogThread <OplogThread(Thread-2, started 4972)> unexpectedly stopped! Shutting down
我不知道我错在哪里。请帮我解决这个问题。谢谢你。