2017-05-04 67 views
0

我有兩個節點,正試圖創建一個遠程表。要建立我做到以下幾點:monetdb遠程表:無法註冊

每個主機上:

$ monetdbd create /opt/mdbdata/dbfarm 
$ monetdbd set listenaddr=0.0.0.0 /opt/mdbdata/dbfarm 
$ monetdbd start /opt/mdbdata/dbfarm 

在第一主持人:

$ monetdb create w0 
$ monetdb release w0 

在第二:

$ monetdb create mst 
$ monetdb release mst 
$ mclient -u monetdb -d mst 
password: 
Welcome to mclient, the MonetDB/SQL interactive terminal (Dec2016-SP4) 
Database: MonetDB v11.25.21 (Dec2016-SP4), 'mapi:monetdb://nkcdev11:50000/mst' 
Type \q to quit, \? for a list of available commands 
auto commit mode: on 
sql>create table usr (id integer not null, name text not null); 
operation successful (0.895ms) 
sql>insert into usr values(1,'abc'),(2,'def'); 
2 affected rows (0.845ms) 
sql>select * from usr; 
+------+------+ 
| id   | name | 
+======+======+ 
|    1 | abc  | 
|    2 | def  | 
+------+------+ 
2 tuples (0.652ms) 
sql> 

在第一次:

$ mclient -u monetdb -d w0 
password: 
Welcome to mclient, the MonetDB/SQL interactive terminal (Dec2016-SP4) 
Database: MonetDB v11.25.21 (Dec2016-SP4), 'mapi:monetdb://nkcdev10:50000/w0' 
Type \q to quit, \? for a list of available commands 
auto commit mode: on 
sql>create remote table usr_rmt (id integer not null, name text not null) on 'mapi:monetdb://nkcdev11:50000/mst'; 
operation successful (1.222ms) 
sql>select * from usr_rmt; 
(mapi:monetdb://[email protected]/mst) Cannot register   
project (
table(sys.usr_rmt) [ usr_rmt.id NOT NULL, usr_rmt.name NOT NULL ] COUNT  
) [ usr_rmt.id NOT NULL, usr_rmt.name NOT NULL ] REMOTE mapi:monetdb://nkcdev11:50000/mst 
sql> 
$ 
$ monetdb discover 
             location 
mapi:monetdb://nkcdev10:50000/w0 
mapi:monetdb://nkcdev11:50000/mst 

任何人都可以推動我朝着正確的方向發展嗎?

[編輯 - 已解決]

的問題是自己造成的,遠程表的名稱必須是完全一樣的本地表的名稱,我不得不usr_rmt爲遠程表的名稱。

回答

0

乍看之下,你正在努力做什麼應該工作。

最近,我有類似的遠程表訪問問題,雖然這是與未發佈的版本,請參閱bug 6289。 (該錯誤報告中提到的MonetDB版本號不正確。)您遇到的問題可能是也可能不是相同的基礎問題。

週末過後,我會檢查是否可以在-SP4和開發版本上重現您的示例。

Joeri

+0

謝謝Joeri。 –