GridDBã® ãšã¯ã¹ããŒã/ã€ã³ããŒã ããŒã«ã§ã¯ãããŒã¿ããŒã¹ã®å±æçãªç Žå£ã«å¯ŸããŠåŸ©æ§ãè¡ãé害å埩åŠçããã·ã¹ãã æ§æãå€æŽãããéã®ããŒã¿ããŒã¹ã®ç§»è¡(ãã€ã°ã¬ãŒã·ã§ã³)åŠçãªã©ãå®çŸããããã«ãããŒã¿ããŒã¹ãã³ã³ããåäœã§ã®ä¿å/埩å æ©èœãæäŸããŸãã
åºåããŒã¿ãåãæ±ããããããããããšã¯ã¹ããŒãããŒã«ã¯ã³ã³ããã®çš®å¥ã«å¿ããŠããŠããŒã¿ãã¡ã€ã«ã®åºå圢åŒãåãæ¿ããŸãããšã¯ã¹ããŒãã³ã³ããçš®å¥ã«ã¯ä»¥äžã®ïŒçš®é¡ããããŸãã
- ããŒã¿ãé 次èç©ããèŠæš¡ãå¢å€§ããåŸåãããã³ã³ãããæ¥ä»èç©åã³ã³ãã ãšåŒã³ãŸãããã®çš®å¥ã®å Žåãæ¥ä»åäœã§ããŠããŒã¿ãã¡ã€ã«ãåºåããŸãã
- äžèšä»¥å€ã®ã³ã³ãããç»é²æŽæ°åã³ã³ãã ãšåŒã³ãŸãããã®çš®å¥ã®å Žåãã³ã³ããåäœã§ããŠããŒã¿ãã¡ã€ã«ãåºåããŸãã
å ·äœçã«ã¯ããããã«å«ãŸããã³ã³ããã¯ä»¥äžã«ãªããŸãã
ã³ã³ãã | ããŒãã«ããŒãã£ã·ã§ãã³ã° | ããŒãã£ã·ã§ãã³ã°ã®çš®é¡ | ããŒãã£ã·ã§ãã³ã°ã㌠| ãšã¯ã¹ããŒãã³ã³ããçš®å¥ |
---|---|---|---|---|
ã³ã¬ã¯ã·ã§ã³ | ãã | ããã·ã¥ããŒãã£ã·ã§ãã³ã° | Timestampå Timestampåä»¥å€ |
ç»é²æŽæ°åã³ã³ãã |
ã³ã¬ã¯ã·ã§ã³ | ãã | ã€ã³ã¿ãŒãã«ããŒãã£ã·ã§ãã³ã° | Timestampå Timestampåä»¥å€ |
æ¥ä»èç©åã³ã³ãã ç»é²æŽæ°åã³ã³ãã |
ã³ã¬ã¯ã·ã§ã³ | ãã | ã€ã³ã¿ãŒãã«ããã·ã¥ããŒãã£ã·ã§ãã³ã° | Timestampå Timestampåä»¥å€ |
æ¥ä»èç©åã³ã³ãã ç»é²æŽæ°åã³ã³ãã |
ã³ã¬ã¯ã·ã§ã³ | ãªã | ïŒ | Timestampå Timestampåä»¥å€ |
ç»é²æŽæ°åã³ã³ãã |
æç³»åã³ã³ãã | ãã | ããã·ã¥ããŒãã£ã·ã§ãã³ã° | Timestampå Timestampåä»¥å€ |
ç»é²æŽæ°åã³ã³ãã |
æç³»åã³ã³ãã | ãã | ã€ã³ã¿ãŒãã«ããŒãã£ã·ã§ãã³ã° | Timestampå Timestampåä»¥å€ |
æ¥ä»èç©åã³ã³ãã ç»é²æŽæ°åã³ã³ãã |
æç³»åã³ã³ãã | ãã | ã€ã³ã¿ãŒãã«ããã·ã¥ããŒãã£ã·ã§ãã³ã° | Timestampå Timestampåä»¥å€ |
æ¥ä»èç©åã³ã³ãã ç»é²æŽæ°åã³ã³ãã |
æç³»åã³ã³ãã | ãªã | ïŒ | ïŒ | æ¥ä»èç©åã³ã³ãã |
ãšã¯ã¹ããŒãããŒã«ã¯ãGridDBã¯ã©ã¹ã¿ã®ã³ã³ããããã³ããŠããŒã¿ãã以äžã®ãã¡ã€ã«ã«ä¿åããŸããã³ã³ããåãæå®ããŠç¹å®ã³ã³ããã®ã¿ãšã¯ã¹ããŒãããããšãã§ããŸãã
- ã³ã³ããããŒã¿ãã¡ã€ã«
- GridDBã®ã³ã³ããæ å ±ãšããŠããŒã¿ãä¿åããŸãã
- ã³ã³ããåäœã«ä¿åãã圢åŒãšè€æ°ã³ã³ããããŸãšããŠä¿åãã圢åŒã®ïŒçš®é¡ããããŸãã
- ãšã¯ã¹ããŒãå®è¡æ
å ±ãã¡ã€ã«
- ãšã¯ã¹ããŒãå®è¡æã®æ å ±ãä¿åããŸãããšã¯ã¹ããŒãããããŒã¿ãããã®ãŸãŸGridDBã¯ã©ã¹ã¿ã«åŸ©å ããããã«å¿ èŠã§ãã
ã€ã³ããŒãããŒã«ã¯ããšã¯ã¹ããŒãããŒã¿ãä¿åããã³ã³ããããŒã¿ãã¡ã€ã«ãšãšã¯ã¹ããŒãå®è¡æ å ±ãã¡ã€ã«ãèªã¿èŸŒãã§ãã³ã³ããããã³ããŠããŒã¿ãGridDBã«åŸ©å ããŸããç¹å®ã®ã³ã³ããããŒã¿ãæå®ããŠãã€ã³ããŒãããããšãã§ããŸãã
ã³ã³ããããŒã¿ãã¡ã€ã«ã¯ãã³ã³ããæ å ±ãèšèŒãã ã¡ã¿ããŒã¿ãã¡ã€ã« ãšãã³ã³ããã«æ ŒçŽããããŒã¿ãèšèŒãã ããŠããŒã¿ãã¡ã€ã« ãããªããŸãã
ã¡ã¿ããŒã¿ãã¡ã€ã«ã¯ãã³ã³ããã®ã¿ã€ãããã¹ããŒããèšå®ãããŠãã玢åŒæ å ±ãå«ãjson圢åŒã®ãã¡ã€ã«ã§ãã
ããŠããŒã¿ãã¡ã€ã«ã«ã¯ãã³ã³ããã®æ ŒçŽããŒã¿ãCSV圢åŒã§èšèŒãã CSVããŒã¿ãã¡ã€ã« ãšãzip圢åŒã§èšèŒãã ãã€ããªããŒã¿ãã¡ã€ã« ã®2çš®é¡ããããŸãã
- CSVããŒã¿ãã¡ã€ã«:
- ã³ã³ããã®ããŠããŒã¿ãCSVããŒã¿ãšããŠèšèŒããŸããå¯èªæ§ãé«ããæ±çšããŒã«ã§ãã¡ã€ã«ãèªã¿èŸŒãã§ç·šéããããšãå¯èœã§ãã
- ããŠããŒã¿ãBLOBã空éæ å ±ãé åãªã©ã®ç¹å®ã®åã®å Žåã«ã¯ãå€éšãªããžã§ã¯ããã¡ã€ã«ã«ããŒã¿ãèšèŒããCSVããŒã¿ãã¡ã€ã«ã«ã¯å€éšãªããžã§ã¯ããã¡ã€ã«åã®ã¿èšèŒããŸããå€éšãªããžã§ã¯ããã¡ã€ã«ã¯ãããŠããŒã¿æ¯ã«äœæããŸãã
- ãã€ããªããŒã¿ãã¡ã€ã«ïŒ
- ã³ã³ããã®ããŠããŒã¿ãZip圢åŒã§èšèŒããŸããgs_exportã§ã®ã¿äœæãå¯èœã§ãã CSVããŒã¿ãã¡ã€ã«ã«æ¯ã¹ãŠãµã€ãºãå°ãããªããŸãããŸãå€éšãªããžã§ã¯ããã¡ã€ã«ãäœæããå¿ èŠããªãããããã¡ã€ã«æ°ãå°ãªããŠæžã¿ãŸãããã ãããã€ããªããŒã¿ãã¡ã€ã«ã«ã¯å¯èªæ§ã¯ãªãç·šéããããšã¯ã§ããŸããã
åãã¡ã€ã«ã®èšè¿°å 容ã®è©³çŽ°ã¯ãã³ã³ããããŒã¿ãã¡ã€ã«ã®åœ¢åŒãåç §ããŠãã ããã
ç»é²æŽæ°åã³ã³ãã ã®å Žåãã³ã³ããåäœã§ããŠããŒã¿ãã¡ã€ã«ãåºåããŸãã ã³ã³ããããŒã¿ãã¡ã€ã«ã«ã¯ãèšèŒå¯Ÿè±¡ãšãªãã³ã³ããæ°ã«ãã£ãŠã以äžã®ïŒçš®é¡ããããŸãã
- ã·ã³ã°ã«ã³ã³ããæ§æïŒïŒã€ã®ã³ã³ããã«å¯ŸããŠïŒã€ã®ã³ã³ããããŒã¿ãã¡ã€ã«ãæã€
- ãã«ãã³ã³ããæ§æïŒè€æ°ã®ã³ã³ãããïŒã€ã®ã³ã³ããããŒã¿ãã¡ã€ã«ã«ãŸãšãã
æ¥ä»èç©åã³ã³ãã ã®å Žåãæ¥ä»åäœã§ããŠããŒã¿ãã¡ã€ã«ãåºåããŸãã
- æ¥ä»ã³ã³ããæ§æïŒïŒã³ã³ããã®ããŒã¿ãïŒæ¥æ¯ã«åå²ããããããã«ïŒã€ã®ã³ã³ããããŒã¿ãã¡ã€ã«ãæã€ã
ãšã¯ã¹ããŒãã³ã³ããçš®å¥ | åºåãã¡ã€ã«æ§æ | 説æ |
---|---|---|
ç»é²æŽæ°åã³ã³ãã | ã·ã³ã°ã«ã³ã³ããæ§æ | ïŒã³ã³ããæ¯ã«ïŒã€ã®ã³ã³ããããŒã¿ãã¡ã€ã«ãäœæããæ§æ |
ãã«ãã³ã³ããæ§æ | è€æ°ã³ã³ãããïŒã€ã®ã³ã³ããããŒã¿ãã¡ã€ã«ã«ãŸãšããæ§æ | |
æ¥ä»èç©åã³ã³ãã | æ¥ä»ã³ã³ããæ§æ | ïŒã³ã³ããã®ããŒã¿ãïŒæ¥æ¯ã«åå²ããŠïŒã€ã®ã³ã³ããããŒã¿ãã¡ã€ã«ãäœæ |
以éã§ã¯ãåæ§æã®ã³ã³ããããŒã¿ãã¡ã€ã«ã ã·ã³ã°ã«ã³ã³ããããŒã¿ãã¡ã€ã« ã ãã«ãã³ã³ããããŒã¿ãã¡ã€ã«ãæ¥ä»ã³ã³ããããŒã¿ãã¡ã€ã« ãšããããèšèŒããŸãã
ç»é²æŽæ°åã³ã³ããã®å Žåã ã·ã³ã°ã«ã³ã³ããããŒã¿ãã¡ã€ã«ã§å€§éã®ã³ã³ãããæå®ããŠãšã¯ã¹ããŒããå®è¡ãããšã倧éã®ã¡ã¿ããŒã¿ãã¡ã€ã«ãšããŠããŒã¿ãã¡ã€ã«ãäœæãããããã管çãç ©éãšãªããŸãã äžæ¹ããã«ãã³ã³ããããŒã¿ãã¡ã€ã«ã§ã¯ã倧éã®ã³ã³ãããæå®ããŠãåºåãããã®ã¯ïŒã€ã®ã¡ã¿ããŒã¿ãã¡ã€ã«ãšããŠããŒã¿ãã¡ã€ã«ã®ã¿ã§ãã
ããã§ãïŒã€ã®æ§æ㯠çšéã«å¿ããŠäœ¿ãåãã ããšãæšå¥šããŸãã
ã·ã³ã°ã«ã³ã³ããããŒã¿ãã¡ã€ã«ã¯ã以äžã®ãããªã±ãŒã¹ã§å©çšããŸãã
- ç¹å®ã³ã³ããã®çŸåšã®ããŒã¿ãåºåããããŒã¿è§£æãããã
- æ¢åã®ã³ã³ãããšåæ§ã®ã¹ããŒãã®ã³ã³ãããå€æ°äœæããããŒã¿ãç»é²ãããã
ãã«ãã³ã³ããããŒã¿ãã¡ã€ã«ã¯ã以äžã®ãããªã±ãŒã¹ã§å©çšããŸãã
- ç¹å®ã³ã³ãã矀ã®ããã¯ã¢ãããæ¡åãããã
- ç°ãªãGridDBã¯ã©ã¹ã¿ãžããŒã¿ããŒã¹ã移è¡ãããã
æ¥ä»èç©åã³ã³ããã®å Žåãåºåãã¡ã€ã«æ§æã¯ïŒçš®é¡ã®ããããã®ãããªäœ¿ãåãã¯ãããŸããã
ãšã¯ã¹ããŒãå®è¡æ å ±ãã¡ã€ã«ã«ã¯ããšã¯ã¹ããŒãå®è¡æã®æ¥æãã³ã³ããæ°ãã³ã³ããåãªã©ã®æ å ±ãä¿åããŸãããã®ãã¡ã€ã«ã¯ãšã¯ã¹ããŒãããããŒã¿ãããã®ãŸãŸGridDBã¯ã©ã¹ã¿ã«åŸ©å ããããã«å¿ èŠã§ãã
ãã¡ã¢ã
- ãšã¯ã¹ããŒãå®è¡æ å ±ãã¡ã€ã«ã®ãã¡ã€ã«åã¯ãgs_export.jsonã§ãã
- ãšã¯ã¹ããŒãããã³ã³ããããŒã¿ãã¡ã€ã«ãæåã§ç·šéããå Žåããšã¯ã¹ããŒãå®è¡æ å ±ã¯åé€ããŠãã ãããæ å ±ã®äžäžèŽã«ãããç»é²ãšã©ãŒãçºçããå¯èœæ§ããããŸãã
- ãšã¯ã¹ããŒãå®è¡æ å ±ãã¡ã€ã«ãååšããªãå Žåã®ã€ã³ããŒãã§ã¯ãã³ã³ããã®ã¡ã¿ããŒã¿ãã¡ã€ã«ã®æå®ãå¿ é ã§ããæå®ããªãå Žåãã€ã³ããŒãã¯å€±æããŸãã
ãšã¯ã¹ããŒãïŒã€ã³ããŒãã³ãã³ããå®è¡ããã«ã¯ã以äžã®èšå®ãå¿ èŠã§ãã
gsadmãŠãŒã¶ã§å©çšããGridDBã¯ã©ã¹ã¿æ§æã«ããããŠããããã£ãã¡ã€ã«ãèšå®ããŸããããããã£ãã¡ã€ã«ã¯ã /var/lib/gridstore/expimp/conf/gs_expimp.properties
ã§ãã
ããããã£ãã¡ã€ã«ã«ã¯ä»¥äžã®ãããªèšå®é ç®ããããŸãã
ãã©ã¡ãŒã¿ã | å¿ é | ããã©ã«ãå€ | 説æ |
---|---|---|---|
mode | å¿ é | MULTICAST | æ¥ç¶æ¹åŒã®çš®é¡ãæå®ããŸããæå®ãçç¥ããå Žåã¯ãã«ããã£ã¹ãæ¹åŒã«ãªããŸãã MULTICAST ã»ã»ãã«ããã£ã¹ãæ¹åŒ FIXED_LISTã»ã»åºå®ãªã¹ãæ¹åŒ PROVIDER ã»ã»ãããã€ãæ¹åŒ |
hostAddress | mode=MULTICASTã®å Žåã¯å¿ é | 239.0.0.1 | GridDBã®ã¯ã©ã¹ã¿å®çŸ©ãã¡ã€ã«(gs_cluster.json)ã®/transaction/notificationAddressãæå®ããŸãããšã¯ã¹ããŒãã»ã€ã³ããŒãããŒã«ãã¯ã©ã¹ã¿ã«ã¢ã¯ã»ã¹ããéã«å©çšãããã«ããã£ã¹ãã¢ãã¬ã¹ã§ãã |
hostPort | mode=MULTICASTã®å Žåã¯å¿ é | 31999 | GridDBã®ã¯ã©ã¹ã¿å®çŸ©ãã¡ã€ã«(gs_cluster.json)ã®/transaction/notificationPortãæå®ããŸãããšã¯ã¹ããŒãã»ã€ã³ããŒãããŒã«ãã¯ã©ã¹ã¿ã«ã¢ã¯ã»ã¹ããéã«å©çšãããã«ããã£ã¹ãã¢ãã¬ã¹ã®ããŒãã§ãã |
jdbcAddress | mode=MULTICASTã®å Žåã¯å¿ é | 239.0.0.1 | ãã«ããã£ã¹ãæ¹åŒãå©çšããå Žåã¯ãGridDBã®ã¯ã©ã¹ã¿å®çŸ©ãã¡ã€ã«(gs_cluster.json)ã®/sql/notificationAddressãæå®ããŸãã |
jdbcPort | mode=MULTICASTã®å Žåã¯å¿ é | 41999 | ãã«ããã£ã¹ãæ¹åŒãå©çšããå Žåã¯ãGridDBã®ã¯ã©ã¹ã¿å®çŸ©ãã¡ã€ã«(gs_cluster.json)ã®/sql/notificationPortãæå®ããŸãã |
notificationMember | mode=FIXED_LISTã®å Žåã¯å¿ é | ïŒ | åºå®ãªã¹ãæ¹åŒã®æ¥ç¶æ¹æ³ã䜿çšããå Žåã¯ãåããŒãã®ã¯ã©ã¹ã¿å®çŸ©ãã¡ã€ã«gs_cluster.jsonã«æå®ãã/cluster/notificationMemberã®/transaction/addressãš/transaction/portã:ã§ç¹ãã§èšè¿°ããŸããè€æ°ããŒãã®å Žåã¯ãã«ã³ãã§é£çµããŠãã ããã äŸïŒ192.168.0.100:10001,192.168.0.101:10001 |
jdbcNotificationMember | mode=FIXED_LISTã®å Žåã¯å¿ é | ïŒ | åºå®ãªã¹ãæ¹åŒã®æ¥ç¶æ¹æ³ã䜿çšããå Žåã¯ãã¯ã©ã¹ã¿å®çŸ©ãã¡ã€ã«gs_cluster.jsonã®/cluster/notificationMemberã®åããŒãã®/sql/addressãš/sql/portã:ã§ç¹ãã§èšè¿°ããŸããè€æ°ããŒãã®å Žåã¯ãã«ã³ãã§é£çµããŠãã ããã äŸïŒ192.168.0.100:20001,192.168.0.101:20001 |
notificationProvider.url | mode=PROVIDERã®å Žåã¯å¿ é | ïŒ | ãããã€ãæ¹åŒã®æ¥ç¶æ¹æ³ã䜿çšããå Žåã¯ãã¯ã©ã¹ã¿å®çŸ©ãã¡ã€ã«gs_cluster.jsonã®/cluster/notificationProvider/urlãæå®ããŸãã |
restAddress | ïŒ | 127.0.0.1 | GridDBã®ããŒãå®çŸ©ãã¡ã€ã«(gs_node.json)ã®/system/listenerAddressãæå®ããŸããå°æ¥ã®æ¡åŒµçšã®ãã©ã¡ãŒã¿ã§ãã |
restPort | ïŒ | 10040 | GridDBã®ããŒãå®çŸ©ãã¡ã€ã«(gs_node.json)ã®/system/listenerPortãæå®ããŸããå°æ¥ã®æ¡åŒµçšã®ãã©ã¡ãŒã¿ã§ãã |
clusterName | å¿ é | INPUT_YOUR_CLUSTER_NAME_HERE | ã¯ã©ã¹ã¿æ§æãçµã(gs_joinclusterã³ãã³ãã§æå®ïŒéã«æå®ããŠããã¯ã©ã¹ã¿åãæå®ããŸãã |
logPath | ïŒ | /var/lib/gridstore/log | ãšã¯ã¹ããŒãã»ã€ã³ããŒãããŒã«ã®å®è¡æã®ãšã©ãŒæ å ±ãªã©ã®ãã°ãåºåãããã£ã¬ã¯ããªãæå®ããŸãããã£ã¬ã¯ããªäžã«ãgs_expimp-YYYYMMDD.log ã§ãã°ãåºåãããŸãã |
commitCount | ïŒ | 1000 | ã€ã³ããŒãã§ã³ã³ããããŒã¿ãç»é²ããéã«ããŒã¿ãç»é²ããåäœãšããŠãããŠä»¶æ°ãæå®ããŸããæ°å€ã倧ãããããšããŒã¿åŠçã®ããã®ãããã¡ã倧ãããªããŸããããŠãµã€ãºãå°ããå Žåã¯æ°å€ãäžããããŠãµã€ãºã倧ããå Žåã¯æ°å€ãäžããŠãã ãããããŒã¿ã€ã³ããŒãã®ç»é²æ§èœã«åœ±é¿ãããã©ã¡ãŒã¿ã§ãã |
transactionTimeout | ïŒ | 2147483647 | ãã©ã³ã¶ã¯ã·ã§ã³éå§ããçµäºãŸã§ã®æéãæå®ããŸãã倧éããŒã¿ã®ç»é²ã»ååŸæã«ã¯ãããŒã¿éã«åããã倧ããªæ°å€ãèšå®ããå¿ èŠããããŸããããã©ã«ãã¯ã倧éããŒã¿åŠççšã«æ倧å€ãæå®ãããŠããŸãã(åäœïŒç§) |
failoverTimeout | ïŒ | 10 | ããŒã«ãããŒãé害ãæ€ç¥ããŠãããªãã©ã€ãç¹°ãè¿ããã§ã€ã«ãªãŒããŒæéãæå®ããŸããã€ã³ããŒã/ãšã¯ã¹ããŒãã®å¯Ÿè±¡ã¯ã©ã¹ã¿ãžã®åææ¥ç¶ã®ã¿ã€ã ã¢ãŠãã«ãçšããããŸããã³ã³ãããžã®å€§éããŒã¿ç»é²ã»ååŸãªã©ã®åŠçãè¡ãå Žåã¯ãå€ãå¢ãããŠãã ããã(åäœïŒç§) |
jdbcLoginTimeout | ïŒ | 10 | JDBCã®åææ¥ç¶ã®ã¿ã€ã ã¢ãŠãæéã§ãã(åäœïŒç§) |
notificationInterfaceAddress | ïŒ | â»OSã«äŸå | è€æ°ã®ãããã¯ãŒã¯ã€ã³ã¿ãŒãã§ãŒã¹ããããšãã«ã¯ã©ã¹ã¿ã®ãããã¯ãŒã¯æ§æããã«ããã£ã¹ãæ¹åŒã«ããå Žåããã«ããã£ã¹ããã±ãããåä¿¡ããã€ã³ã¿ãŒãã§ãŒã¹ã®IPã¢ãã¬ã¹ãæå®ããŸãã |
intervalTimeZone | ïŒ | GMT | ãšã¯ã¹ããŒãã»ã€ã³ããŒãã®å¯Ÿè±¡ã®ã³ã³ãããæ¥ä»èç©åã³ã³ããã®å Žåã«ããšã¯ã¹ããŒãã»ã€ã³ããŒãã®ã³ãã³ãã®intervalsãªãã·ã§ã³ã®TimeZoneãèšå®ããŸããTimeZoneèšå®ãšããŠãã¿ã€ã ãŸãŒã³ãŸãã¯GMT+HH:mmãã©ãŒãããã§TimeZoneãæå®ããŸãã |
ããã§ã¯ããšã¯ã¹ããŒãæ©èœãå©çšããéã«æå®ã§ãããªãã·ã§ã³ã«ã€ããŠãšã¯ã¹ããŒãã®äœ¿çšäŸãå ã«èª¬æããŸãã
GridDBã¯ã©ã¹ã¿ããã³ã³ãããåãåºãã«ã¯ãã¯ã©ã¹ã¿ã®å šã³ã³ãããæå®ããæ¹æ³ãããŒã¿ããŒã¹ãæå®ããæ¹æ³ãã³ã³ãããåå¥ã«æå®ããæ¹æ³ããããŸãã
(1) å šãŠã®ã³ã³ããã®æå®
-
ã¯ã©ã¹ã¿å ã®å šãŠã®ããŒã¿ããŒã¹ã®å šãŠã®ã³ã³ããã察象ã
-
--allãªãã·ã§ã³ãæå®ã
-
ãäŸã
$ gs_export --all -u admin/admin
-
ãã¡ã¢ã
- äžè¬ãŠãŒã¶ãå®è¡ããæãäžè¬ãŠãŒã¶ãã¢ã¯ã»ã¹æš©ãæã€å šããŒã¿ããŒã¹å ã®ã³ã³ããã察象ã«ãªããŸãã
(2) ããŒã¿ããŒã¹ã®æå®
-
æå®ããããŒã¿ããŒã¹ã®å šãŠã®ã³ã³ããã察象ã
-
--dbãªãã·ã§ã³ã§ããŒã¿ããŒã¹åãæå®ãè€æ°ã®ããŒã¿ããŒã¹åã" "(ãã©ã³ã¯)ã§åºåã£ãŠç¹°è¿ãæå®ããããšãå¯èœã
-
ãäŸã
$ gs_export --db db001 db002 -u admin/adminã//DBåãåæãDBå ã®ã³ã³ãã
-
ãã¡ã¢ã
- äžè¬ãŠãŒã¶ãå®è¡ããæã--dbã§æå®ããããŒã¿ããŒã¹ã«å¯Ÿããã¢ã¯ã»ã¹æš©ãç¡ãå Žåã¯ããšã©ãŒã«ãªããŸãã(--forceãæå®ããŠãããšãåŠçã¯ç¶ç¶ãããŸãã)
(3) ã³ã³ããã®åå¥æå®
-
æå®ããã³ã³ããã察象
-
ã³ã³ããåãåæ
- --containerãªãã·ã§ã³ã§è€æ°ã®ã³ã³ããåã" "(ãã©ã³ã¯)ã§åºåã£ãŠç¹°è¿ãæå®ã
-
ã³ã³ããåã®æ£èŠè¡šçŸæå®
- --containerregexãªãã·ã§ã³ã§ã³ã³ããåãæ£èŠè¡šçŸã§æå®ãæå®ã«ã¯Javaã®æ£èŠè¡šçŸãå©çšå¯èœãæ£èŠè¡šçŸã§æå®ããå Žåã¯""ïŒããã«ã¯ã©ãŒããŒã·ã§ã³ïŒã§æå®ãæ¬ããŸãã
-
ãäŸã
$ gs_export --container c001 c002 -u admin/adminããã //ã³ã³ããåãåæ $ gs_export --containerregex "^c0" -u admin/adminããã//æ£èŠè¡šçŸæå®ïŒã³ã³ããåãc0ã§å§ãŸãã³ã³ããã®æå®
-
ãã¡ã¢ã
- --container/--containerregexãªãã·ã§ã³ã§ã¯ã--prefixdbãªãã·ã§ã³ã§å¯Ÿè±¡ã®ããŒã¿ããŒã¹åãæå®ããŸãã --prefixdb ãªãã·ã§ã³ãçç¥ããå Žåã¯ãããã©ã«ãã®æ¥ç¶å ããŒã¿ããŒã¹ãpublicãå ã®ã³ã³ãããåŠç察象ã«ãªããŸãã
- äžè¬ãŠãŒã¶ãå®è¡ããæã--container/--containerregexãªãã·ã§ã³ã§æå®ããã³ã³ãããæ ŒçŽãããŠããããŒã¿ããŒã¹ã«å¯Ÿããã¢ã¯ã»ã¹æš©ãç¡ãå Žåã¯ããšã©ãŒã«ãªããŸãã(--forceãæå®ããŠãããšãåŠçã¯ç¶ç¶ãããŸãã)
ã³ã³ãããããšã¯ã¹ããŒãããéã«ãã©ã®ããŠãåºåãããæ¡ä»¶ãæå®ã§ããŸãã æ¡ä»¶ã®æå®æ¹æ³ã¯ã ãšã¯ã¹ããŒãã³ã³ããçš®å¥æ¯ã«ãããã以äžã®æ¹æ³ãçšããããšãã§ããŸãã
ãšã¯ã¹ããŒãã³ã³ããçš®å¥ ã | æå®ã®çš®å¥ ãã | æ¹æ³ |
---|---|---|
ç»é²æŽæ°åã³ã³ãã ã | æ€çŽ¢ã¯ãšãªã«ããæå® ããã | ã³ã³ããåãšæ€çŽ¢ã¯ãšãªãå®çŸ©ããŠæå® |
æ¥ä»èç©åã³ã³ãã | ã¿ã€ã ã€ã³ã¿ãŒãã«ã«ããæå® | åãåºãããŠã®ããŒ(TIMESTAMPå)ã«ã€ããŠã®æ¥ä»ç¯å²ãæå® |
æ¡ä»¶ãæå®ãããŠããªãã³ã³ããã¯ãã³ã³ããã«æ ŒçŽãããŠãããã¹ãŠã®ããŠããšã¯ã¹ããŒããããŸãã
âæ€çŽ¢ã¯ãšãªãçšããæå® ãšã¯ã¹ããŒãã³ã³ããçš®å¥ãç»é²æŽæ°åã³ã³ããã®å Žåã«å©çšã§ããæ¹æ³ã§ãã
- --filterfileãªãã·ã§ã³ã§ãã³ã³ããåãšæ€çŽ¢ã¯ãšãªãèšè¿°ããå®çŸ©ãã¡ã€ã«ãæå®ããŸããå®çŸ©ãã¡ã€ã«ã«ã¯ãæ€çŽ¢ã¯ãšãªãé©çšãã察象ã®ã³ã³ãããšãæ€çŽ¢ã¯ãšãªãèšè¿°ããŠãã ããã
ãäŸãå®è¡äŸ
$ gs_export -c c001 c002 -u admin/admin --filterfile filter1.txt
ãã
$ gs_export --all -u admin/admin --filterfile filter2.txt
ãäŸãå®çŸ©ãã¡ã€ã«ã®èšè¿°
^cont_month :select * where time > 100 [æ¹è¡]
^cont_minutes_.*:select * where flag = 0 [æ¹è¡]
cont_year2014 :select * where timestamp > TIMESTAMP('2014-05-21T08:00:00.000Z') [æ¹è¡]
ãã¡ã¢ã
- ã³ã³ããã¯ãJavaã®æ£èŠè¡šçŸã§æå®ããŸãã äŸ) "container1"ãšèšè¿°ãããšãcontainer1ãå«ãã³ã³ããã該åœããŸã(container10, container12ãªã©)ãå®å šäžèŽã®å Žåã¯ã"^container1$"ãšèšè¿°ããŠãã ããã
- --allã-cãªãã·ã§ã³ã§æå®ããããšã¯ã¹ããŒã察象ã³ã³ããã®äžã§ãå®çŸ©ãã¡ã€ã«ã«èšè¿°ãããå®çŸ©ã«åœãŠã¯ãŸããªãã³ã³ããã¯ããã¹ãŠã®ããŠããšã¯ã¹ããŒããããŸãã
- ã³ã³ãããšæ€çŽ¢ã¯ãšãªã®åºåãã¯":"ãæå®ããã³ã³ãããšæ€çŽ¢ã¯ãšãªã¯1è¡ã§èšè¿°ããŠãã ããã
- ã³ã³ãããè€æ°ã®å®çŸ©ã«è©²åœããå Žåãæåã«èšè¿°ãããå®çŸ©ãé©çšãããŸãã
- ãã¡ã€ã«ã¯UTF-8ã§èšè¿°ããŠãã ããã
- ãšã¯ã¹ããŒãã®ãã¹ãæ©èœãå®è¡ãããšãå®çŸ©ãã¡ã€ã«ã®èšè¿°ãæ£ãããã確èªããããšãã§ããŸãã
- ORDER BYã¯äœ¿çšã§ããŸããã
âã¿ã€ã ã€ã³ã¿ãŒãã«ã«ããæå® ãšã¯ã¹ããŒãã³ã³ããçš®å¥ãæ¥ä»èç©åã³ã³ããã®å Žåã«å©çšã§ããæ¹æ³ã§ãã
- --intervals ãªãã·ã§ã³ã§ãåãåºãããŠã®æ¥ä»ç¯å²ãæå®ããŸããã³ã³ããã®ããŒïŒæ¥ä»èç©åã³ã³ããã®å ŽåãTIMESTAMPåã§ãïŒãšæ¯èŒããŸãã
ãäŸãå®è¡äŸ
$ gs_export -c tsc001 tsc002 -d ./2021/ --intervals 20210101:20211231
$ gs_export --all -u admin/admin -d ./20210131/ --intervals 20210101:20210131
ãã¡ã¢ã
- ã¿ã€ã ã€ã³ã¿ãŒãã«ã®æå®ãè¡ããªãå Žåã察象ãšãªãã³ã³ããã®ãã¹ãŠã®æéã®ããŒã¿ãåºåã®å¯Ÿè±¡ãšãªããŸãã
- --all ã§ãã¹ãŠã®ã³ã³ãããæå®ããŸããããã®ãã¡ãæ¥ä»èç©åã³ã³ããã®ã¿ãåºåã®å¯Ÿè±¡ãšãªããŸãã
- è€æ°ã®ããŠããŒã¿ãã¡ã€ã«ãåºåãããã®ã§ãåºåå ã®ãã£ã¬ã¯ããªã -d ãªãã·ã§ã³ã«ããåãããŠæå®ããããšãæšå¥šããŸãã
GridDBã¯ã©ã¹ã¿ã®ãŠãŒã¶ãã¢ã¯ã»ã¹æš©ã®æ å ±ããšã¯ã¹ããŒãããããšãã§ããŸãã ã¯ã©ã¹ã¿äžã®ãã¹ãŠã®ããŒã¿ã移è¡ããå Žåã«ãå©çšãã ããã
- --aclãªãã·ã§ã³ãš--allãªãã·ã§ã³ãŸãã¯--dbãªãã·ã§ã³ãæå®ããã ãããšã¯ã¹ããŒãã§ãããŠãŒã¶æ å ±ã¯ãäžè¬ãŠãŒã¶ã®ã¿ã§ãã管çãŠãŒã¶ã®æ å ±ã¯å¥é移è¡ïŒãŠãŒã¶å®çŸ©ãã¡ã€ã«ãã³ããŒïŒããŠãã ããã
ãäŸã
$ gs_export --all -u admin/admin --acl
$ gs_export --db db001 -u admin/admin --acl
ãã¡ã¢ã
- 管çãŠãŒã¶ã§å®è¡ããå¿ èŠããããŸãã
GridDBã¯ã©ã¹ã¿ã®ãã¥ãŒãã³ã³ãããšåãããŠãšã¯ã¹ããŒãããããšãã§ããŸãã
ã--allãªãã·ã§ã³ãŸãã¯--dbãªãã·ã§ã³ãæå®ãããšãããšã¯ã¹ããŒã察象ã®ããŒã¿ããŒã¹ã®ãã¥ãŒããšã¯ã¹ããŒããããŸãã
$ gs_export --db public -u admin/admin
ãšã¯ã¹ããŒããéå§ããŸã
åºåãã£ã¬ã¯ã㪠: /tmp/export
:
察象ã³ã³ããæ° : 5 ( æå:5 倱æ:0 )
察象ãã¥ãŒæ° : 15
ãšã¯ã¹ããŒããçµäºããŸãã
ããŠããŒã¿ãã¡ã€ã«ã®åºå圢åŒãšããŠãCSVããŒã¿ãã¡ã€ã«ããããã¯ãã€ããªããŒã¿ãã¡ã€ã«ãæå®ã§ããŸãã ç»é²æŽæ°åã³ã³ãããããã³ãæ¥ä»èç©åã³ã³ããã®ãããã«å¯ŸããŠãæå®å¯èœã§ãã
-
CSVããŒã¿ãã¡ã€ã«ã§ã®åºå
- --binaryãªãã·ã§ã³ãæå®ããã«ãšã¯ã¹ããŒããå®è¡ããŸãã
-
ãã€ããªããŒã¿ãã¡ã€ã«ã§ã®åºå
- --binary [ãã¡ã€ã«ãµã€ãºäžé] ãªãã·ã§ã³ãæå®ããŸãã
- æå®ãããã¡ã€ã«ãµã€ãºäžéã§ãã€ããªããŒã¿ãã¡ã€ã«ãåå²ããŠãšã¯ã¹ããŒãããŸãã
- ãã¡ã€ã«ãµã€ãºäžéã¯Mbytesåäœã§æå®ããŸãããã¡ã€ã«ãµã€ãºäžéã®æå®ãçç¥ãããšãµã€ãºäžéã¯100MbytesãšãªããŸããæå®ã§ããæ倧ãã¡ã€ã«ãµã€ãºã¯1,000Mbytesã§ãã
ãäŸã
$ gs_export -c c001 c002 -u admin/admin --binary
ãã
$ gs_export --all -u admin/admin --binary 500 //500Mbytesããšã«ãã€ããªããŒã¿ãã¡ã€ã«ãåå²
ç»é²æŽæ°åã³ã³ããããšã¯ã¹ããŒãããå Žåãåºåããã³ã³ããããŒã¿ãã¡ã€ã«ã®æ§æãæå®ã§ããŸãã
ã³ã³ããåäœã«ã³ã³ããããŒã¿ãã¡ã€ã«ãäœæããã·ã³ã°ã«ã³ã³ããããŒã¿ãã¡ã€ã«ããããã¯å šã³ã³ãããïŒã€ã®ã³ã³ããããŒã¿ãã¡ã€ã«ã«åºåãããã«ãã³ã³ããããŒã¿ãã¡ã€ã«ãæå®ã§ããŸãã
-
ã·ã³ã°ã«ã³ã³ããããŒã¿ãã¡ã€ã«ã§ã®åºå
- ãšã¯ã¹ããŒãæã«--outãªãã·ã§ã³ãæå®ããªãå Žåãã·ã³ã°ã«ã³ã³ããããŒã¿ãã¡ã€ã«ã§åºåãããŸãã
-
ãã«ãã³ã³ããããŒã¿ãã¡ã€ã«ã§ã®åºå
- --out [ãã¡ã€ã«èå¥å] ãªãã·ã§ã³ãæå®ããŸãããã¡ã€ã«èå¥åã®æå®ã«ãããã¡ã¿ããŒã¿ãã¡ã€ã«ã®ãã¡ã€ã«åã¯ããã¡ã€ã«èå¥å_properties.jsonããšãªããŸãã ãã«ãã³ã³ããããŒã¿ãã¡ã€ã«ãCSVããŒã¿ãã¡ã€ã«ã®å Žåããã¡ã€ã«èå¥å.csvãããã€ããªããŒã¿ãã¡ã€ã«ã®å Žåããã¡ã€ã«èå¥å_divN.mcã(Nã¯åå²ããããã¡ã€ã«ã®é£çª)ãšãªããŸãã ãã¡ã€ã«èå¥åã®é·ãã¯20æåãŸã§ã§ãã
- --out [ãã¡ã€ã«èå¥å] ãªãã·ã§ã³ã§ãã¡ã€ã«èå¥åãçç¥ããå Žåããã¡ã€ã«èå¥åã¯å®è¡ããæ¥æã«ãªããŸããïŒäŸïŒ20131031_155015_810_properties.json ,20131031_155015_810.csvïŒ
ãäŸã
$ gs_export -c c001 c002 -u admin/admin --out test
ãã
$ gs_export --all -u admin/admin --out //æ¥ä»ã§ãã¡ã€ã«ãäœæããã
ã³ã³ããããŒã¿ãã¡ã€ã«ã®åºåå ãšããŠããã£ã¬ã¯ããªãæå®ã§ããŸããæå®ãããã£ã¬ã¯ããªãååšããªãã£ãå Žåã«ã¯ãã£ã¬ã¯ããªãäœæããŸãã ãã£ã¬ã¯ããªã®æå®ãçç¥ããå Žåãã³ãã³ãå®è¡æã®ã«ã¬ã³ããã£ã¬ã¯ããªã«ããŒã¿ãåºåããŸããåºåå ã®æå®ã¯-dãªãã·ã§ã³ãçšããŸãã
ãäŸã
$ gs_export --all -u admin/admin --out test -d /tmp
ãã¡ã¢ã
- æ¢ã«ã³ã³ããããŒã¿ãã¡ã€ã«ãååšãããã£ã¬ã¯ããªã¯æå®ã§ããŸããã
ãšã¯ã¹ããŒãããŒã«ã§äžŠåã«ã¯ã©ã¹ã¿ã«ã¢ã¯ã»ã¹ããŠããŒã¿ãååŸããŸããã¯ã©ã¹ã¿ãè€æ°ã®ããŒãã§æ§æãããŠããå Žåã«äžŠåå®è¡ãããšãããŒãããšã«äžŠåã¢ã¯ã»ã¹ããã®ã§é«éã«ååŸããããšãã§ããŸãã
- --parallelãªãã·ã§ã³ãæå®ããããšã§ãæå®ãããæ°ã§äžŠåå®è¡ãè¡ããŸãã䞊åå®è¡ãè¡ããšããšã¯ã¹ããŒãããŒã¿ã¯äžŠåå®è¡æ°ãšåãæ°ã§åå²ãããŸããæå®ç¯å²ã¯ã2ãã32ãŸã§ã§ãã
ãã¡ã¢ã
- --parallelãªãã·ã§ã³ã¯ããã€ããªåœ¢åŒ(--binaryãªãã·ã§ã³)ãããã³ããã«ãã³ã³ãã圢åŒ(--outãªãã·ã§ã³)ãæå®ããå Žåã®ã¿æå®ã§ããŸãã
ãäŸã
$ gs_export --all -u admin/admin --binary --out --parallel 4
å©çšè ãã³ã³ããããšã¯ã¹ããŒãããåã«ãæ£ãããšã¯ã¹ããŒããè¡ããããè©äŸ¡ããããšãã§ããŸãã
- ãã¹ãå®è¡æå®
- éåžžã®ãšã¯ã¹ããŒãã³ãã³ãã®å©çšã«å¯ŸããŠã--testãªãã·ã§ã³ãè¿œå ããã ãã§ããšã¯ã¹ããŒãã·ãŒã±ã³ã¹ã確èªããããšãã§ããŸãã確èªã®ã¿ã§å®éã®ååŸåŠçã¯è¡ããªãã®ã§ããã¡ã€ã«ã¯äœæãããŸããã
- ãã¹ãå®è¡æãã³ã³ããåãããŒãã£ã·ã§ã³IDãããŠæ°ã®æ å ±ã衚瀺ããŸãã
ãäŸã
$ gs_export -u admin/admin --all --test
ãšã¯ã¹ããŒããéå§ããŸã
[ãã¹ãã¢ãŒã]
åºåãã£ã¬ã¯ã㪠: /var/lib/gridstore/export
察象ã³ã³ããæ° : 5
Name PartitionId Row
------------------------------------------------------------------
public.container_2 15 10
public.container_3 25 20
public.container_0 35 10
public.container_1 53 10
public.container_4 58 20
察象ã³ã³ããæ° : 5 ( æå:5 倱æ:0 )
察象ãã¥ãŒæ° : 15
ãšã¯ã¹ããŒããçµäºããŸãã
å¥ã¢ããªã±ãŒã·ã§ã³ãšã®ããã¯ç«¶åã«ãã£ãŠããŠããŒã¿ååŸãšã©ãŒãçºçããå Žåãããšã¯ã¹ããŒãåŠçãç¶ç¶ã§ããŸãã
- --forceãªãã·ã§ã³ãæå®ããããšã§ãããŠããŒã¿ååŸãšã©ãŒãçºçããŠãã次ã³ã³ããã®ããŠããŒã¿ãããšã¯ã¹ããŒãåŠçãç¶ç¶ããŸãã
ãäŸã
$ gs_export --all -u admin/admin --force
ãã¡ã¢ã
-
ãšã©ãŒã«ãã£ãŠåŠçãã¹ãããããã³ã³ããã«ã€ããŠããäžå®å šã§ããã³ã³ããããŒã¿ãã¡ã€ã«ã«æ å ±ãåºåããŸãããã ãããšã¯ã¹ããŒãå®è¡ãã¡ã€ã«ã«ã¯èšé²ããŠããªããããã€ã³ããŒãåŠçãããããšã¯ãããŸãããããŠããŒã¿ååŸãšã©ãŒè§£æ±ºåŸãåœè©²ã³ã³ããã®ãšã¯ã¹ããŒãåŠçãåå®è¡ããŠãã ããã
-
--forceãªãã·ã§ã³ãæå®ããŠããªãå Žåããšã©ãŒãçºçããæç¹ã§ããšã¯ã¹ããŒãåŠçãçµäºããŸãã
ãäŸã
$ gs_export --all -u admin/admin
ãšã¯ã¹ããŒããéå§ããŸã
åºåãã£ã¬ã¯ã㪠: /var/lib/gridstore/export
察象ã³ã³ããæ° : 6
Name PartitionId Row
------------------------------------------------------------------
public.container_2 15 10
public.container_3 25 20
[ãšã©ãŒãçºç]
察象ã³ã³ããæ° : 6 ( æå:2 倱æ:1 æªåŠç:3 )
ãšã¯ã¹ããŒããçµäºããŸãã
ã泚æã
- --parallelãªãã·ã§ã³ã®æå®æã«ãšã©ãŒãçºçããŠãããšã¯ã¹ããŒãåŠçãããã«çµäºããªãå ŽåããããŸãã
åäœè¡šç€ºã®è©³çŽ°æå®
- --verboseãªãã·ã§ã³ãæå®ããããšã§ãåŠçã®è©³çŽ°ã衚瀺ããããšãã§ããŸãã
ãäŸã
$ gs_export --containerregex "^c0" -u admin/admin --verbose
ãšã¯ã¹ããŒããéå§ããŸã
åºåãã£ã¬ã¯ã㪠: /data/exp
察象ã³ã³ããæ° : 4
public.c003 : 1
public.c002 : 1
public.c001 : 1
public.c010 : 1
ããŠããŒã¿ã®ååŸãå®äºããŸãã: time=[5080]
察象ã³ã³ããæ° : 4 ( æå:4 倱æ:0 )
ãšã¯ã¹ããŒããçµäºããŸãã
åäœè¡šç€ºã®ææ¢æå®
- --silentãªãã·ã§ã³ãæå®ããããšã§ãåŠçç¶æ³ã®è¡šç€ºãæå¶ã§ããŸãã
ãäŸã
$ gs_export -c c002 c001 -u admin/admin --silent
ã³ã³ããããŒã¿ãã¡ã€ã«ã®ããŒã¿ããGridDBã¯ã©ã¹ã¿ã«ã€ã³ããŒãããŸãã
ã€ã³ããŒãããŒã«ã®å ¥åããŒã¿ãœãŒã¹ã«ã¯ã以äžããããŸãã
- ã³ã³ããããŒã¿ãã¡ã€ã«ïŒãšã¯ã¹ããŒãæ©èœã§ä¿åããã³ã³ããããŒã¿ããŸãã¯ãŠãŒã¶ãäœæããã³ã³ããããŒã¿
ãšã¯ã¹ããŒãæ©èœã§ãšã¯ã¹ããŒãããããŒã¿åœ¢åŒã®ããŒã¿ãGridDBã¯ã©ã¹ã¿ã«ã€ã³ããŒãããŸãã
ã³ã³ããããŒã¿ãã¡ã€ã«ã®äžããã€ã³ããŒãããåŠç察象ã®ããŒã¿ãæå®ããå¿ èŠããããŸãã
ã³ã³ããããŒã¿ãã¡ã€ã«å ã®å šã³ã³ãããæå®ããæ¹æ³ãããŒã¿ããŒã¹ãæå®ããæ¹æ³ãã³ã³ãããåå¥ã«æå®ããæ¹æ³ããããŸãã
(1) å šãŠã®ã³ã³ããã®æå®
-
å šãŠã®ããŒã¿ããŒã¹ã®å šãŠã®ã³ã³ããã察象
-
--allãªãã·ã§ã³ãæå®
-
ãäŸã
$ gs_import --all -u admin/admin
(2) ããŒã¿ããŒã¹ã®æå®
-
æå®ããããŒã¿ããŒã¹ã®å šãŠã®ã³ã³ããã察象ã
-
ããŒã¿ããŒã¹åãåæ
- --dbãªãã·ã§ã³ã§è€æ°ã®ããŒã¿ããŒã¹åã" "(ãã©ã³ã¯)ã§åºåã£ãŠç¹°è¿ãæå®ã
-
ãäŸã
$ gs_import --db db001 db002 -u admin/adminã//DBåãåæãDBå ã®ã³ã³ãã
(3) ã³ã³ããã®åå¥æå®
-
æå®ããã³ã³ããã察象ã
-
ã³ã³ããåãåæ
- --containerãªãã·ã§ã³ã§è€æ°ã®ã³ã³ããåã" "(ãã©ã³ã¯)ã§åºåã£ãŠç¹°è¿ãæå®ã
-
ã³ã³ããåã®æ£èŠè¡šçŸæå®
- --containerregexãªãã·ã§ã³ã§ã³ã³ãããæ£èŠè¡šçŸã§æå®ãæå®ã«ã¯Javaã®æ£èŠè¡šçŸãå©çšå¯èœãæ£èŠè¡šçŸã§æå®ããå Žåã¯""ïŒããã«ã¯ã©ãŒããŒã·ã§ã³ïŒã§æå®ãæ¬ããŸãã
-
ãäŸã
$ gs_import --container c001 c002 -u admin/adminã//ã³ã³ããåãåæ $ gs_import --containerregex "^c0" -u admin/adminããã//æ£èŠè¡šçŸæå®ïŒã³ã³ããåãc0ã§å§ãŸãã³ã³ããã®æå®
ã泚æäºé ã
- GridDB V3.2以åã§ãšã¯ã¹ããŒãããããŒã¿ã«NewSQL I/Fã§äœæããããŒãã«ãå«ãŸããå ŽåãV3.5以éã§ã¯ã³ã¬ã¯ã·ã§ã³ãšããŠã€ã³ããŒããããŸãããŸããããŒãã«ã®çŽ¢åŒã«èšå®ãããŠãã玢åŒåã¯ã€ã³ããŒããããŸããã
ãã¡ã¢ã
- 管çãŠãŒã¶ã§å®è¡ããæãã³ã³ããã®æ ŒçŽå ã®ããŒã¿ããŒã¹ãååšããªãå Žåã¯ããŒã¿ããŒã¹ãäœæããŸãã
- äžè¬ãŠãŒã¶ãå®è¡ããæãã³ã³ããã®æ ŒçŽå ã®ããŒã¿ããŒã¹ãååšããªãå ŽåããŸãã¯ã¢ã¯ã»ã¹æš©ãç¡ãå Žåã¯ããšã©ãŒã«ãªããŸãã(--forceãæå®ããŠãããšãåŠçã¯ç¶ç¶ãããŸãã)
- --container/--containerregexãªãã·ã§ã³ãæå®ããå Žåã--prefixdbãªãã·ã§ã³ã§å¯Ÿè±¡ã®ããŒã¿ããŒã¹åãæå®ããŸãã --prefixdbãªãã·ã§ã³ãçç¥ããå Žåã¯ãããã©ã«ãã®æ¥ç¶å ããŒã¿ããŒã¹ãpublicããåŠç察象ã«ãªããŸãã
- ã³ã³ããããŒã¿ãã¡ã€ã«ã«æ ŒçŽãããŠããã³ã³ããäžèŠ§ã¯--listãªãã·ã§ã³ã§ç¢ºèªããŠãã ããã
ãšã¯ã¹ããŒãæ©èœã§--aclãªãã·ã§ã³ãæå®ããŠãšã¯ã¹ããŒãããããŒã¿ã®å ŽåããŠãŒã¶ãã¢ã¯ã»ã¹æš©ã®æ å ±ãã€ã³ããŒãããããšãã§ããŸãã ã¯ã©ã¹ã¿äžã®ãã¹ãŠã®ããŒã¿ã移è¡ããå Žåã«ãå©çšãã ããã
- --aclãªãã·ã§ã³ãš--allãªãã·ã§ã³ãŸãã¯--dbãªãã·ã§ã³ãæå®ã
ãäŸã
$ gs_import --all --acl -u admin/admin
$ gs_import --db db001 --acl -u admin/admin
ãã¡ã¢ã
- 管çãŠãŒã¶ã§å®è¡ããå¿ èŠããããŸãã
- ã¯ã©ã¹ã¿äžã®ãã¹ãŠã®ããŒã¿ã移è¡ããå Žåã«ãå©çšãã ããã移è¡å ã«ã¯ããŒã¿ããŒã¹ã»äžè¬ãŠãŒã¶ãååšããªãç¶æ ã§å®è¡ããŠãã ããã
ãšã¯ã¹ããŒãæ©èœã§ãã¥ãŒããšã¯ã¹ããŒãããããŒã¿ã®å Žåãã³ã³ããããŒã¿ãšå ±ã«ãã¥ãŒãã€ã³ããŒãããããšãã§ããŸãã
--allãªãã·ã§ã³ãŸãã¯--dbãªãã·ã§ã³ãæå®ãããšããã€ã³ããŒã察象ã®ããŒã¿ããŒã¹ã®ãã¥ãŒã ã€ã³ããŒããããŸãã
ãã¡ã¢ã
- --replaceãªãã·ã§ã³ãæå®ãããå Žåããã¥ãŒã®ã€ã³ããŒãã¯æ¬¡ã®åäœãšãªããŸãã
- ååã®ã³ã³ãããååšããå Žåã¯ãšã©ãŒãšãªããŸãã--forceãªãã·ã§ã³ãæå®ããå Žåããšã©ãŒãšãªããŸãã
- ååã®ãã¥ãŒãååšããå Žåã¯ãæ¢åã®ãã¥ãŒãåé€ããæ°ãã«ãã¥ãŒãäœæããŸãã
- äœæããããã¥ãŒã®ãã¡ãåç §äžå¯èœãªãã¥ãŒããã£ãå Žåããã®æšã衚瀺ãããŸãã
ã€ã³ããŒãããã³ã³ããããŒã¿ãã¡ã€ã«ãæå®ããŸãã æ¥ä»èç©åã³ã³ããã®å Žåã«ã®ã¿ãã€ã³ããŒãããæ¥ä»ç¯å²ã®æå®ãå¯èœã§ãã
æå®æ¹æ³ | ãšã¯ã¹ããŒãã³ã³ããçš®å¥ | 説æ |
---|---|---|
ãã£ã¬ã¯ããªãæå® | ç»é²æŽæ°åã³ã³ããã | ãã£ã¬ã¯ããªå ã§ã€ã³ããŒãããã³ã³ãããæå®ããŸã |
ãæ¥ä»èç©åã³ã³ãã | åäž | |
ã¿ã€ã ã€ã³ã¿ãŒãã«ãæå® | æ¥ä»èç©åã³ã³ãã(ã®ã¿) | ã€ã³ããŒãããæ¥ä»ç¯å²ãæå®ããŸã |
âãã£ã¬ã¯ããªãæå®
- -dãªãã·ã§ã³ã§ã³ã³ããããŒã¿ãã¡ã€ã«ã®é 眮ãããŠãããã£ã¬ã¯ããªãæå®ããŸãã
- ãã£ã¬ã¯ããªã®æå®ãçç¥ãããå Žåãã³ãã³ãå®è¡æã®ã«ã¬ã³ããã£ã¬ã¯ããªã®ã³ã³ããããŒã¿ãã¡ã€ã«ã察象ãšãªããŸãã
ãäŸã
//ã«ã¬ã³ããã£ã¬ã¯ããªããå
šã³ã³ãããæå®
$ gs_import --all -u admin/admin
//ç¹å®ãã£ã¬ã¯ããªããããŒã¿ããŒã¹ãè€æ°æå®
$ gs_import --db db002 db001 -u admin/admin -d /data/expdata
//ç¹å®ãã£ã¬ã¯ããªããã³ã³ãããè€æ°æå®
$ gs_import -c c002 c001 -u admin/admin -d /data/expdata
ãã¡ã¢ã
- ã³ã³ããããŒã¿ãã¡ã€ã«ã®æåäœæçã«ããããšã¯ã¹ããŒãå®è¡æ å ±ãã¡ã€ã«(gs_export.json)ãååšããªãå Žåã«ã¯ã-fãªãã·ã§ã³ã§ã¡ã¿ããŒã¿ãã¡ã€ã«(XXXXX_properties.json)ãæå®ããŠãã ããã-fãªãã·ã§ã³ãæå®ããªãå Žåãã€ã³ããŒãã¯å€±æããŸãã
âã¿ã€ã ã€ã³ã¿ãŒãã«ãæå®
- --intervals ãªãã·ã§ã³ã§ã€ã³ããŒãããæ¥æç¯å²ãæå®ããŸãã
- æå®ãçç¥ãããå Žåããã¹ãŠã®æ¥æç¯å²ïŒãã¹ãŠã®ã³ã³ããããŒã¿ãã¡ã€ã«ïŒã察象ãšãªããŸãã
ãäŸã
//ã«ã¬ã³ããã£ã¬ã¯ããªããå
šã³ã³ãããæå®ããæå®ããç¹å®åºéã®ããŒã¿ã®ã¿ãã€ã³ããŒã
$ gs_import --all -u admin/admin --intervals 20210101:20211231
//ç¹å®ãã£ã¬ã¯ããªããããŒã¿ããŒã¹ãè€æ°æå®ããæå®ããç¹å®åºéã®ããŒã¿ã®ã¿ãã€ã³ããŒã
$ gs_import --db db002 db001 -u admin/admin -d ./2021/ --intervals 20210101:20211231
//ç¹å®ãã£ã¬ã¯ããªããã³ã³ãããè€æ°æå®ããæå®ããç¹å®åºéã®ããŒã¿ã®ã¿ãã€ã³ããŒã
$ gs_import -c c002 c001 -u admin/admin -d ./20210131/ --intervals 20210101:20210131
ãã¡ã¢ã
- æ¥ä»èç©åã³ã³ããã®ãšã¯ã¹ããŒãããŒã¿ã察象ã§ããç»é²æŽæ°åã³ã³ããã«å¯ŸããŠã¯æå®ã§ããŸããã
ã³ã³ããããŒã¿ãã¡ã€ã«å ã«æ ŒçŽãããã³ã³ããæ å ±ãã€ã³ããŒãããåã«ç¢ºèªããããšãã§ããŸãã
ãäŸã
$ gs_import --list
ãšã¯ã¹ããŒãããŒã¿ãã¡ã€ã«ã®ã³ã³ããäžèŠ§ã衚瀺ããŸã
DB Name Type FileName
public container_2 COLLECTION container_2.csv
public container_0 TIME_SERIES container_0.csv
public container_1 COLLECTION container_1.csv
userDB container_1_db TIME_SERIES userDB.container_1_db.csv
userDB container_2_db TIME_SERIES userDB.container_2_db.csv
userDB container_0_db COLLECTION userDB.container_0_db.csv
ã€ã³ããŒãã§ã¯ãç¹å®ã®ãªãã·ã§ã³ã®æå®ããªããšãã¯ãç»é²ããããšããã³ã³ãããæ¢ã«GridDBã¯ã©ã¹ã¿å ã«ååšãããšãšã©ãŒãšãªããŸãã 次ã®ãªãã·ã§ã³ãæå®ããããšã§ãããŒã¿ã®è¿œå ãã眮ãæããã§ããŸããããŒã¿ç»é²ã§ã¯ãç»é²ã«æåããã³ã³ããæ°ãšå€±æããã³ã³ããæ°ã衚瀺ããŸãã
-
ããŒã¿ã®è¿œå æŽæ°
-
--appendãªãã·ã§ã³ãæå®ããããšã§ãæ¢åã®ã³ã³ãããžã®ããŒã¿ç»é²ãšæŽæ°ãã§ããŸãã
-
ããŒã¿ã®è¿œå ç»é²ã»æŽæ°ãã§ããã®ã¯ãæ¢åã®ã³ã³ãããšç»é²ããããšããã³ã³ããã®ã¹ããŒãããã³çŽ¢åŒã®èšå®æ å ±ãªã©ã®ã³ã³ããã®å®çŸ©æ å ±ãåäžã®å Žåã®ã¿ã§ãã
-
ã³ã³ããã®çš®é¡ã«å¿ããç»é²ã®åäœã¯ä»¥äžãšãªããŸãã
ã³ã³ããã®çš®é¡ Rowkeyæå® åäœ ã³ã¬ã¯ã·ã§ã³ æã ããŒãçããã«ã©ã ã¯æŽæ°ãããããŒãç°ãªãããŒã¿ã¯è¿œå ãããã ç¡ã ããŠããŒã¿ã¯ãã¹ãŠè¿œå ç»é²ããã æç³»åã³ã³ãã æã æå»ãæ¢åã®ç»é²ããŒã¿ããæ°ããå Žåãè¿œå ç»é²ãããã
æå»ãæ¢åã®ãã®ãšåãå Žåã«ã©ã ããŒã¿ãæŽæ°ãããã -
æç³»åã³ã³ããã«å¯ŸããŠåãæå»ã®ããŒã¿ãè¿œå ç»é²ããå Žåãæ¢åã®ããŠã«äžæžãç»é²ãããŸããããŠã¯å¢ããŸããã
-
--schemaCheckSkipãªãã·ã§ã³ãæå®ãããšãæ¢åã³ã³ããã®å®çŸ©æ å ±ã®ãã§ãã¯ãè¡ããŸããã æ°ãã«çŽ¢åŒãè¿œå ããŠã€ã³ããŒãããå Žåãªã©ãæ¢åã³ã³ããã®å®çŸ©ãšç°ãªãããŒã¿ãã€ã³ããŒãããéã«ã¯ãã®ãªãã·ã§ã³ãæå®ããŠãã ããã
-
-
ã³ã³ããã®çœ®ãæã
- --replaceãªãã·ã§ã³ãæå®ããããšã§ãæ¢åã®ã³ã³ãããåé€ããæ°ãã«ã³ã³ãããäœæãããŒã¿ãç»é²ããŸãã
ãäŸã
$ gs_import -c c002 c001 -u admin/admin --append
..ã€ã³ããŒããéå§ããŸãïŒè¿œèšã¢ãŒãïŒ
ã€ã³ããŒããå®äºããŸãã
æå:2 倱æ:0
ã
$ gs_import -c c002 c001 -u admin/admin --replaceãã //ç¹å®ã®ãã£ã¬ã¯ããªãã
..ã€ã³ããŒããéå§ããŸãïŒåé
眮ã¢ãŒãïŒ
ã€ã³ããŒããå®äºããŸãã
æå:2 倱æ:0
ã
$ gs_import --all -u admin/admin -d /datat/expdata --replace
ã³ã³ããããŒã¿ãã¡ã€ã«ã®ãŠãŒã¶ç·šéãã¹ã«ãã£ãŠç¹å®ã®ããŠããŒã¿ã§ç»é²ãšã©ãŒãçºçããå Žåããã€ã³ããŒãåŠçãç¶ç¶ã§ããŸãã
- --forceãªãã·ã§ã³ãæå®ããããšã§ãããŠããŒã¿ã®ç»é²ãšã©ãŒãçºçããŠãã次ã³ã³ããã®ããŠããŒã¿ããã€ã³ããŒãåŠçãç¶ç¶ããŸãã
ãäŸã
$ gs_import --all -u admin/admin -d /data/expdata --force
ãã¡ã¢ã
-
ãšã©ãŒãçºçããã³ã¬ã¯ã·ã§ã³ã¯ãã³ã³ããããŒã¿ãã¡ã€ã«ä¿®æ£åŸãã³ã³ãã眮ãæããªãã·ã§ã³ïŒ--replaceïŒãæå®ããŠåç»é²ããŠãã ããã
-
--forceãªãã·ã§ã³ãæå®ããŠããªãå Žåããšã©ãŒãçºçããæç¹ã§ãã€ã³ããŒãåŠçãçµäºããŸãã
ãäŸã
$ gs_import --all -u admin/admin
ã€ã³ããŒããéå§ããŸã
察象ã³ã³ããæ° : 6
Name PartitionId Row
------------------------------------------------------------------
public.container_2 15 10
public.container_3 25 20
[ãšã©ãŒãçºç]
察象ã³ã³ããæ° : 6 ( æå:2 倱æ:1 æªåŠç:3 )
ã€ã³ããŒããçµäºããŸãã
ã泚æã
- --parallelãªãã·ã§ã³ã®æå®æã«ãšã©ãŒãçºçããŠããã€ã³ããŒãåŠçãããã«çµäºããªãå ŽåããããŸãã
åäœè¡šç€ºã®è©³çŽ°æå®
- --verboseãªãã·ã§ã³ãæå®ããããšã§ãåŠçã®è©³çŽ°ã衚瀺ããããšãã§ããŸãã
é²æç¶æ³ã®åºåæå®
- --progressãªãã·ã§ã³ãšå€ãæå®ããããšã§ãimportã§ç»é²ããããŠæ°ãæå®ããå€ã®ééã§ãã°åºåããããšãã§ããŸãã
ãäŸã
$ gs_import --all -u admin/admin --progress 10000
[gs_importã®ãã°]
container_1: 10000 rows imported.
container_1: 20000 rows imported.
container_1: 30000 rows imported.
ïŒ
ããïŒ
ããïŒ
-
ã³ãã³ãäžèŠ§
ã³ãã³ã ãªãã·ã§ã³/åŒæ° gs_export -uïœ--user ãŠãŒã¶å/ãã¹ã¯ãŒã
--all ïœ --db ããŒã¿ããŒã¹å [ããŒã¿ããŒã¹å] ïœ ( --container ã³ã³ããå [ã³ã³ããå] âŠ ïœ --containerregex æ£èŠè¡šçŸ [æ£èŠè¡šçŸ] âŠ) ãããããã
[-dïœ--directory åºåå ãã£ã¬ã¯ããªãã¹] ãããããã
[--out [ãã¡ã€ã«èå¥å] ãããããã
[--binary [ãã¡ã€ã«ãµã€ãº]] ãããããã
[--filterfile å®çŸ©ãã¡ã€ã«å] ãã
[--intervals YYYYMMdd:YYYYMMdd]ãããã
[--parallel 䞊åå®è¡æ°] ãããããã
[--acl] ãããããã
[--prefixdb ããŒã¿ããŒã¹å] ãããããã
[--force] ãããããã
[-tïœ--test] ãããããã
[-vïœ--verbose] ãããããã
[--silent]
[--schemaOnly]gs_export --version gs_export [-hïœ--help] -
ãªãã·ã§ã³ä»æ§
ãªãã·ã§ã³ å¿ é 説æ -uïœ--user ãŠãŒã¶/ãã¹ã¯ãŒã ã èªèšŒã«äœ¿çšãããŠãŒã¶ããã¹ã¯ãŒããæå®ããŸãã --all ã ã¯ã©ã¹ã¿ã®å šã³ã³ããããšã¯ã¹ããŒã察象ãšããŸãã--allã--containerãŸãã¯--containerregexã--dbãªãã·ã§ã³ã®ããããã®æå®ãå¿ èŠã§ãã --db ã æå®ãããããŒã¿ããŒã¹äžã®ãã¹ãŠã®ã³ã³ããããšã¯ã¹ããŒã察象ãšããŸã--allã--containerãŸãã¯--containerregexã--dbãªãã·ã§ã³ã®ããããã®æå®ãå¿ èŠã§ãã -cïœ--container ã³ã³ããå ⊠ã ãšã¯ã¹ããŒã察象ãšãªãã³ã³ãããæå®ããŸãããã©ã³ã¯åºåãã§è€æ°æå®å¯èœã§ãã--allã--containerãŸãã¯--containerregexã--dbãªãã·ã§ã³ã®ããããã®æå®ãå¿ èŠã§ãã --containerregex æ£èŠè¡šçŸ ⊠ã ãšã¯ã¹ããŒã察象ãšãªãã³ã³ãããæ£èŠè¡šçŸã§æå®ããŸãããã©ã³ã¯åºåãã§è€æ°æå®å¯èœã§ããæ£èŠè¡šçŸã䜿çšããå Žåã¯ããã«ã¯ã©ãŒãã§å²ãã§æå®ããŸãã--allã--containerãŸãã¯--containerregexã--dbãªãã·ã§ã³ã®ããããã®æå®ãå¿ èŠã§ãã--containerãªãã·ã§ã³ãšã®äœµçšå¯èœã§ãã -dïœ--directory åºåå ãã£ã¬ã¯ããªãã¹ ãšã¯ã¹ããŒãå ã®ãã£ã¬ã¯ããªãã¹ãæå®ããŸããããã©ã«ãã¯ã«ã¬ã³ããã£ã¬ã¯ããªã§ãã --out [ãã¡ã€ã«èå¥å] åºåããŒã¿ã®ãã¡ã€ã«åœ¢åŒããã«ãã³ã³ãã圢åŒãšããå Žåã«æå®ããŸããçç¥ããå Žåã¯ãã·ã³ã°ã«ã³ã³ãã圢åŒãšãªããŸãããã¡ã€ã«èå¥åã®é·ãã¯20æåãŸã§ã§ãã
ãã¡ã€ã«èå¥åãæå®ãããå Žåã¯ãã¡ã€ã«èå¥åãå«ããã¡ã€ã«åãšããŠãçç¥ãããå Žåã¯ãåºåéå§æ¥æããã¡ã€ã«åãšããŠåºåããŸãã--binary [ãã¡ã€ã«ãµã€ãº] ããŠããŒã¿ãã¡ã€ã«ã®åºå圢åŒããã€ããªåœ¢åŒãšããå Žåã«æå®ããŸããçç¥ããå Žåã¯ãCSV圢åŒãšãªããŸãã
åºåãã¡ã€ã«ãµã€ãºã¯MBåäœã§æå®ããŸããããã©ã«ãã¯ã100MBã§ããæå®ç¯å²ã¯1ãã1000(1GB)ãŸã§ã§ãã--filterfile å®çŸ©ãã¡ã€ã«å ããŠãåãåºãæ€çŽ¢ã¯ãšãªãèšè¿°ããå®çŸ©ãã¡ã€ã«ãæå®ããŸããçç¥ããå Žåã¯ããã¹ãŠã®ããŠããšã¯ã¹ããŒããããŸãã --intervals YYYYMMdd:YYYYMMdd ãšã¯ã¹ããŒã察象ã®ã³ã³ãããæ¥ä»èç©åã³ã³ããã®å Žåã«ããšã¯ã¹ããŒãã§åãåºãããŠã®æéãæå®ããŸããæå®æ¹æ³ã¯ãYYYYMMdd:YYYYMMddããã©ãŒãããã§å·Šã«éå§æ¥ãå³ã«çµäºæ¥ãæå®ããŸããçç¥ããå Žåã¯ããã¹ãŠã®ããŠããšã¯ã¹ããŒããããŸããfilterfileãªãã·ã§ã³ãšåæã«æå®ããããšã¯ã§ããŸããã --parallel 䞊åå®è¡æ° æå®ãããæ°ã§äžŠåå®è¡ãè¡ããŸãã䞊åå®è¡ãè¡ããšããšã¯ã¹ããŒãããŒã¿ã¯äžŠåå®è¡æ°ãšåãæ°ã§åå²ãããŸãããã«ãã³ã³ãã圢åŒã®å Žå(--outãªãã·ã§ã³ãæå®ããå Žå)ã®ã¿æå®ã§ããŸããæå®ç¯å²ã¯ã2ãã32ãŸã§ã§ãã --acl ããŒã¿ããŒã¹ããŠãŒã¶ãã¢ã¯ã»ã¹æš©ã®æ å ±ããšã¯ã¹ããŒãããŸãã管çè ãŠãŒã¶ã§ãã〠--allãªãã·ã§ã³ãŸãã¯--dbãªãã·ã§ã³ãæå®ããŠããå Žåã®ã¿æå®ã§ããŸãã --prefixdb ããŒã¿ããŒã¹å --containerãªãã·ã§ã³ãæå®ããå Žåã«ãã³ã³ããã®ããŒã¿ããŒã¹åãæå®ããŸããçç¥ããå Žåã¯ãããã©ã«ãããŒã¿ããŒã¹ã®ã³ã³ãããåŠç察象ã«ãªããŸãã --force ãšã©ãŒãçºçããŠãåŠçãç¶ç¶ããŸãããšã©ãŒå 容ã¯åŠççµäºåŸã«äžèŠ§è¡šç€ºãããŸãã -tïœ--test ãã¹ãã¢ãŒãã§ããŒã«ãå®è¡ããŸãã -vïœ--verbose åäœè¡šç€ºã詳现åºåããŸãã --silent åäœè¡šç€ºãåºåããŸããã --schemaOnly ã³ã³ããã®å®çŸ©ã®ã¿ãšã¯ã¹ããŒãããŸããããŠããŒã¿ã¯ãšã¯ã¹ããŒãããŸããã --version ããŒã«ã®ããŒãžã§ã³ã衚瀺ããŸãã -hïœ--help ãã«ãã¡ãã»ãŒãžãšããŠã³ãã³ãäžèŠ§ã衚瀺ããŸãã ã
ãã¡ã¢ã
- -t(--test)ãªãã·ã§ã³ãæå®ããå Žåãã¯ãšãªãå®è¡ããã§ãããŸã§ãå®æœããŸããã³ã³ããããŒã¿ãã¡ã€ã«ã®äœæã¯è¡ããŸããã
- -v(--verbose)ãªãã·ã§ã³ãæå®ããå ŽåãåŠçäžã®ã¡ãã»ãŒãžã衚瀺ããŸããçç¥ããå Žåã¯ããšã©ãŒæã®ã¿ã¡ãã»ãŒãžã衚瀺ããŸãã
- -d(--directory)ãªãã·ã§ã³ã§æå®ãããã£ã¬ã¯ããªãã¹ãååšããªãå Žåã--outãªãã·ã§ã³ã§æå®ãããã¡ã€ã«åãååšããªãå Žåããããããã£ã¬ã¯ããªããã¡ã€ã«ãäœæããŸãã
- -c(--container)ãªãã·ã§ã³ãæå®ããå Žåãã³ã³ããåã«Javaã®æ£èŠè¡šçŸãæå®ããããšãã§ããŸãã詳现ã¯ãJavaã®ãã¯ã©ã¹ Patternããåç §ããŠãã ããã
- --intervalsãªãã·ã§ã³ã§ãæå®æã«éå§æå»ãçµäºæå»ãåãããªãå Žåã¯æããã«å°ããªå€(19700101)ã倧ããªå€(99991231)ãæå®ããŠãã ããã
-
ã³ãã³ãäžèŠ§
ã³ãã³ã ãªãã·ã§ã³/åŒæ° gs_import -uïœ--user ãŠãŒã¶å/ãã¹ã¯ãŒã
--all ïœ --db ããŒã¿ããŒã¹å [ããŒã¿ããŒã¹å] ïœ ( --container ã³ã³ããå [ã³ã³ããå] âŠ ïœ --containerregex æ£èŠè¡šçŸ [æ£èŠè¡šçŸ] âŠ)
--db ããŒã¿ããŒã¹å [ããŒã¿ããŒã¹å]
[--appendïœ--replace]
[-dïœ--directory ã€ã³ããŒã察象ãã£ã¬ã¯ããªãã¹]
[-fïœ--file ãã¡ã€ã«å [ãã¡ã€ã«åâŠ]]
[--intervals YYYYMMdd:YYYYMMdd]
[--count ã³ãããæ°]
[--progress åºåéé]
[--acl]
[--prefixdb ããŒã¿ããŒã¹å]
[--force]
[--schemaCheckSkip]
[-vïœ--verbose]
[--silent] ãgs_import -lïœ--list
[-dïœ--directory ãã£ã¬ã¯ããªãã¹]
[-fïœ--file ãã¡ã€ã«å [ãã¡ã€ã«åâŠ]]gs_import --version gs_import [-hïœ--help] -
ãªãã·ã§ã³ä»æ§
ãªãã·ã§ã³ å¿ é 説æ -uïœ--user ãŠãŒã¶/ãã¹ã¯ãŒã ã èªèšŒã«äœ¿çšãããŠãŒã¶ããã¹ã¯ãŒããæå®ããŸãã --all ã ã€ã³ããŒãå ã®ãã¡ã€ã«ã®å šã³ã³ãããã€ã³ããŒã察象ãšããŸãã--allã--containerãŸãã¯--containerregexã--dbãªãã·ã§ã³ã®ããããã®æå®ãå¿ èŠã§ãã --db ã æå®ãããããŒã¿ããŒã¹äžã®ãã¹ãŠã®ã³ã³ãããã€ã³ããŒã察象ãšããŸã--allã--containerãŸãã¯--containerregexã--dbãªãã·ã§ã³ã®ããããã®æå®ãå¿ èŠã§ãã -cïœ--container ã³ã³ããå ⊠ã ã€ã³ããŒã察象ãšãªãã³ã³ãããæå®ããŸãããã©ã³ã¯åºåãã§è€æ°æå®å¯èœã§ãã--allã--containerãŸãã¯--containerregexã--dbãªãã·ã§ã³ã®ããããã®æå®ãå¿ èŠã§ãã --containerregex æ£èŠè¡šçŸ ⊠ã ã€ã³ããŒã察象ãšãªãã³ã³ãããæ£èŠè¡šçŸã§æå®ããŸãããã©ã³ã¯åºåãã§è€æ°æå®å¯èœã§ããæ£èŠè¡šçŸã䜿çšããå Žåã¯ããã«ã¯ã©ãŒãã§å²ãã§æå®ããŸãã--allã--containerãŸãã¯--containerregexã--dbãªãã·ã§ã³ã®ããããã®æå®ãå¿ èŠã§ãã--containerãªãã·ã§ã³ãšã®äœµçšå¯èœã§ãã --append æ¢åã®ã³ã³ããã«ãããŒã¿ãè¿œå ç»é²ã»æŽæ°ããŸãã --replace æ¢åã®ã³ã³ãããåé€ããŠåäœæããŸãã -dïœ--directory ãã£ã¬ã¯ããªãã¹ ã€ã³ããŒãå ã®ãã£ã¬ã¯ããªãã¹ãæå®ããŸããããã©ã«ãã¯ã«ã¬ã³ããã£ã¬ã¯ããªã§ãã -fïœ--file ãã¡ã€ã«å [ãã¡ã€ã«åâŠ] ã€ã³ããŒã察象ãšãªãã³ã³ããããŒã¿ãã¡ã€ã«ãæå®ããŸããè€æ°æå®å¯èœã§ããçç¥æã¯-d(--directory)ã§æå®ãããã£ã¬ã¯ããªãŸãã¯ã«ã¬ã³ããã£ã¬ã¯ããªã®ãã¹ãŠã®ã³ã³ããããŒã¿ãã¡ã€ã«ã察象ãšããŸãã --intervals YYYYMMdd:YYYYMMdd ã€ã³ããŒã察象ãšãªãã³ã³ãããæ¥ä»èç©åã³ã³ããã®å Žåã«ãã€ã³ããŒãã§åãåºãããŠããŒã¿ãã¡ã€ã«ã®æéãæå®ããŸããæå®æ¹æ³ã¯ãYYYYMMdd:YYYYMMddããã©ãŒãããã§å·Šã«éå§æ¥ãå³ã«çµäºæ¥ãæå®ããŸããçç¥ããå Žåã¯ããã¹ãŠã®ããŠããŒã¿ãã¡ã€ã«ãã€ã³ããŒããããŸãã --count ã³ãããæ° å ¥åããŒã¿ãäžæ¬ã³ããããããŸã§ã®å ¥å件æ°ãæå®ããŸãã --progress åºåéé ç»é²ããããŠæ°ããã°åºåããééãæå®ããŸãã --acl ããŒã¿ããŒã¹ããŠãŒã¶ãã¢ã¯ã»ã¹æš©ã®æ å ±ãã€ã³ããŒãããŸãã--aclãªãã·ã§ã³ãæå®ããŠãšã¯ã¹ããŒãããããŒã¿ã«å¯ŸããŠã管çè ãŠãŒã¶ã§ãã〠--allãªãã·ã§ã³ãŸãã¯--dbãªãã·ã§ã³ãæå®ããŠããå Žåã®ã¿æå®ã§ããŸãã --prefixdb ããŒã¿ããŒã¹å --containerãªãã·ã§ã³ãæå®ããå Žåã«ãã³ã³ããã®ããŒã¿ããŒã¹åãæå®ããŸããçç¥ããå Žåã¯ãããã©ã«ãããŒã¿ããŒã¹ã®ã³ã³ãããåŠç察象ã«ãªããŸãã --force ãšã©ãŒãçºçããŠãåŠçãç¶ç¶ããŸãããšã©ãŒå 容ã¯åŠççµäºåŸã«äžèŠ§è¡šç€ºãããŸãã --schemaCheckSkip --appendãªãã·ã§ã³ãæå®ããå Žåã«ãæ¢åã³ã³ãããšã®ã¹ããŒããã§ãã¯ãè¡ããŸããã -vïœ--verbose åäœè¡šç€ºã詳现åºåããŸãã --silent åäœè¡šç€ºãåºåããŸããã -lïœ--list æå®ããã€ã³ããŒã察象ã®ã³ã³ããã®äžèŠ§ã衚瀺ããŸãã --version ããŒã«ã®ããŒãžã§ã³ã衚瀺ããŸãã -hïœ--help ãã«ãã¡ãã»ãŒãžãšããŠã³ãã³ãäžèŠ§ã衚瀺ããŸãã
ãã¡ã¢ã
- -l(--list)ãæå®ãããŠããã-d(--directory)ã-f(--file)ãªãã·ã§ã³ä»¥å€ã®ãªãã·ã§ã³ãæå®ãããŠãããšãªãã·ã§ã³åŒæ°ãšã©ãŒãšãªããŸãã
- -v(--verbose)ãªãã·ã§ã³ãæå®ããå ŽåãåŠçäžã®ã¡ãã»ãŒãžã衚瀺ããŸããçç¥ããå Žåã¯ããšã©ãŒæã®ã¿ã¡ãã»ãŒãžã衚瀺ããŸãã
- --containerregexãªãã·ã§ã³ãæå®ããå Žåãã³ã³ããåã«Javaã®æ£èŠè¡šçŸãæå®ããããšãã§ããŸããæ£èŠè¡šçŸã®è©³çŽ°ã¯ãJavaã®ãã¯ã©ã¹ Patternããåç §ããŠãã ããã
- --intervalsãªãã·ã§ã³ã§ãæå®æã«éå§æ¥ä»ãçµäºæ¥ä»ãåãããªãå Žåã¯æããã«å°ããªå€(19700101)ã倧ããªå€(99991231)ãæå®ããŠãã ããã
ã³ã³ããããŒã¿ãã¡ã€ã«ãæ§æããããããã®ãã¡ã€ã«åœ¢åŒã以äžã«ç€ºããŸãã
ã³ã³ããæ å ±ãJSON圢åŒã§æ ŒçŽããŸãã æ ŒçŽããã³ã³ããæ å ±ã以äžã«ç€ºããŸãã
é ç® | 説æ |
---|---|
ã³ã³ããå | ã³ã³ããã®å称ã§ãã |
ã³ã³ããçš®å¥ | ã³ã¬ã¯ã·ã§ã³ãŸãã¯æç³»åã³ã³ãããæå®ããŸãã |
ã¹ããŒãæ å ± | ããŠãæ§æããã«ã©ã éåã®æ å ±ã§ããã«ã©ã åãããŒã¿åãã«ã©ã å¶çŽãæå®ããŸãã |
玢åŒèšå®æ å ± | ã³ã³ããã«èšå®ãã玢åŒçš®å¥ã®æ å ±ã§ãã玢åŒèšå®ã®æç¡ãããªãŒçŽ¢åŒã空é玢åŒçã®çš®å¥ãæå®ããŸãã |
ããŠããŒèšå®æ å ± | ã³ã¬ã¯ã·ã§ã³ã®å ŽåãããŠããŒãèšå®ããŸããæç³»åã³ã³ããã®å ŽåãããŠããŒèšå®ãªãã§ããããããã©ã«ããèšå®ãããŠããå Žåã¯ãã®å€ãæå¹ãšãªããŸãã |
ããŒãã«ããŒãã£ã·ã§ãã³ã°æ å ± | ããŒãã«ããŒãã£ã·ã§ãã³ã°ã®å®çŸ©æ å ±ãæå®ããŸãã |
ã¿ã€ã ã€ã³ã¿ãŒãã«æ å ± | æ¥ä»èç©åã³ã³ããã®å Žåãæ¥ä»ããšã«åå²ããããŠããŒã¿ãã¡ã€ã«ã®æ å ±ãæå®ããŸãã |
以äžã«ã¡ã¿æ å ±ã®JSON圢åŒã®ã¿ã°ãšããŒã¿é ç®ã瀺ããŸããå©çšè ãæ°èŠã«äœæããéã«å¿ é ãšãªãã¿ã°ã«ã€ããŠãèšèŒããŸã(ã¿ã°ã®èšå®æ¡ä»¶ïŒã
ã¿ã°åãããã | é ç®ãããããã | 説æãã | èšå®æ¡ä»¶ã |
---|---|---|---|
å ±éãã©ã¡ãŒã¿ | ã | ||
database | ããŒã¿ããŒã¹å | ããŒã¿ããŒã¹å | ä»»æãçç¥ããå Žåã¯"public" |
container | ã³ã³ããå | ã³ã³ããå | å¿ é |
containerType | ã³ã³ããçš®å¥ | COLLECTION/TIME_SERIES ã®ãããããæå® | å¿ é |
containerFileType | ã³ã³ããããŒã¿ãã¡ã€ã«çš®å¥ | csv/binary ã®ãããããæå® | å¿ é |
containerFile | ã³ã³ããããŒã¿ãã¡ã€ã«å | ãã¡ã€ã«å | ä»»æ |
dataAffinity | ããŒã¿ã¢ãã£ããã£å | ããŒã¿ã¢ãã£ããã£ã®ååãæå® | ä»»æ |
partitionNo | ããŒãã£ã·ã§ã³ | 空æååã§æªèšå® | ä»»æããšã¯ã¹ããŒãæåºåãããã(ã€ã³ããŒãæã¯æå®äžèŠãæå®ããŠãå€ã¯å©çšãããªããïŒ |
columnSet | ã«ã©ã æ å ±ã»ããã(ã¹ããŒãæ å ±) | æ¢åã³ã³ãããžã®ããŒã¿è¿œå æã¯ãã«ã©ã æ å ±ãåèŽããŠããå¿ èŠãã | å¿ é |
ããcolumnName | ã«ã©ã å | å¿ é | |
ããtype | ããŒã¿å | BOOLEAN/ STRING/ BYTE/ SHORT/ INTEGER/ LONG/ FLOAT/ DOUBLE/ TIMESTAMP/ GEOMETRY/ BLOB/ BOOLEAN[]/ STRING[]/ BYTE[]/ SHORT[]/ INTEGER[]/ LONG[]/ FLOAT[]/ DOUBLE[]/ TIMESTAMP[] ã®ãããããæå® | å¿ é |
ããnotNull | NOT NULLå¶çŽ | true/falseãã®ã©ã¡ãããæå® | ä»»æãçç¥ããå Žåã¯"false" |
rowKeyAssigned | ããŠããŒèšå®(*1) | true/falseãã®ãããããæå® rowKeySetãšåææå®ã¯ãšã©ãŒ |
ä»»æãçç¥ããå Žåã¯"false" |
rowKeySet | ããŠããŒã«ã©ã åã»ãã | ããŠããŒã®ã«ã©ã åãé
å圢åŒã§æå® æ¢åã³ã³ãããžã®ããŒã¿è¿œå æã¯ãããŠããŒãåèŽããŠããå¿ èŠãã |
ä»»æã(*2) |
indexSet | 玢åŒæ å ±ã»ãã | ã«ã©ã æ¯ã«èšå®å¯èœã ååšããªãã«ã©ã åã¯ç¡èŠ/ãšã©ãŒåºåã¯ãã | ä»»æ |
ããcolumnNames | ã«ã©ã åã»ãã | ã«ã©ã åãé å圢åŒã§æå® | ä»»æ(indexSetæå®æã¯å¿ é ) |
ããtype | 玢åŒçš®å¥ | TREE ( STRING/ BOOLEAN/ BYTE/ SHORT/ INTEGER/ LONG/ FLOAT/ DOUBLE/ TIMESTAMP ) ã SPATIAL ( GEOMETRY )ã®ãããããæå® | ä»»æã(indexSetæå®æã¯å¿ é ) |
ããindexName | 玢åŒå | 玢åŒå | ä»»æãnullãæå®ããå Žåãçç¥ããå Žåã¯æªèšå® |
ããŒãã«ããŒãã£ã·ã§ãã³ã°æ å ± | |||
tablePartitionInfo | ããŒãã«ããŒãã£ã·ã§ãã³ã°æ å ± | ã€ã³ã¿ãŒãã«-ããã·ã¥ããŒãã£ã·ã§ãã³ã°ã®å Žåã¯ãã€ã³ã¿ãŒãã«ãããã·ã¥ã®é çªã§ä»¥äžã®æ å ±ãé å圢åŒã§èšè¿°ããŸã | ä»»æ |
type | ããŒãã«ããŒãã£ã·ã§ãã³ã°çš®å¥ | æå®ããå€ã¯æ¬¡ã®2çš®é¡ ããã·ã¥:HASHãã€ã³ã¿ãŒãã«:INTERVAL | tablePartitionInfoãèšèŒããå Žåã¯å¿ é |
column | ããŒãã£ã·ã§ãã³ã°ã㌠| æå®ã§ããã«ã©ã ã®å㯠type=HASHã®å Žå å¶éãªã type=INTERVALã®å Žå BYTEå,SHORTå,INTEGERå,LONGå,TIMESTAMPå |
tablePartitionInfoãèšèŒããå Žåã¯å¿ é |
divisionCount | ããã·ã¥ã®åå²æ° | (type=HASHã®å Žåã®ã¿æå¹)ããã·ã¥ã®åå²æ° | type=HASHã®å Žåã¯å¿ é |
intervalValue | åå²åºæºå€ | (type=INTERVALã®å Žåã®ã¿æå¹)åå²ããéé | type=INTERVALã®å Žåã¯å¿ é |
intervalUnit | åå²åäœ | (type=INTERVALã®å Žåã®ã¿æå¹)åäœ DAY | type=INTERVAL,ããŒãã£ã·ã§ãã³ã°ããŒãTIMESTAMPåã®å Žåã¯å¿ é |
ã€ã³ã¿ãŒãã«ãŸãã¯ã€ã³ã¿ãŒãã«-ããã·ã¥ããŒãã£ã·ã§ãã³ã°ã®ã¿ã®ãã©ã¡ãŒã¿ | |||
expirationType | æé解æŸçš®å¥ | ããŒãã£ã·ã§ã³æé解æŸãæå®ããå Žåã¯"partition"ãæå® | ä»»æ |
expirationTime | 解æŸå¯Ÿè±¡ã®æå¹æéã®åºæºãšããçµéæé | æŽæ°å€ãæå® | expirationTypeæå®æã¯å¿ é |
expirationTimeUnit | æéæ å ±ã®ENUM | DAY/ HOUR/ MINUTE/ SECOND/ MILLISECONDã®ãããããæå® | expirationTypeæå®æã¯å¿ é |
ã¿ã€ã ã€ã³ã¿ãŒãã«æ å ± | |||
timeIntervalInfo | ã¿ã€ã ã€ã³ã¿ãŒãã«æ å ± | æ¥ä»èç©åã³ã³ããã®å Žåã¯ã以äžã®æ å ±ãé å圢åŒã§èšè¿°ããŸã | ä»»æ |
containerFile | ã³ã³ããããŒã¿ãã¡ã€ã«å | ãã¡ã€ã«å | timeIntervalInfoãèšèŒããå Žåã¯å¿ é |
boundaryValue | æé | ã³ã³ããããŒã¿ã®éå§ã®æ¥ä» | timeIntervalInfoãèšèŒããå Žåã¯å¿ é |
ããŒã¿ããŒãã£ã·ã§ã³é 眮æ å ± | |||
intervalWorkerGroup | åºéã°ã«ãŒãçªå· | ããŒã¿ããŒãã£ã·ã§ã³é 眮ã決å®ããã°ã«ãŒãçªå· | ä»»æ |
intervalWorkerGroupPosition | åºéã°ã«ãŒãããŒãè£æ£å€ | åºéã°ã«ãŒãã§æ±ºå®ããããŒã¿ããŒãã£ã·ã§ã³ã®åŠçããŒããè£æ£ããå€ | ä»»æ |
- *1 : V4.2以åã®ã¡ã¿ããŒã¿ãã¡ã€ã«ã«åºåãããæ å ±ã§ããV4.3以éã§ã¯rowKeySetã䜿çšããŠãã ããã
- *2 : containerTypeãTIME_SERIESãã€rowKeyAssignedãfalseã§ããå Žåã¯å¿ é ã§ãã
ãã¡ã¢ã
-
ã¡ã¿ããŒã¿ãã¡ã€ã«ã¯ãæåã³ãŒãUTF-8ã§èšèŒããŸãã
-
ã·ã³ã°ã«ã³ã³ããããŒã¿ãã¡ã€ã«ã®ã¡ã¿ããŒã¿ãã¡ã€ã«ã«ã¯ãã³ã³ããã®ã¡ã¿æ å ±ãjsonã§èšè¿°ãããŸãã
-
ãã«ãã³ã³ããããŒã¿ãã¡ã€ã«ã®ã¡ã¿ããŒã¿ãã¡ã€ã«ã«ã¯ãã³ã³ããã®ã¡ã¿æ å ±ãjsonã® é å ã§èšè¿°ãããŸãã
-
ãšã¯ã¹ããŒãããå Žåãã¡ã¿ããŒã¿ãã¡ã€ã«ã®ãã¡ã€ã«åã¯ä»¥äžã®èŠåã§åœåãããŸãã
-
ã·ã³ã°ã«ã³ã³ãã圢åŒã®å Žå
-
ããŒã¿ããŒã¹å.ã³ã³ããå_properties.json
-
ãã¡ã€ã«åã®ããŒã¿ããŒã¹åãšã³ã³ããåã®æååã¯URLãšã³ã³ãŒãããŸããããšã³ã³ãŒãããããŒã¿ããŒã¹å.ãšã³ã³ãŒãããã³ã³ããåãã®æåé·ã140æåãè¶ ããå Žåã¯ã140æåãŸã§ã§æååãåããæåŸã«èå¥å(é£çª)ãè¿œå ããŸãã
-
äŸ)
次ã®3ã€ã®ã³ã³ããããšã¯ã¹ããŒãããæã ã»ããŒã¿ããŒã¹ãdb1ããã³ã³ãããcontainer_ã»ã»ã»_2017/08/01ã(140æå以äžã®ã³ã³ããå) ã»ããŒã¿ããŒã¹ãdb1ããã³ã³ãããcontainer_ã»ã»ã»_2017/09/01ã(140æå以äžã®ã³ã³ããå) ã»ããŒã¿ããŒã¹ãdb2ããã³ã³ãããcontainer_ã»ã»ã»_2017/10/01ã(140æå以äžã®ã³ã³ããå) ã¡ã¿ããŒã¿ãã¡ã€ã«ã®ãã¡ã€ã«åã¯äžèšã®ããã«ãªããŸãã(ãšã³ã³ãŒãããæååã140æåãŸã§ã§åããé£çªãä»å ããŸãïŒ db1.containerã»ã»ã»2017%2f08_0_properties.json db1.containerã»ã»ã»2017%2f09_1_properties.json db2.containerã»ã»ã»2017%2f10_2_properties.json
-
-
ãã«ãã³ã³ãã圢åŒã®å Žå
- --outãªãã·ã§ã³ã§ãã¡ã€ã«èå¥åãæå®: ãã¡ã€ã«èå¥å_properties.json
- --outãªãã·ã§ã³ã§ãã¡ã€ã«èå¥åãçç¥: YYYYMMDD_HHmmss_SSS_properties.json
-
ã泚æã
- ããŠããŒã¿ãã¡ã€ã«ããã€ããªåœ¢åŒã§ãšã¯ã¹ããŒãããå Žåãã¡ã¿ããŒã¿ãã¡ã€ã«ã®ç·šéã¯è¡ããªãã§ãã ããã
ãäŸïŒã ã·ã³ã°ã«ã³ã³ããããŒã¿ãã¡ã€ã«ã§ã®ã³ã¬ã¯ã·ã§ã³ã®èšè¿°äŸ (public.c001_properties.jsonïŒ
-
1ã€ã®ã³ã¬ã¯ã·ã§ã³ãèšè¿°ããŠããŸãã
{ "container": "c001", "containerFile": "public.c001.csv", "containerFileType": "csv", "containerType": "COLLECTION", "columnSet": [ { "columnName": "COLUMN_ID", "type": "INTEGER" }, { "columnName": "COLUMN_STRING", "type": "STRING"} ], "indexSet": [ { "columnName": "COLUMN_ID", "type": "TREE"}, { "columnName": "COLUMN_STRING", "type": "TREE" } ], "rowKeyAssigned": true }
ãäŸïŒã ãã«ãã³ã³ããããŒã¿ãã¡ã€ã«ã§ã®ã³ã¬ã¯ã·ã§ã³ããã³æç³»åã³ã³ããã®èšè¿°äŸ (public.container01_properties.jsonïŒ
-
ã³ã¬ã¯ã·ã§ã³ããã³æç³»åã³ã³ããã®å Žå
[ { "container": "c001", "containerType": "collection", "containerFileType":"csv", "containerFile":"public.container01.csv", "rowKeyAssigned":true, "columnSet": [ { "columnName": "COLUMN_FLAG", "type": "BOOLEAN" }, { "columnName": "COLUMN_BLOB_DATA", "type": "BLOB" }, { "columnName": "COLUMN_STRING", "type": "STRING" } ], "indexSet":[ { "columnName":" COLUMN_STRING ", "indexType": "TREE" } ] }, { "container": "c002", "containerType": "timeSeries", "containerFileType":"csv", "containerFile":"public.container01.csv", "rowKeyAssigned":true, "dataAffinity":"month", "columnSet": [ { "columnName": "COLUMN_TIMESTAMP", "type": "TIMESTAMP" }, { "columnName": "COLUMN_FLAG", "type": "BOOLEAN" }, { "columnName": "COLUMN_BLOB_DATA", "type": "BLOB" }, { "columnName": "COLUMN_INTEGER", "type": "INTEGER" } ], "indexSet":[ { "columnName":" COLUMN_FLAG ", "indexType": "TREE" } ] } ]
ãäŸïŒã ããŒãã«ããŒãã£ã·ã§ãã³ã°ã®å Žåã®èšè¿°äŸ
-
ããã·ã¥ããŒãã£ã·ã§ãã³ã°ã®å ŽåïŒããŒãã«ããŒãã£ã·ã§ãã³ã°æ å ±ã®éšåã®ã¿æç²ïŒ
"tablePartitionInfo":{ "type": "HASH", "column": "column03", "divisionCount": 16 }
-
ã€ã³ã¿ãŒãã«ããŒãã£ã·ã§ãã³ã°ã®å ŽåïŒããŒãã«ããŒãã£ã·ã§ãã³ã°æ å ±ã®éšåã®ã¿æç²ïŒ
"tablePartitionInfo":{ "type": "INTERVAL", "column": "timecolumn05", "intervalValue": 20, "intervalUnit": "DAY" }
-
ã€ã³ã¿ãŒãã«-ããã·ã¥ããŒãã£ã·ã§ãã³ã°ã®å ŽåïŒããŒãã«ããŒãã£ã·ã§ãã³ã°æ å ±ã®éšåã®ã¿æç²ïŒ
"tablePartitionInfo":[ { "type": "INTERVAL", "column": "timecolumn05", "intervalValue": 10, "intervalUnit": "DAY" }, { "type": "HASH", "column": "column03", "divisionCount": 16 } ]
ãã¡ã¢ã
- ã€ã³ã¿ãŒãã«-ããã·ã¥ããŒãã£ã·ã§ãã³ã°ã®å ŽåãtablePartitionInfo以äžã«ã€ã³ã¿ãŒãã«ãããã·ã¥ããŒãã£ã·ã§ã³ã®é ã§èšèŒããå¿ èŠããããŸããéã®å Žåã¯ãšã©ãŒã«ãªããŸãã
ãäŸïŒã æ¥ä»èç©åã³ã³ããã®å Žåã®èšè¿°äŸ
-
ã¿ã€ã ã€ã³ã¿ãŒãã«æ å ±ã®éšåã®ã¿æç²
"timeIntervalInfo":[ { "containerFile": "public.container01_2023-01-01_2023-01-02.csv", "boundaryValue": "2023-01-01T00:00:00.000+0000" } ]
ãã¡ã¢ã
- åºéã°ã«ãŒãçªå·ãåºéã°ã«ãŒãããŒãè£æ£å€ããŠãŒã¶ãé 眮æå®ããå Žåãã¡ã¿æ å ±ãjsonã«èšè¿°ãããŸãã
ãäŸïŒã ããŒã¿ããŒãã£ã·ã§ã³é 眮ã®èšè¿°äŸ
-
åºéã°ã«ãŒãçªå·ã1ãåºéã°ã«ãŒãããŒãè£æ£å€ã1ãšããŠããŠãŒã¶ãããŒã¿ããŒãã£ã·ã§ã³é 眮æå®ããå Žå
{ "version":"5.4.0", "database":"public", "container":"c001", "containerType":"COLLECTION", "containerFileType":"csv", "partitionNo":1, "columnSet":[ { "columnName":"dt", "type":"TIMESTAMP", "notNull":true }, { "columnName":"val", "type":"LONG", "notNull":true } ], "intervalWorkerGroup":1, "intervalWorkerGroupPosition":1, "rowKeySet":[ "dt" ], "indexSet":[ { "columnNames":[ "dt" ], "type":"TREE", "indexName":null } ], "tablePartitionInfo":{ "type":"INTERVAL", "column":"dt", "intervalValue":"1", "intervalUnit":"DAY" } }
ããŠããŒã¿ãã¡ã€ã«ïŒãã€ããªããŒã¿ãã¡ã€ã«ïŒã¯zip圢åŒã§ãããgs_exportã§ã®ã¿äœæãå¯èœã§ããå¯èªæ§ã¯ãªããç·šéãã§ããŸããã
ããŠããŒã¿ãã¡ã€ã«ïŒCSVããŒã¿ãã¡ã€ã«ïŒã¯CSV圢åŒã§ãããã³ã³ããããŒã¿ãã¡ã€ã«æ å ±éšã«ã¯ããŠã®å®çŸ©ã§ããã¡ã¿ããŒã¿ãã¡ã€ã«ãžã®åç §ãèšè¿°ããŸãã
ãã¡ã¢ã
- CSVããŒã¿ãã¡ã€ã«ã¯ãæåã³ãŒãUTF-8ã§èšèŒããŸãã
ïŒCSVããŒã¿ãã¡ã€ã«ã®åœ¢åŒïŒ
ïŒ.ãããéšïŒ1ïœ2è¡ç®ïŒ
ãããéšã¯ããšã¯ã¹ããŒãæã«åºåãããæ å ±ã§ããã€ã³ããŒãæã«ãããæ å ±ã¯äžèŠã§ãã
-
æé ã«ã#ããä»äžãåºå¥ããŸãããã©ãŒãããã¯ä»¥äžãšããŸãã
"#(æ¥ææ å ±)(空çœ)GridDBãªãªãŒã¹ããŒãžã§ã³" "#User:(ãŠãŒã¶å)"
ãäŸã
"#2017-10-01T17:34:36.520+0900 GridDB V4.0.00"
"#User:admin "
ïŒ.ã³ã³ããããŒã¿ãã¡ã€ã«æ å ±éšïŒ3è¡ç®ä»¥éïŒ
ã¡ã¿ããŒã¿ãã¡ã€ã«ãžã®åç §ãèšè¿°ããŸãã
-
æé ã«ã%ããä»äžãåºå¥ããŸããäžè¡ã®ãã©ãŒãããã¯ä»¥äžãšããŸãã
"%","ã¡ã¿ããŒã¿ãã¡ã€ã«ã®ãã¡ã€ã«å"
ïŒ.ã³ã³ããåæ å ±éšïŒã³ã³ããæ å ±éšã®çŽåŸïŒ
ããŠããŒã¿ãã¡ã€ã«ã«å«ãŸããŠããããŒã¿ããŒã¹åãã³ã³ããåãèšè¿°ããŸãã ãšã¯ã¹ããŒãã³ã³ããçš®å¥ã«ããæžåŒãç°ãªããŸãã
ãšã¯ã¹ããŒãã³ã³ããçš®å¥ | ã³ã³ããåæ å ±éšã®æžåŒ |
---|---|
ç»é²æŽæ°åã³ã³ãã | ããŒã¿ããŒã¹åãšã³ã³ããåãèšèŒ |
æ¥ä»èç©åã³ã³ãã | ããŒã¿ããŒã¹åãšã³ã³ããåïŒæ¥ä»ç¯å²ãèšèŒ |
âããŒã¿ããŒã¹åãšã³ã³ããå
-
æé ã«ã$ããä»äžããããŒã¿ããŒã¹åãšã³ã³ããåãèšèŒããŸãã
"$","ããŒã¿ããŒã¹å.ã³ã³ããå"
âããŒã¿ããŒã¹åãšã³ã³ããåïŒæ¥ä»ç¯å²
-
æé ã«ã$ããä»äžããããŒã¿ããŒã¹åãšã³ã³ããåïŒãæ¥ä»ç¯å²ããèšèŒããŸãã
-
ãæ¥ä»ç¯å²ãã¯éå§ã®æ¥ä»ãšçµäºã®æ¥ä»ã"_"(ã¢ã³ããŒã¹ã³ã¢)ã§é£çµããæååã«ãªããŸããå ·äœçã«ã¯ä»¥äžã®äŸãåç §ããŠãã ããã
"$","ããŒã¿ããŒã¹å.ã³ã³ããå_YYYY-MM-dd_YYYY-MM-dd"
ïŒ.ããŠããŒã¿éšïŒã³ã³ããåæ å ±éšä»¥éïŒ
ããŠããŒã¿æ¬äœã®èšè¿°ã§ãã
-
ã³ã³ããã«ç»é²ãããæ°ã ãããŠããŒã¿ãèšè¿°ããŸãã
"å€","å€","å€",ïŒïŒïŒã«ã©ã å®çŸ©åæ°ïŒ "å€","å€","å€",ïŒïŒïŒã«ã©ã å®çŸ©åæ°ïŒ ããïŒ ããïŒãããã//ç»é²ãããããŠã®æ°ã ãèšè¿°ãã ããïŒ
ãã¡ã¢ã
- ããŠããŒã¿ã«å«ãŸããããã¯ã¹ã©ãã·ã¥\ãšããã«ã¯ã©ãŒããŒã·ã§ã³"ã¯ãããããããã¯ã¹ã©ãã·ã¥ã§ãšã¹ã±ãŒãããŠèšè¿°ããŸãã
- ã«ã©ã ã®ããŒã¿åãTIMESTAMPã®å Žåãå€ã¯ãyyyy-MM-dd'T'HH:mm:ss.SSSZã圢åŒã§æå®ããŸãã
- äŸ: "2016-12-25T00:22:30.000+0900"
ïŒ.ã³ã¡ã³ãéš
ã³ã¡ã³ãéšã¯CSVããŒã¿ãã¡ã€ã«ã®ãããéšä»¥å€ã§ããã°ã©ãã§ãèšè¿°ã§ããŸãã
- æé ã«ã#ããä»äžãåºå¥ããŸãã
ãã¡ã¢ã
- ã·ã³ã°ã«ã³ã³ããããŒã¿ãã¡ã€ã«ã®CSVããŒã¿ãã¡ã€ã«ã¯ä»¥äžã§æ§æãããŸãã
- ãïŒ.ãããéšã,ïŒ.ã³ã³ããããŒã¿ãã¡ã€ã«æ å ±éšã,ïŒ.ããŠããŒã¿éš
- ãã«ãã³ã³ããããŒã¿ãã¡ã€ã«ã®CSVããŒã¿ãã¡ã€ã«ã¯ä»¥äžã§æ§æãããŸãã
- ãïŒ.ãããéšã,ïŒ.ã³ã³ããããŒã¿ãã¡ã€ã«æ å ±éšã,ïŒ.ããŠããŒã¿éš(è€æ°ïŒ
ïŒãã¡ã€ã«å圢åŒïŒ
ãšã¯ã¹ããŒãããŒã«ã§åºåããCSVããŒã¿ãã¡ã€ã«ã®ãã¡ã€ã«åã¯ä»¥äžãšãªããŸãã
- ã·ã³ã°ã«ã³ã³ãã圢åŒã®å Žå
- ããŒã¿ããŒã¹å.ã³ã³ããå.csv
- ãã¡ã€ã«åã®ããŒã¿ããŒã¹åãšã³ã³ããåã®æååã¯URLãšã³ã³ãŒãããŸããããšã³ã³ãŒãããããŒã¿ããŒã¹å.ãšã³ã³ãŒãããã³ã³ããåãã®æåé·ã140æåãè¶ ããå Žåã¯ã140æåãŸã§ã§æååãåããæåŸã«èå¥å(é£çª)ãè¿œå ããŸãã
- ãã«ãã³ã³ãã圢åŒã®å Žå
- --outãªãã·ã§ã³ã§ãã¡ã€ã«èå¥åãæå®: ãã¡ã€ã«èå¥å.csv
- --outãªãã·ã§ã³ã§ãã¡ã€ã«èå¥åãçç¥: YYYYMMDD_HHmmss_SSS.csv
ãäŸãCSVããŒã¿ãã¡ã€ã«(å€éšãªããžã§ã¯ããã¡ã€ã«å«ãïŒã®èšè¿°äŸ ã¡ã¿ããŒã¿ãã¡ã€ã«ãäŸïŒã®å Žåã®ããŒã¿ã®èšè¿°
"#2017-10-01T11:19:03.437+0900 GridDB V4.0.00"
"#User:admin"
"%","public.c001_properties.json"
"$","public.c001"
"1","Tokyo"
"2","Kanagawa"
"3","Osaka"
ã
CSVããŒã¿ãã¡ã€ã«ã®ããŠã®äžéšã«ä»¥äžã®ããŒã¿ãå«ãŸãããšããå€éšãªããžã§ã¯ããšããŠCSVããŒã¿ãã¡ã€ã«ãšã¯å¥ã«å€éšãªããžã§ã¯ããã¡ã€ã«ãçšæããŸããå€éšããŒã¿ãã¡ã€ã«ã®åç §ãCSVãã¡ã€ã«ã®å¯Ÿè±¡ã«ã©ã ã«ä»¥äžã®ããã«èšèŒããŸãã ã "@ããŒã¿å:âïŒãã¡ã€ã«å称ïŒ
- BLOBããŒã¿
- BLOBããŒã¿ãšããŠè©²åœããã«ã©ã ã®âå€âéšåã«â@BLOB:âïŒïŒãã¡ã€ã«å称ïŒãšèšèŒããŸãã
- ãã¡ã€ã«å称éšåã¯ããã¡ã€ã«åïŒâ.blobâããšãã圢åŒã§ãã
- ãã€ããªãã¡ã€ã«ããã¡ã€ã«å称éšåã®èŠåã«ããããŠé 眮ããŸãã
- 空éæ
å ±
- 空éæ å ±ããŒã¿ãšããŠè©²åœããâå€âéšåã«â@GEOMETRY:âïŒïŒãã¡ã€ã«å称ïŒãšèšèŒããŸãã
- ãã¡ã€ã«å称éšåã¯ããã¡ã€ã«åïŒâ.geometryâãšãã圢åŒã§ãã
- å€éšãªããžã§ã¯ããã¡ã€ã«ã«ç©ºéåãèšèŒããŸãã
- æåã³ãŒãUTF-8ã§èšèŒããŸãã
- é
ååïŒBOOLEAN[]/ STRING[]/ BYTE[]/ SHORT[]/ INTEGER[]/ LONG[]/ FLOAT[]/ DOUBLE[]/ TIMESTAMP[]ïŒ
- é ååããŒã¿ãšããŠè©²åœããâå€âéšåã«â@(ããŒã¿å)_ARRAY:â+ïŒãã¡ã€ã«å称ïŒãšèšèŒããŸãã
- ãã¡ã€ã«å称éšåã¯ããã¡ã€ã«åïŒâ.(ããŒã¿å)_arrayâãšãã圢åŒã§ãã
- æåååããããŒã¿é·ã100æåãè¶ ããŠããå Žåãå€éšãªããžã§ã¯ããã¡ã€ã«ãžé ååããŒã¿ãèšèŒããŸãã
- æåã³ãŒãUTF-8ã§èšèŒããŸãã
- æååæ
å ±
- æååããŒã¿ãšããŠè©²åœããâå€âéšåã«â@STRING:â+ïŒãã¡ã€ã«å称ïŒã§èšèŒããŸãã
- ãã¡ã€ã«å称éšåã¯ããã¡ã€ã«åïŒâ.stringâããšãã圢åŒã§ãã
- æååããŒã¿é·ã100æåãè¶ ããŠããããããã¯åŸ©åž°(\r)ãå«ãå Žåã«ãå€éšãªããžã§ã¯ããã¡ã€ã«ãžæååããŒã¿ãèšèŒããŸãã
- æåã³ãŒãUTF-8ã§èšèŒããŸãã
å€éšãªããžã§ã¯ããã¡ã€ã«ããšã¯ã¹ããŒããããšãããšã¯ã¹ããŒãæã®å€éšãªããžã§ã¯ããã¡ã€ã«åã¯ã以äžã®èŠåã«åŸãäœæãããŸãã
- ã·ã³ã°ã«ã³ã³ãã圢åŒã®å Žå
- ããŒã¿ããŒã¹å.ã³ã³ããå_ROWçªå·_COLUMNçªå·.ããŒã¿å
- ROWçªå·ãCOLUMNçªå·ã¯ã³ã³ããã®ããŒã¿ã®é åºçªå·ã瀺ããçªå·0ããæ¡çªãããŸãã
- äŸ)ã³ã³ããã®ã«ã©ã ãByteé åã®å Žåãå€éšãªããžã§ã¯ããã¡ã€ã«ã¯ããŒã¿ããŒã¹å.ã³ã³ããå_ROWçªå·_COLUMNçªå·.byte_arrayãšãªããŸãã
- ãã«ãã³ã³ãã圢åŒã®å Žå
- --outãªãã·ã§ã³ã§ãã¡ã€ã«èå¥åãæå®ããã¡ã€ã«èå¥å_ããŒã¿ããŒã¹å.ã³ã³ããå_ROWçªå·_COLUMNçªå·.ããŒã¿å
- --outãªãã·ã§ã³ã§ãã¡ã€ã«èå¥åãçç¥ãæ¥æ_ããŒã¿ããŒã¹å.ã³ã³ããå_ROWçªå·_COLUMNçªå·.ããŒã¿å
- ãã¡ã€ã«åã®ããŒã¿ããŒã¹åãšã³ã³ããåã®æååã¯URLãšã³ã³ãŒãããŸããããšã³ã³ãŒãããããŒã¿ããŒã¹å.ãšã³ã³ãŒãããã³ã³ããåãã®æåé·ã140æåãè¶ ããå Žåã¯ã140æåãŸã§ã§æååãåããæåŸã«èå¥å(é£çª)ãè¿œå ããŸãã
ã€ã³ããŒãã§å©çšããå€éšãªããžã§ã¯ããã¡ã€ã«ã®ãã¡ã€ã«åã¯ä»»æã§ããCSVããŒã¿ãã¡ã€ã«ã®è©²åœã«ã©ã ã«ã@ããŒã¿å:ä»»æã®ãã¡ã€ã«åã§èšèŒããŸãã
ãäŸãå€éšãªããžã§ã¯ããã¡ã€ã«ã®åœåäŸ
//BYTEé
åã3ã«ã©ã ç®ã«æã€ãã³ã¬ã¯ã·ã§ã³(colb)ããšã¯ã¹ããŒãããå Žå
ã
10æ 4 12:51 2017 public.colb.csv
10æ 4 12:51 2017 public.colb_0_3.byte_array
10æ 4 12:51 2017 public.colb_1_3.byte_array
10æ 4 12:51 2017 public.colb_2_3.byte_array
10æ 4 12:51 2017 public.colb_3_3.byte_array
10æ 4 12:51 2017 public.colb_4_3.byte_array
10æ 4 12:51 2017 public.colb_properties.json
ãã
ãäŸãã·ã³ã°ã«ã³ã³ããããŒã¿ãã¡ã€ã«ã§ã®å€éšãªããžã§ã¯ããã¡ã€ã«ã®èšè¿°
-
ã¡ã¿ããŒã¿ãã¡ã€ã«ãpublic.col01_properties.json
{ "version": "4.0.0", "container": "col01", "containerFile": "public.col01.csv", "containerFileType": "csv", "containerType": "COLLECTION", "columnSet": [ { "columnName": "name","type": "string" }, { "columnName": "status", "type": "boolean"}, { "columnName": "count", "type": "long" }, { "columnName": "lob", "type": "byte[]" } ], "indexSet": [ { "columnName": "name", "type": "TREE" }, { "columnName": "count", "type": "TREE" } ], "rowKeyAssigned": true }
-
CSVããŒã¿ãã¡ã€ã«ãpublic.col01.csv
"#2017-10-01T19:41:35.320+0900 GridDB V4.0.00" "#User:admin" "%","public.col01_properties.json"ã "$","public.col01" "name02","false","2","@BYTE_ARRAY:public.col01_0_3.byte_array"
-
å€éšãªããžã§ã¯ããã¡ã€ã«ãpublic.col01_03.byte_array
1,10,15,20,40,70,71,72,73,74