ç°æçSQL解å³æ¹æ¡é常é½ä¸æ¯æ°´å¹³å¯ä¼¸ç¼©çï¼å æ¤å½æ°æ®éå大æ¶ä¼éå°éç¢ãä½æ¯è¿æ ·çæ
åµï¼éçNoSQLçåºç°å·²ç»å¾å°å¾å¤§ç¨åº¦çç¼è§£ï¼å¹¶ä¸éçNoSQLææ¯çå®åä¸æçï¼è¿ç§æ
åµå°ä¼ä»æ ¹æ¬ä¸è§£å³ã
æ们ç¥éNoSQLåºå«äºå
³ç³»åæ°æ®åºçä¸ç¹å°±æ¯NoSQLä¸ä½¿ç¨SQLä½ä¸ºæ¥è¯¢è¯è¨ï¼è³äºä¸ºä½å¨NoSQLæ°æ®åå¨HBaseä¸æä¾SQLæ¥å£ï¼æå¦ä¸åå ï¼
1.使ç¨è¯¸å¦SQLè¿æ ·æäºç解çè¯è¨ï¼ä½¿äººä»¬è½å¤æ´å è½»æ¾å°ä½¿ç¨HBaseã
2.使ç¨è¯¸å¦SQLè¿æ ·æ´é«å±æ¬¡çè¯è¨æ¥ç¼åï¼åå°äºç¼åç代ç éã
3.æ§è¡æ¥è¯¢æ¶ï¼å¨æ°æ®è®¿é®ä¸è¿è¡æ¶æ§è¡ä¹é´å ä¸SQLè¿æ ·ä¸å±æ½è±¡å¯ä»¥è¿è¡å¤§éä¼åãä¾å¦ï¼å¯¹äºGROUP
BYæ¥è¯¢æ¥è¯´ï¼å©ç¨HBaseä¸ååå¤çå¨ï¼èåå¯ä»¥å¨æå¡å¨ä¸è¿è¡ï¼èä¸å¿
å¨å®¢æ·ç«¯ï¼è¿ä¹åä¼æ大åå°å®¢æ·ç«¯ä¸æå¡å¨ä¹é´ä¼ è¾çæ°æ®éãæ¤å¤ï¼ä¹å¯ä»¥å¨å®¢æ·ç«¯å¹¶è¡æ§è¡GROUP
BYï¼è¿æ¯æ ¹æ®è¡å¥çèå´æ¥æªææ«æèå®ç°çãéè¿å¹¶è¡æ§è¡ï¼ç»æä¼æ´å¿«çè¿åãææè¿äºä¼åæ éç¨æ·åä¸ï¼åªéæ§è¡æ¥è¯¢å³å¯ã
åºäºHBaseçSQLå¼æå®ç°
ç°é¶æ®µä¸å
æä¸äºå
³äºHBase SQLå¼æå±çå°è¯ï¼å·²ç»æä¸äºæ¯è¾ç¨³å®ç解å³æ¹æ¡åç°å®ã
1.Hiveæ´åHBase
Hiveä¸HBaseçæ´ååè½ä»Hive0.6.0çæ¬å·²ç»å¼å§åºç°ï¼å©ç¨ä¸¤è
对å¤çAPIæ¥å£äºç¸éä¿¡ï¼é信主è¦ä¾é hive_hbase-handler.jarå·¥å
·å
ï¼Hive
Storage
Handlersï¼ãç±äºHBaseæä¸æ¬¡æ¯è¾å¤§ççæ¬åå¨ï¼æ以并ä¸æ¯æ¯ä¸ªçæ¬çHiveé½è½åç°æçHBaseçæ¬è¿è¡æ´åï¼æ以å¨ä½¿ç¨è¿ç¨ä¸ç¹å«æ³¨æçå°±æ¯ä¸¤è
çæ¬çä¸è´æ§ã
2.Phoenix
Phoenixç±Salesforce.comå¼æºï¼æ¯æ建å¨Apache
HBaseä¹ä¸çä¸ä¸ªSQLä¸é´å±ï¼å¯ä»¥è®©å¼åè
å¨HBaseä¸æ§è¡SQLæ¥è¯¢ãPhoenix
å®å
¨ä½¿ç¨Javaç¼åï¼ä»£ç ä½äºGithubä¸ï¼å¹¶ä¸æä¾äºä¸ä¸ªå®¢æ·ç«¯å¯åµå
¥çJDBC驱å¨ã对äº10wå°100wè¡çç®åæ¥è¯¢æ¥è¯´ï¼Phoenixè¦èäºHiveã
3.Kundera
Kundera æ¯ä¸ä¸ªJPA2.0å
¼å®¹çNoSQLæ°æ®åå¨ç对象æ å°æ¡æ¶ãKunderaåºäºç°æç±»åºæ建ï¼å°è£
åºç®æçAPIï¼å
¶ä¸»è¦ç¹æ§æï¼
1ï¼æ¯æ交åæ°æ®åå¨æä¹
æ§ï¼è¿æå³çç¨æ·å¯ä»¥å¨ä¸åçæ°æ®åå¨ä½¿ç¨åä¸æ¹æ³åå¨åè·åç¸å
³å®ä½ã
2)è½å¤å¾å¥½å°ç®¡çäºå¡ï¼åæ¶æ¯æEntityTransactionåJava Transaction APIï¼JPAï¼ã
3) å
¼å®¹JPA2.0ï¼ä¸¥æ ¼ä½¿ç¨JPA注é对象æ å°å°æ°æ®åå¨è¡¨ã
4) ç®åæ¯æçNoSQLæå¡å¨å
æ¬: HBase,MongoDB,Redis,Neo4jçã
è¿æå
¶å®ä¸äºè§£å³æ¹æ¡ï¼ä¾å¦ï¼Lealone,hbase-sql,Impalaçï¼è¦ä¹ä¸æçï¼è¦ä¹åæ¢æ´æ°äºï¼è¦ä¹å
·æå±éæ§ã读è
对å
¶æå
´è¶£ï¼å¯ä»¥èªè¡å»äºè§£ã
温馨提示:答案为网友推荐,仅供参考