{"id":114559,"date":"2018-08-03T08:33:09","date_gmt":"2018-08-03T00:33:09","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=114559"},"modified":"2018-08-02T13:05:40","modified_gmt":"2018-08-02T05:05:40","slug":"hadoop-spark","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/hadoop-spark.html","title":{"rendered":"\u5982\u4f55\u9ad8\u6548\u5b66\u4e60hadoop\u548cspark"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | hadoop\u548cSpark\u662f\u4e24\u79cd\u4e0d\u540c\u7684\u5927\u6570\u636e\u751f\u6001\u7cfb\u7edf\uff0cHadoop\u6846\u67b6\u6bd4\u8f83\u4fa7\u91cd\u79bb\u7ebf\u5927\u6279\u91cf\u8ba1\u7b97\uff0c\u800cspark\u6846\u67b6\u5219\u4fa7\u91cd\u4e8e\u5185\u5b58\u548c\u5b9e\u65f6\u8ba1\u7b97\u3002\u5728\u8fd9\u4e9b\u57fa\u7840\u4e0a\uff0c\u884d\u751f\u51fa\u4e86\u4e00\u4e9b\u5e38\u7528\u7684\u9644\u5c5e\u7ec4\u4ef6\uff0c\u6bd4\u5982Hadoop\u751f\u6001\u4e0b\u7684HBASE\u3001hive\u3001HDFS\u7b49\uff0cHDFS\u53ef\u7528\u4e8e\u6570\u636e\u5b58\u50a8\uff0cMR\u53ef\u7528\u4e8e\u5206\u5e03\u5f0f\u8ba1\u7b97\u6846\u67b6\u3002\u540c\u6837\uff0c\u5728spark\u7684\u57fa\u7840\u4e0a\u4e5f\u884d\u751f\u51fa\u4e86\u5f88\u591a\u7ec4\u4ef6\uff0c\u6bd4\u5982spark streaming\u3001spark SQL\u3001mllib\u7b49\u3002\u5176\u4e2dspark score\u5b8c\u5168\u53ef\u4ee5\u4ee3\u66ffMR\uff0cspark\u4e2d\u4e0d\u4ec5\u53ef\u4ee5\u6709reduce\u64cd\u4f5c\uff0c\u540c\u65f6\u4e5f\u63d0\u4f9b\u4e86\u5176\u4ed6\u8bf8\u5982filter sortby\u7b49\u64cd\u4f5c\uff0c\u8981\u6bd4MR\u65b9\u4fbf\u5f88\u591a\uff0c\u540c\u65f6\uff0cspark SQL\u53ef\u4ee5\u76f4\u63a5\u628ahive\u4e0a\u7684\u6587\u4ef6\u6620\u5c04\u6210\u4e00\u5f20\u8868\uff0c\u6765\u8fdb\u884c\u8868\u64cd\u4f5c\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n Hadoop<\/strong><\/p>\n \u5927\u6570\u636e\u662f\u4e00\u4e2a\u6982\u5ff5\uff0chadoop\u662f\u6765\u5b9e\u73b0\u8fd9\u4e2a\u6982\u5ff5\u7684\u5de5\u5177\u3001\u6280\u672f\uff0c\u5b83\u4eec\u4e4b\u95f4\u5e76\u6ca1\u6709\u7edd\u5bf9\u7684\u8054\u7cfb\u3002Hadoop\u4f5c\u4e3a\u4e00\u4ee3\u5206\u5e03\u5f0f\u7cfb\u7edf\u7684\u57fa\u7840\uff0c\u7279\u522b\u662f\u7b2c\u4e8c\u4ee3Hadoop YARN\u63a8\u51fa\u4ee5\u540e\uff0c\u8fd9\u4e2a\u4f4d\u7f6e\u66f4\u52a0\u7262\u56fa\u3002\u76ee\u524d\u5728\u5e02\u9762\u4e0a\u5e76\u6ca1\u6709\u53ef\u4ee5\u4e0e\u4e4b\u76f8\u5339\u654c\u7684\u7cfb\u7edf\u5b58\u5728\u3002<\/p>\n \u5177\u4f53\u7684\u5b66\u4e60<\/strong><\/p>\n 1.\u7f16\u7a0b\u57fa\u7840\uff0c\u6bd4\u5982Java\uff0cC\uff0cpython\uff0clinux\uff0c\u6709\u8fd9\u4e9b\u57fa\u7840\u5b66\u8d77\u6765\u5c31\u4f1a\u5f88\u5feb\u4e0a\u624b\u3002<\/p>\n 2.\u8be6\u7ec6\u7814\u7a76\uff0c\u73b0\u5728\u5927\u578b\u7f51\u7ad9\u5305\u62ecSina\uff0c\u817e\u8baf\u7f51\uff08\u95e8\u6237\uff09\uff0cWeibo\uff08\u5fae\u535a\uff09\uff0c\u5929\u732b\uff0c\u4eac\u4e1c\uff08\u7535\u5546\uff09\u7684\u67b6\u6784\u4e0e\u5b9e\u73b0\uff0c\u5148\u4ece\u81ea\u5df1\u7684\u89d2\u5ea6\u53bb\u7406\u89e3\uff0c\u7136\u540e\u53bb\u8ddf\u5b9e\u9645\u60c5\u51b5\u505a\u6bd4\u5bf9\uff0c\u63d0\u5347\u81ea\u5df1\u5bf9\u6570\u636e\u548c\u6280\u672f\u7684\u654f\u611f\u7a0b\u5ea6\u3002<\/p>\n 3.\u719f\u6089\u5e76\u7406\u89e3\uff0c\u76ee\u524d\u963f\u91cc\uff0c\u817e\u8baf\uff0c\u767e\u5ea6\u5185\u90e8\u7684\u7cfb\u7edf\u6216\u591a\u6216\u5c11\u90fd\u662f\u501f\u9274\u4e8eHadoop\u7684\u3002\u8fd0\u7528Hadoop\u5bf9\u4e8e\u4f60\u4ee5\u540e\u5728\u5927\u578b\u8ba1\u7b97\u673a\u516c\u53f8\u4efb\u804c\u975e\u5e38\u91cd\u8981\u3002<\/p>\n 4.\u7406\u89e3\u5206\u5e03\u5f0f\u7cfb\u7edf\u8bbe\u8ba1\u4e2d\u7684\u539f\u5219\u4ee5\u53ca\u65b9\u6cd5\uff0c\u4f8b\u5982\u8d1f\u8f7d\u5747\u8861\uff0c\u6545\u969c\u6062\u590d\uff0c\u5e76\u53d1\u7a0b\u5e8f\u8bbe\u8ba1\uff0c\u5e76\u53d1\u6570\u636e\u7ed3\u6784\uff0c\u7b49\u7b49\u3002\u7406\u89e3\u8fd9\u4e9b\u8bbe\u8ba1\u539f\u7406\uff0c\u5e76\u8d70\u5165\u5e95\u5c42\u8bfb\u61c2\u6bcf\u4e00\u884cHadoop\u7684\u6e90\u7801\u66f4\u52a0\u7684\u91cd\u8981\u3002<\/p>\n Spark<\/strong><\/p>\n Spark\u53ea\u662f\u5206\u5e03\u5f0f\u8ba1\u7b97\u5e73\u53f0\uff0c\u800chadoop\u5df2\u7ecf\u662f\u5206\u5e03\u5f0f\u8ba1\u7b97\u3001\u5b58\u50a8\u3001\u7ba1\u7406\u7684\u751f\u6001\u7cfb\u7edf\u3002\u4e0eSpark\u76f8\u5bf9\u5e94\u7684\u662fHadoop MapReduce\u3002<\/p>\n Spark\u76f8\u5bf9\u4e8eHadoop\u7684\u4f18\u52bf\uff0c\u5206\u5e03\u5f0f\u8ba1\u7b97\u4ec5\u4ec5\u662fhadoop\u7684\u4e00\u90e8\u5206\u3002\u4ece\u5185\u5bb9\u4e0a\u6765\u8bf4\uff0c\u8fd8\u662f\u6709\u4e9b\u5bf9\u6bd4\uff1a<\/strong><\/p>\n 1\u3001\u66f4\u5feb<\/p>\n 2\u3001\u66f4\u52a0\u5bb9\u6613\u4f7f\u7528<\/p>\n \u914d\u7f6e\u8d77\u6765\u8d85\u7ea7\u65b9\u4fbf\u3002\u9664\u652f\u6301JAVA\u5916\uff0c\u652f\u6301scala\u3001python\u3001R\u3002\u7279\u522b\u662fscala\uff0c\u7b80\u76f4\u662f\u592a\u9002\u5408\u5199\u6570\u636e\u5206\u6790\u7684\u7a0b\u5e8f\u4e86\uff0cmapreduce\u7528JAVA\u5b9e\u5728\u662f\u592a\u86cb\u75bc\u4e86\u3002\u800c\u4e14RDD\u81ea\u5e26\u7684\u51fd\u6570<\/p>\n 3\u3001\u5de8\u597d\u7528\u7684\u5e93\u80fd\u89e3\u51b390%\u95ee\u9898\u7684\u56db\u5927\u7ec4\u4ef6\uff0c\u65e0\u8bba\u662fSQL\u3001\u8fd8\u662f\u6d41\u6570\u636e\u5904\u7406\u3001\u673a\u5668\u5b66\u4e60\u5e93\u3001\u56fe\u8ba1\u7b97\uff0c\u76f8\u5f53\u597d\u7528\u3002\u5f53\u7136\uff0chadoop\u76f8\u5173\u7684\u5e93\u4e5f\u4e0d\u5c11\uff0c\u4e0d\u8fc7spark\u662f\u539f\u751f\u5305\u542b\uff0c\u7528\u8d77\u6765\u65b9\u4fbf\u70b9\u3002 4\u3001\u8fd0\u884c\u65b9\u4fbf<\/p>\n Spark\u662f\u53ef\u4ee5\u8131\u79bbhadoop\u8fd0\u884c\u7684\uff0c\u6bd4\u5982\u6570\u636e\u53ef\u4ee5\u4ece\u6570\u636e\u5e93\u6216\u8005\u672c\u5730\u6587\u4ef6\u91cc\u9762\u62bd\u53d6\u3002\u4e0d\u8fc7\u6bd5\u7adf\u5927\u6570\u636e\u65f6\u4ee3\uff0c\u5927\u5bb6\u90fd\u4e60\u60ef\u4e8e\u5c06Spark\u548chadoop\u901a\u8fc7mesos\u6216\u8005yarn\u7ed3\u5408\u8d77\u6765\u7528\uff1b\u4e3b\u8981\u7528Hadoop\u7684HDFS\uff0c\u5f53\u7136HBASE\u6216\u8005HIVE\u8fd9\u79cdHDFS\u4e4b\u4e0a\u7684\u7ec4\u4ef6\uff0cSpark\u4e5f\u652f\u6301\u3002<\/p>\n \u5177\u4f53\u7684\u5b66\u4e60\uff1a<\/strong><\/p>\n 1\u3001\u719f\u6089\u5982\u4f55\u53bb\u5199spark\u7684\u7a0b\u5e8f\uff1b<\/p>\n 2\u3001\u5b9e\u8df5\u5230\u4e00\u5b9a\u7a0b\u5ea6\u4e4b\u540e\uff0c\u9010\u6e10\u7684\u901a\u8fc7spark\u8fd0\u884c\u65e5\u5fd7\u5bf9spark\u7684\u8fd0\u884c\u673a\u5236\u548c\u539f\u7406\u6709\u4e86\u89e3\u3002<\/p>\n \u770b\u67b6\u6784\u3001\u6e90\u7801\u3002\u8bd5\u8bd5\u770b\u4e00\u4e9b\u89e3\u8bfb\u6e90\u7801\u7684\u56fe\u4e66\uff0c Spark\u7684\u76f8\u5173\u77e5\u8bc6\u5c31\u5df2\u7ecf\u5f00\u59cb\u6c89\u6dc0\u4e86\u3002<\/p>\n 3\u3001\u4e86\u89e3spark\u7684\u5404\u4e2a\u8c03\u5ea6\u5668\u5982\u4f55\u5b9e\u73b0\uff0c\u4e4b\u524d\u603b\u662f\u51fa\u73b0\u5728\u773c\u775b\u91cc\u7684\u90a3\u4e2a\u5bbd\u4f9d\u8d56\u7a84\u4f9d\u8d56\u3001\u548cstage\u7684\u5207\u5206\uff0ctask\u9996\u9009\u4f4d\u7f6e\u7684\u786e\u5b9a\u7b49\u3002\u968f\u7740\u4e0d\u65ad\u6df1\u5165\uff0c\u5c1d\u8bd5\u770b\u5e95\u5c42\u7684block\u5982\u4f55\u8bfb\u5982\u4f55\u5199\uff0c\u4e4b\u95f4\u5982\u4f55\u534f\u8c03\u901a\u8baf\u7b49\u7b49\u3002\u5927\u6570\u636e\u5b66\u4e60\u8d44\u6599\u5206\u4eab\u7fa4119599574 \u4e0d\u7ba1\u4f60\u662f\u5c0f\u767d\u8fd8\u662f\u5927\u725b\uff0c\u5c0f\u7f16\u6211\u90fd\u633a\u6b22\u8fce\uff0c\u4eca\u5929\u7684\u6e90\u7801\u5df2\u7ecf\u4e0a\u4f20\u5230\u7fa4\u6587\u4ef6\uff0c\u4e0d\u5b9a\u671f\u5206\u4eab\u5e72\u8d27\uff0c\u5305\u62ec\u6211\u81ea\u5df1\u6574\u7406\u7684\u4e00\u4efd\u6700\u65b0\u7684\u9002\u54082018\u5e74\u5b66\u4e60\u7684\u5927\u6570\u636e\u5f00\u53d1\u548c\u96f6\u57fa\u7840\u5165\u95e8\u6559\u7a0b\uff0c\u6b22\u8fce\u521d\u5b66\u548c\u8fdb\u9636\u4e2d\u7684\u5c0f\u4f19\u4f34\u3002<\/p>\n \u539f\u6587\u6765\u81ea\uff1ahttps:\/\/blog.csdn.net\/qq_41800874\/article\/details\/81297379<\/a><\/p>\n |