{"id":1588,"date":"2019-08-21T21:29:46","date_gmt":"2019-08-21T19:29:46","guid":{"rendered":"https:\/\/myoceane.fr\/?p=1588"},"modified":"2019-08-21T21:40:11","modified_gmt":"2019-08-21T19:40:11","slug":"big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83","status":"publish","type":"post","link":"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/","title":{"rendered":"[Big Data] \u5efa\u7acb BigData \u5728 Local \u7684\u6e2c\u8a66\u74b0\u5883"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n\n<p style=\"text-align: justify;\">\u5728\u958b\u767c Spark \u5927\u6578\u64da\u7a0b\u5f0f\u7684\u6642\u5019\uff0c\u57fa\u672c\u4e0a\u90fd\u6703\u9047\u5230\u6e2c\u8a66\u7684\u9700\u6c42\uff0c\u4f46\u662f\u53ef\u80fd\u7576\u6642\u4e26\u6c92\u6709\u5efa\u7acb\u76f8\u5c0d\u61c9\u7684\u670d\u52d9 Cluster \u4f8b\u5982 Hdfs, Hive, HBase \u7b49\u7b49\u7684\u670d\u52d9\u7fa4\u96c6\uff0c\u6240\u4ee5\u5728\u958b\u767c\u4e0a\u9762\u6703\u9047\u5230\u5f88\u591a\u56f0\u96e3\uff0c\u5176\u5be6 Hdfs \u9084\u7b97\u662f\u6bd4\u8f03\u597d\u89e3\u6c7a\u7684\uff0c\u4f7f\u7528 FileSystem \u67d0\u7a2e\u7a0b\u5ea6\u4e0a\u9762\u9084\u662f\u53ef\u4ee5\u5229\u7528\u672c\u6a5f\u7684\u78c1\u789f\u6a21\u64ec Hdfs \u6e2c\u8a66\u5176\u8207 Java \u7a0b\u5f0f\u7684\u6e9d\u901a\u60c5\u6cc1\uff0c\u4f46\u662f\u5982\u679c\u9047\u5230\u50cf\u662f Hive, HBase \u7b49\u7b49\u7684\u8cc7\u6599\u5eab\uff0c\u5728\u6c92\u6709\u771f\u6b63\u7fa4\u96c6\u7684\u60c5\u6cc1\u4e4b\u4e0b\u5982\u4f55\u6e2c\u8a66\u81ea\u5df1\u7684\u7a0b\u5f0f\u5c31\u8b8a\u5f97\u975e\u5e38\u9700\u8981\u4e86\uff01<\/p>\n<p>\u672c\u7bc7\u8981\u4ecb\u7d39\u7684\u662f\u4e00\u500b\u7b2c\u4e09\u65b9\u51fd\u5f0f\u5eab\u53ef\u4ee5\u5e6b\u52a9\u6211\u5011\u55ae\u5143\u6e2c\u8a66 Java \u7684\u7a0b\u5f0f\uff1a<\/p>\n\n\n\n<div class=\"wp-block-button aligncenter\"><a class=\"wp-block-button__link\" href=\"https:\/\/github.com\/sakserv\/hadoop-mini-clusters\">Hadoop-Mini-Cluster<\/a><\/div>\n\n\n\n<p style=\"text-align: justify;\">\u9996\u5148\u5efa\u7acb SparkTestSuite \u4f9b\u7d66 Local \u7aef\u7684\u6e2c\u8a66\u74b0\u5883\uff0c\u4e26\u4e14\u5728\u88e1\u9762\u5efa\u7acb Hadoop \u7684 Cluster\uff0c\u4f8b\u5982\u4ee5\u4e0b\u7a0b\u5f0f\u78bc\u6240\u5448\u73fe\uff1a<\/p>\n<pre class=\"lang:java\">package myoceane.testing\n\nimport com.github.sakserv.minicluster.impl.HdfsLocalCluster;\n\npublic abstract class SparkTestSuite {\n\n\tprotected static HdfsLocalCluster hdfsLocalCluster = null;\n\tprotected static FileSystem fsContext;\n\tprotected static String tempDir;\n\t\n\t@BeforeClass\n\tpublic static void beforeAll(){\n\t\tconfigureHadoop();\n\t\thdfsLocalCluster = new HdfsLocalCluster.Builder()\n\t\t\t.setHdfsNamenodePort(12345)\n\t\t\t.setHdfsNamenodeHttpPort(12341)\n\t\t\t.setHdfsTempDir(\"target\/embedded_hdfs\")\n\t\t\t.setHdfsNumDataNodes(1)\n\t\t\t.setHdfsEnablePermissions(false)\n\t\t\t.setHdfsFormat(true)\n\t\t\t.setHdfsEnableRunningUserAsProxyUser(true)\n\t\t\t.setHdfsConfig(new Configuration())\n\t\t\t.build();\n\t\thdfsLocalCluster.start();\n\t\tfsContext = hdfsLocalCluster.getHdfsFileSystemHandle();\n\t\tsetHiveAndMetaStore();\n\t}\n}<\/pre>\n<p>\u53d6\u5f97 fsContext \u4e4b\u5f8c\u5c31\u53ef\u4ee5\u9032\u884c hdfs \u7684\u64cd\u4f5c\u4f8b\u5982\uff1a<\/p>\n<pre class=\"lang:java\">fsContext.mkdirs(new Path(path));\nfsContext.copyFromLocalFile(new Path(file), new Path(inHdfs));<\/pre>\n\n\n\n<p>\u5728 configureHadoop() \u7684\u51fd\u5f0f\u88e1\u9762\uff0c\u4e3b\u8981\u57f7\u884c\u7684\u662f\u4ee5\u4e0b\u5167\u5bb9\uff0c\u9996\u5148\u5224\u65b7\u57f7\u884c\u7684\u74b0\u5883\uff0c\u5982\u679c\u662f Windows \u7684\u74b0\u5883\u7684\u8a71\uff0c\u9700\u8981\u5c07 hadoop.dll, hdfs.dll, libwinutils.lib \u8207 winutils.exe \u8f09\u5165\uff0c\u8a2d\u5b9a\u597d\u9019\u4e9b\u53c3\u6578\u624d\u80fd\u5920\u6210\u529f\u555f\u52d5 Hdfs Cluster.<\/p>\n\n\n\n<pre class=\"lang:java\">private static void configureHadoop() throws Exception { \n\tif (SystemUtils.IS_OS_WINDOWS){ \n\t\ttempDir = new File(\"target\/\").getAbsolutePath() + \"\/\"; \n\t\tsaveAndLoadResource(new File(tempDir + \"hadoop\"), \"lib\/hadoop.dll\", true, true); \n\t\tsaveAndLoadResource(new File(tempDir + \"hadoop\"), \"lib\/hdfs.dll\", true, true); \n\t\tsaveAndLoadResource(new File(tempDir + \"hadoop\"), \"lib\/libwinutils.lib\", true, false); \n\t\tsaveAndLoadResource(new File(tempDir + \"hadoop\"), \"bin\/winutils.exe\", true, false); \n\t} else { \n\t\ttempDir = \"\/tmp\/\"; \n\t\tcommand = \"chmod 777 \/tmp\/hive\"; \n\t} \n\t\n\tString hadoopHome = tempDir + \"hadoop\"; \n\tSystem.setProperty(\"HADOOP_HOME\", hadoopHome); \n\tSystem.setProperty(\"hadoop.home.dir\", hadoopHome); \n\tSystem.setProperty(\"spark.testing\", \"true\");\n}<\/pre>\n\n\n\n<p>\u95dc\u65bc Hive MetaStore \u8207 MetaWareHouse \u7684\u8a2d\u5b9a\u8207\u555f\u52d5\uff0c\u53ef\u4ee5\u53c3\u8003 startHiveAndMetaStore() \u4ee5\u4e0b\u7bc4\u4f8b\u5c07 Hive \u8cc7\u6599\u5eab\u8a2d\u5b9a\u5728 Port = 12356\uff0c\u76f8\u8f03\u65bc Hdfs \u5247\u662f\u8a2d\u5b9a\u5728 Port = 12345\u3002<\/p>\n<pre class=\"lang:java\">private static void startHiveAndMetaStore(){\n\n\thivePort = 12356; \n\tString hostName = \"localhost\"; \n\tString hiveScratchDir = \"hive\"; \n\tString hiveWareHouseDir = \"hive\" + File.separator + \"warehouse\"; \n\tString hiveMetastoreDir = \"hive\" + File.separator + \"metastore_db\";\n\tString hiveUrls = \"thrift:\/\/\" + hostName + \":\" + hivePort;\n\t\n\tSystem.setProperty(\"hive.exec.scratchdir\", \"hdfs:\/\/127.0.0.1:12345\/\" + hiveScratchDir);\t\n\tSystem.setProperty(\"hive.warehouse.dir\", \"hdfs:\/\/127.0.0.1:12345\/\" + hiveWareHouseDir);\t\n\tSystem.setProperty(\"hive.metastore.derby.db.dir\", \"hdfs:\/\/127.0.0.1:12345\/\" + hiveMetastoreDir);\t\n\tSystem.setProperty(\"hive.metastore.hostname\", hostName);\t\n\tSystem.setProperty(\"hive.metastore.port\", hivePort.toString());\t\n\tSystem.setProperty(\"hive.metastore.urls\", hiveUrls);\n\t\n\thiveConf = new HiveConf();\n\thiveConf.setVar(HiveConf.ConfVars.METASTOREURLS, hiveUrls);\n\thiveConf.setVar(HiveConf.ConfVars.HADOOPFS, \"hdfs:\/\/127.0.0.1:12345\/\");\n\thiveConf.setVar(HiveConf.ConfVars.SCRATCHDIR, \"hdfs:\/\/127.0.0.1:12345\/\" + hiveScratchDir);\n\thiveConf.setVar(HiveConf.ConfVars.METASTORECONNECURLKEY, \"jdbc:derby:;databaseName=\" + \"target\/embedded_hdfs\/\" + hiveMetastoreDir + \"create=true\");\n\thiveConf.setVar(HiveConf.ConfVars.METASTOREWAREHOUSE, \"hdfs:\/\/127.0.0.1:12345\" + hiveWareHouseDir);\n\thiveConf.setBoolVar(HiveConf.ConfVars.HIVE_IN_TEST, true);\n\thiveConf.set(\"datanucleus.schema.autoCreateTables\", \"true\");\n\thiveConf.set(\"hive.metastore.schema.verification\", \"false\");\n\t\n\tStartHiveLocalMetaStore startHiveLocalMetaStore = new StartHiveLocalMetaStore();\n\tstartHiveLocalMetaStore.setHiveConf(hiveConf);\n\tstartHiveLocalMetaStore.setHivePort(hivePort);\n\tThread t = new Thread(startHiveLocalMetaStore);\n\tt.setDaemon(true);\n\tt.start();\n}<\/pre>\n\n\n\n<p>\u5230\u9019\u88e1 SparkTestSuite \u7b97\u662f\u5927\u81f4\u4e0a\u5b8c\u6210\u4e86\uff0c\u4e4b\u5f8c\u7684\u6240\u6709 Unit Test \u90fd\u53ef\u4ee5\u7e7c\u627f SparkTestSuite \u4ee5\u4f7f\u7528\u66ab\u6642\u5275\u9020\u51fa\u4f86\u6e2c\u8a66\u7684 Hdfs \u8ddf Hive\u3002\u7576\u7136\u9019\u4e00\u500b\u51fd\u5f0f\u5eab\u4e5f\u652f\u63f4\u5275\u9020\u5176\u4ed6\u7684\u670d\u52d9\u7528\u505a\u6e2c\u8a66\u7528\uff0c\u4f8b\u5982 HBase, Oozie, Kafka, etc.<\/p>\n<p>\u5099\u8a3b\uff1a\u9664\u4e86\u4f7f\u7528 hadoop-mini-clusters \u4e4b\u5916\uff0c\u4e00\u822c\u5e38\u7528\u4f86\u6e2c\u8a66 BigData ecosystem \u7684\u670d\u52d9\u9084\u6709 Hadoop-Unit \u9019\u4e00\u500b\u51fd\u5f0f\u5eab\u53ef\u4ee5\u4f7f\u7528\uff0c\u53ef\u4ee5\u53c3\u8003\u4ee5\u4e0b\u9023\u7d50\uff1a<\/p>\n\n\n\n<div class=\"wp-block-button aligncenter\"><a class=\"wp-block-button__link\" href=\"https:\/\/github.com\/jetoile\/hadoop-unit\">Hadoop Unit \u51fd\u5f0f\u5eab<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u958b\u767c Spark \u5927\u6578\u64da\u7a0b\u5f0f\u7684\u6642\u5019\uff0c\u57fa\u672c\u4e0a\u90fd\u6703\u9047\u5230\u6e2c\u8a66\u7684\u9700\u6c42\uff0c\u4f46\u662f\u53ef\u80fd\u7576\u6642\u4e26\u6c92\u6709\u5efa\u7acb\u76f8\u5c0d\u61c9\u7684\u670d\u52d9 Cluster \u4f8b\u5982 Hdfs, Hive, HBase \u7b49\u7b49\u7684\u8cc7\u6599\u5eab\uff0c\u6240\u4ee5\u5728\u958b\u767c\u4e0a\u9762\u6703\u9047\u5230\u5f88\u591a\u56f0\u96e3\uff0c\u5176\u5be6 Hdfs \u9084\u7b97\u662f\u6bd4\u8f03\u597d\u89e3\u6c7a\u7684\uff0c\u4f7f\u7528 FileSystem \u67d0\u7a2e\u7a0b\u5ea6\u4e0a\u9762\u9084\u662f\u53ef\u4ee5\u5229\u7528\u672c\u6a5f\u7684\u78c1\u789f\u6a21\u64ec Hdfs\u6e2c\u8a66\u5176 Java \u7a0b\u5f0f\u8207 Hdfs \u7684\u6e9d\u901a\u60c5\u6cc1\uff0c\u4f46\u662f\u5982\u679c\u9047\u5230\u50cf\u662f Hive, HBase \u7b49\u7b49\u7684\u8cc7\u6599\u5eab\uff0c\u5728\u6c92\u6709\u771f\u6b63\u7fa4\u96c6\u7684\u60c5\u6cc1\u4e4b\u4e0b\u5982\u4f55\u6e2c\u8a66\u81ea\u5df1\u7684\u7a0b\u5f0f\u5c31\u8b8a\u5f97\u975e\u5e38\u9700\u8981\u4e86\uff01\u672c\u7bc7\u8981\u4ecb\u7d39\u7684\u662f\u4e00\u500b\u7b2c\u4e09\u65b9\u51fd\u5f0f\u5eab\u53ef\u4ee5\u5e6b\u52a9\u6211\u5011\u55ae\u5143\u6e2c\u8a66 Java \u7684\u7a0b\u5f0f\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-1588","post","type-post","status-publish","format-standard","hentry","category-bigdata-ml"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Big Data] \u5efa\u7acb BigData \u5728 Local \u7684\u6e2c\u8a66\u74b0\u5883 - \u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/myoceane.fr\/index.php\/big-data-\u5efa\u7acb-hdfs-\u5728-local-\u6e2c\u8a66\u74b0\u5883\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Big Data] \u5efa\u7acb BigData \u5728 Local \u7684\u6e2c\u8a66\u74b0\u5883 - \u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane\" \/>\n<meta property=\"og:description\" content=\"\u5728\u958b\u767c Spark \u5927\u6578\u64da\u7a0b\u5f0f\u7684\u6642\u5019\uff0c\u57fa\u672c\u4e0a\u90fd\u6703\u9047\u5230\u6e2c\u8a66\u7684\u9700\u6c42\uff0c\u4f46\u662f\u53ef\u80fd\u7576\u6642\u4e26\u6c92\u6709\u5efa\u7acb\u76f8\u5c0d\u61c9\u7684\u670d\u52d9 Cluster \u4f8b\u5982 Hdfs, Hive, HBase \u7b49\u7b49\u7684\u8cc7\u6599\u5eab\uff0c\u6240\u4ee5\u5728\u958b\u767c\u4e0a\u9762\u6703\u9047\u5230\u5f88\u591a\u56f0\u96e3\uff0c\u5176\u5be6 Hdfs \u9084\u7b97\u662f\u6bd4\u8f03\u597d\u89e3\u6c7a\u7684\uff0c\u4f7f\u7528 FileSystem \u67d0\u7a2e\u7a0b\u5ea6\u4e0a\u9762\u9084\u662f\u53ef\u4ee5\u5229\u7528\u672c\u6a5f\u7684\u78c1\u789f\u6a21\u64ec Hdfs\u6e2c\u8a66\u5176 Java \u7a0b\u5f0f\u8207 Hdfs \u7684\u6e9d\u901a\u60c5\u6cc1\uff0c\u4f46\u662f\u5982\u679c\u9047\u5230\u50cf\u662f Hive, HBase \u7b49\u7b49\u7684\u8cc7\u6599\u5eab\uff0c\u5728\u6c92\u6709\u771f\u6b63\u7fa4\u96c6\u7684\u60c5\u6cc1\u4e4b\u4e0b\u5982\u4f55\u6e2c\u8a66\u81ea\u5df1\u7684\u7a0b\u5f0f\u5c31\u8b8a\u5f97\u975e\u5e38\u9700\u8981\u4e86\uff01\u672c\u7bc7\u8981\u4ecb\u7d39\u7684\u662f\u4e00\u500b\u7b2c\u4e09\u65b9\u51fd\u5f0f\u5eab\u53ef\u4ee5\u5e6b\u52a9\u6211\u5011\u55ae\u5143\u6e2c\u8a66 Java \u7684\u7a0b\u5f0f\uff1a\" \/>\n<meta property=\"og:url\" content=\"https:\/\/myoceane.fr\/index.php\/big-data-\u5efa\u7acb-hdfs-\u5728-local-\u6e2c\u8a66\u74b0\u5883\/\" \/>\n<meta property=\"og:site_name\" content=\"\u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-21T19:29:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-08-21T19:40:11+00:00\" \/>\n<meta name=\"author\" content=\"\u6ab8\u6aac\u7238\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6ab8\u6aac\u7238\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/\"},\"author\":{\"name\":\"\u6ab8\u6aac\u7238\",\"@id\":\"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b\"},\"headline\":\"[Big Data] \u5efa\u7acb BigData \u5728 Local \u7684\u6e2c\u8a66\u74b0\u5883\",\"datePublished\":\"2019-08-21T19:29:46+00:00\",\"dateModified\":\"2019-08-21T19:40:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/\"},\"wordCount\":59,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b\"},\"articleSection\":[\"Big Data &amp; Machine Learning\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/\",\"url\":\"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/\",\"name\":\"[Big Data] \u5efa\u7acb BigData \u5728 Local \u7684\u6e2c\u8a66\u74b0\u5883 - \u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane\",\"isPartOf\":{\"@id\":\"https:\/\/myoceane.fr\/#website\"},\"datePublished\":\"2019-08-21T19:29:46+00:00\",\"dateModified\":\"2019-08-21T19:40:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/myoceane.fr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Big Data] \u5efa\u7acb BigData \u5728 Local \u7684\u6e2c\u8a66\u74b0\u5883\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/myoceane.fr\/#website\",\"url\":\"https:\/\/myoceane.fr\/\",\"name\":\"M-Y-Oceane \u60f3\u65b9\u6d89\u6cd5\u3002\u91cf\u74f6\u5916\u7684\u5929\u7a7a\",\"description\":\"\u60f3\u65b9\u6d89\u6cd5, France, Taiwan, Health, Information Technology\",\"publisher\":{\"@id\":\"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/myoceane.fr\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b\",\"name\":\"\u6ab8\u6aac\u7238\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/myoceane.fr\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6cc678684664f8ad45a8d56a6630b183?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6cc678684664f8ad45a8d56a6630b183?s=96&d=mm&r=g\",\"caption\":\"\u6ab8\u6aac\u7238\"},\"logo\":{\"@id\":\"https:\/\/myoceane.fr\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/myoceane.fr\/index.php\/author\/johnny5584767gmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Big Data] \u5efa\u7acb BigData \u5728 Local \u7684\u6e2c\u8a66\u74b0\u5883 - \u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/myoceane.fr\/index.php\/big-data-\u5efa\u7acb-hdfs-\u5728-local-\u6e2c\u8a66\u74b0\u5883\/","og_locale":"en_US","og_type":"article","og_title":"[Big Data] \u5efa\u7acb BigData \u5728 Local \u7684\u6e2c\u8a66\u74b0\u5883 - \u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane","og_description":"\u5728\u958b\u767c Spark \u5927\u6578\u64da\u7a0b\u5f0f\u7684\u6642\u5019\uff0c\u57fa\u672c\u4e0a\u90fd\u6703\u9047\u5230\u6e2c\u8a66\u7684\u9700\u6c42\uff0c\u4f46\u662f\u53ef\u80fd\u7576\u6642\u4e26\u6c92\u6709\u5efa\u7acb\u76f8\u5c0d\u61c9\u7684\u670d\u52d9 Cluster \u4f8b\u5982 Hdfs, Hive, HBase \u7b49\u7b49\u7684\u8cc7\u6599\u5eab\uff0c\u6240\u4ee5\u5728\u958b\u767c\u4e0a\u9762\u6703\u9047\u5230\u5f88\u591a\u56f0\u96e3\uff0c\u5176\u5be6 Hdfs \u9084\u7b97\u662f\u6bd4\u8f03\u597d\u89e3\u6c7a\u7684\uff0c\u4f7f\u7528 FileSystem \u67d0\u7a2e\u7a0b\u5ea6\u4e0a\u9762\u9084\u662f\u53ef\u4ee5\u5229\u7528\u672c\u6a5f\u7684\u78c1\u789f\u6a21\u64ec Hdfs\u6e2c\u8a66\u5176 Java \u7a0b\u5f0f\u8207 Hdfs \u7684\u6e9d\u901a\u60c5\u6cc1\uff0c\u4f46\u662f\u5982\u679c\u9047\u5230\u50cf\u662f Hive, HBase \u7b49\u7b49\u7684\u8cc7\u6599\u5eab\uff0c\u5728\u6c92\u6709\u771f\u6b63\u7fa4\u96c6\u7684\u60c5\u6cc1\u4e4b\u4e0b\u5982\u4f55\u6e2c\u8a66\u81ea\u5df1\u7684\u7a0b\u5f0f\u5c31\u8b8a\u5f97\u975e\u5e38\u9700\u8981\u4e86\uff01\u672c\u7bc7\u8981\u4ecb\u7d39\u7684\u662f\u4e00\u500b\u7b2c\u4e09\u65b9\u51fd\u5f0f\u5eab\u53ef\u4ee5\u5e6b\u52a9\u6211\u5011\u55ae\u5143\u6e2c\u8a66 Java \u7684\u7a0b\u5f0f\uff1a","og_url":"https:\/\/myoceane.fr\/index.php\/big-data-\u5efa\u7acb-hdfs-\u5728-local-\u6e2c\u8a66\u74b0\u5883\/","og_site_name":"\u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane","article_published_time":"2019-08-21T19:29:46+00:00","article_modified_time":"2019-08-21T19:40:11+00:00","author":"\u6ab8\u6aac\u7238","twitter_card":"summary_large_image","twitter_misc":{"Written by":"\u6ab8\u6aac\u7238","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/#article","isPartOf":{"@id":"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/"},"author":{"name":"\u6ab8\u6aac\u7238","@id":"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b"},"headline":"[Big Data] \u5efa\u7acb BigData \u5728 Local \u7684\u6e2c\u8a66\u74b0\u5883","datePublished":"2019-08-21T19:29:46+00:00","dateModified":"2019-08-21T19:40:11+00:00","mainEntityOfPage":{"@id":"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/"},"wordCount":59,"commentCount":1,"publisher":{"@id":"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b"},"articleSection":["Big Data &amp; Machine Learning"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/","url":"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/","name":"[Big Data] \u5efa\u7acb BigData \u5728 Local \u7684\u6e2c\u8a66\u74b0\u5883 - \u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane","isPartOf":{"@id":"https:\/\/myoceane.fr\/#website"},"datePublished":"2019-08-21T19:29:46+00:00","dateModified":"2019-08-21T19:40:11+00:00","breadcrumb":{"@id":"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/myoceane.fr\/index.php\/big-data-%e5%bb%ba%e7%ab%8b-hdfs-%e5%9c%a8-local-%e6%b8%ac%e8%a9%a6%e7%92%b0%e5%a2%83\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/myoceane.fr\/"},{"@type":"ListItem","position":2,"name":"[Big Data] \u5efa\u7acb BigData \u5728 Local \u7684\u6e2c\u8a66\u74b0\u5883"}]},{"@type":"WebSite","@id":"https:\/\/myoceane.fr\/#website","url":"https:\/\/myoceane.fr\/","name":"M-Y-Oceane \u60f3\u65b9\u6d89\u6cd5\u3002\u91cf\u74f6\u5916\u7684\u5929\u7a7a","description":"\u60f3\u65b9\u6d89\u6cd5, France, Taiwan, Health, Information Technology","publisher":{"@id":"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/myoceane.fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b","name":"\u6ab8\u6aac\u7238","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/myoceane.fr\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6cc678684664f8ad45a8d56a6630b183?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6cc678684664f8ad45a8d56a6630b183?s=96&d=mm&r=g","caption":"\u6ab8\u6aac\u7238"},"logo":{"@id":"https:\/\/myoceane.fr\/#\/schema\/person\/image\/"},"url":"https:\/\/myoceane.fr\/index.php\/author\/johnny5584767gmail-com\/"}]}},"amp_enabled":false,"_links":{"self":[{"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/posts\/1588","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/comments?post=1588"}],"version-history":[{"count":53,"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/posts\/1588\/revisions"}],"predecessor-version":[{"id":1642,"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/posts\/1588\/revisions\/1642"}],"wp:attachment":[{"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/media?parent=1588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/categories?post=1588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/tags?post=1588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}