ããé¦å
ï¼æå¼Amazon Elastic MapReduceæ§å¶å°ãç¶åç¹å» Create Cluster ï¼å¨äºä¸ªæ¥éª¤ä¸å®æé
置设置ã
ãã第ä¸æ¥ï¼é
ç½®ä¸ä¸ªé群
ããå¨ Cluster name å段ä¸ï¼è¾å
¥ä¸ä¸ªæè¿°æ§çå称ãå®å¯ä»¥æ¯éå¯ä¸çã
ããå¨Termination protection å段ä¸ï¼å
¶é»è®¤å¼ä¸ºYesãè¿ä¸è®¾ç½®å¯ç¡®ä¿é群ä¸ä¼å 为æå¤æé误èå
³éã
ããå¨Logging å段ä¸ï¼å
¶é»è®¤å¼ä¸ºEnabledãæ¥å¿æ°æ®å°è¢«åéè³äºé©¬éS3ã
ããå¨Log folder S3 location å段ä¸ï¼è¯·ä»¥å¦ä¸æ ¼å¼è¾å
¥åå¨æ¡¶å称åæ件夹信æ¯ï¼s3://<bucket name>/<folder>/ã
ããå¨Debugging å段ä¸ï¼å
¶é»è®¤å¼ä¸ºEnabledã
ããTag é¨åæ¯å¯éçãä½ å¯ä»¥ä¸ºä½ çEMRé群添å æå¤10个æ ç¾ãå¨ä¸ä¸ªæ ç¾ä¸ï¼å
æ¬äºä¸ä¸ªåºå大å°åçé®å¼å¯¹ã
ãã第äºæ¥ï¼è®¾ç½®è½¯ä»¶é
ç½®
ããå¨Hadoop distribution å¤éæ¡ä¸ï¼éæ©Amazon 为é»è®¤å¼ã
ããå¨ AMI version å¤éæ¡ä¸ï¼éæ© 2.4.2 ï¼Hadoop 1.0.3ï¼
ããå¨Application to be installed å¤éæ¡ä¸ï¼ä¿çéä¸Hive å deletePigã
ãã第ä¸æ¥ï¼è®¾ç½®ç¡¬ä»¶é
ç½®
ããå¨ Network å段ä¸ï¼éæ©Launch into EC-2 Classicã
ããå¨EC2 Subnet å段ä¸ï¼éæ© No preferenceã
ããå¨MasterãCore 以å Task å段ä¸ï¼é»è®¤EC2å®ä¾ç±»å为m1.smallã对äºä½å·¥ä½è´è½½çåºç¨ï¼ä½ å¯ä»¥ä¸ºææèç¹éæ©ä½¿ç¨å°å®ä¾ï¼å¯ç¡®ä¿éä½ä½ ç使ç¨ææ¬ï¼ãç¸åºå°ï¼Count
çé»è®¤å¼åå«ä¸º1ã 2ã 0ãåæ¶ï¼å¯¹äºææä¸ä¸ªå段ï¼ç¡®ä¿ä¸éä¸ Request Spot Instances ã
ãã注æï¼20æ¯æ¯ä¸ªAWSå¸æ·çæ大èç¹æ°ãå¦æä½ è¿è¡äº2个é群ï¼é£ä¹2个é群è¿è¡çèç¹æ»æ°å¿
须为20æ以ä¸ãå¦æä½ ç¡®å®éè¦èç¹æ°è¶
è¿20ï¼é£ä¹ä½ å¿
é¡»æ交ä¸ä¸ªè¯·æ±ä»¥ä¾¿äºæé«ä½ çäºé©¬éEC2å®ä¾ä¸éã
ãã第åæ¥ï¼è®¾ç½®å®å
¨å访é®é
ç½®
ããå¨EC2 key pair å段ä¸ï¼ä»å表ä¸éæ©ä¸ä¸ªäºé©¬éEC2å¯é¥å¯¹ãè¿ä¸è®¾ç½®å¯ä»¥è®©ä½ 使ç¨Secure Shellï¼SSHï¼æ¥è¿æ¥ä¸»èç¹ã
ããå¨IAM user access å段ä¸ï¼å
¶é»è®¤å¼ä¸º No other IAM usersã
ããå¨EC2 role å¤éæ¡ä¸ï¼å
¶é»è®¤å¼ä¸º no roles foundã
ããå¨Bootstrap Actions é¨åï¼ä½ å¯ä»¥ä¸åä»»ä½æä½ã
ãã第äºæ¥ï¼æå®é群åæ°
ããå¨Steps é¨åï¼ä»å表ä¸éæ©Hive Programï¼å¹¶ç¹å» Configure and addã
ããå¨Name å段ä¸ï¼å
¶é»è®¤å¼ä¸ºHive Programã
ããå¨ Script s3 Location å段ä¸ï¼å¿
é项ï¼ï¼ä»¥BucketName/path/ScriptNameçæ ¼å¼è¾å
¥ç¸å
³ä¿¡æ¯ï¼ä¾å¦
s3n://elasticmapreduce/samples/hive-ads/libs/model-buildã
ããå¨ Input s3 Location å段ä¸ï¼å¯é项ï¼ï¼ä»¥BucketName/pathçæ ¼å¼è¾å
¥ç¸å
³ä¿¡æ¯ï¼ä¾å¦
s3n://elasticmapreduce/samples/hive-ads/tablesã该è¾å
¥å¼ä¼ä½ä¸ºå为INPUTçåæ°åéç»Hiveè
æ¬ç¨åºã
ããOutput S3 Location å段ï¼å¯é项ï¼ï¼ä»¥BucketName/pathçæ ¼å¼è¾å
¥ç¸å
³ä¿¡æ¯ï¼ä¾å¦
s3n://myawsbucket/hive-ads/output/2014-4-14ã该è¾å
¥å¼ä¼ä½ä¸ºå为OUTPUTçåæ°åéç»Hiveèæ¬ç¨
åºã
ããå¨ Arguments å段ï¼è¾å
¥ç¸å
³ä¿¡æ¯ï¼å¦ - d LIBS=s3n://elasticreducemap/samples/hive-ads/libsãHIVEèæ¬ç¨åºéè¦é¢å¤çåºã
ããå¨ Action on Failure å段ä¸ï¼éæ© Continueãå¦æå½åæ¥éª¤å¤±è´¥ï¼å®å°ç»§ç»è³ä¸ä¸ä¸ªæ¥éª¤ã
ããå½ä½ å®æåï¼ç¹å»Addï¼ç¶åç¹å»Create Clusterãä½ å°ä¼çå°Summary ä¿¡æ¯ã
ããå¦ä¸ä¾ï¼å¨ä½ 继ç»æ¥è¯¢æä½ååæ大æ°æ®åï¼ä½ éè¦å¨ä¸»èç¹ä¸åå¤ä¸ä¸ªHIVEä¼è¯ã
ããä½ å°éè¦æ¯éäºåéåäºé©¬éS3æ¨é Impression å Click Log Filesãæ¯æ¬¡æ·»å ä¸ä¸ªæ¡ç®ï¼å°±ä¼å客æ·æ¾ç¤ºä¸æ¡å¹¿åãæ¯æ¬¡æ·»å ä¸ä¸ªClick
Log Filesçæ¡ç®ï¼å®¢æ·ä¸æ¡å¹¿åã类似äºSQLçæ¥è¯¢æä½ç®åäºå
³è客æ·ç¹å»æ°æ®åç¹å®å¹¿åçè¿ç¨ã
ããæ»ä¹ï¼åæ大æ°æ®çæä½³æ¹æ³å°±æ¯å¨Hadoopä¸è¿è¡Hiveï¼å¹¶ä½¿ç¨SQLæ¥è¯¢ä»¥ç®åæ¥å¿æ°æ®åæã
温馨提示:答案为网友推荐,仅供参考