

{"id":68,"date":"2016-06-02T13:28:15","date_gmt":"2016-06-02T13:28:15","guid":{"rendered":"http:\/\/data-flair.training\/blogs\/?p=68"},"modified":"2021-08-25T22:34:18","modified_gmt":"2021-08-25T17:04:18","slug":"hdfs-data-write-operation","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/","title":{"rendered":"HDFS Data Write Operation &#8211; Anatomy of file write in Hadoop"},"content":{"rendered":"<p><b>Ever thought how files are written in the world\u2019s most reliable storage?<\/b><\/p>\n<p>After learning the<strong> <a href=\"https:\/\/data-flair.training\/blogs\/hdfs-data-read-operation\/\">HDFS read operation<\/a><\/strong>, let us now see the Hadoop HDFS file write operation. In this article, we will study the HDFS write operations. The article describes the internals of HDFS write and what happens if DataNode fails during file write.<\/p>\n<h3>Introduction to HDFS<\/h3>\n<p>HDFS is the distributed file system in Hadoop for storing huge volumes and variety of data. HDFS follows the master-slave architecture where the NameNode is the master node, and DataNodes are the slave nodes. The files in HDFS are broken into data blocks. The NameNode stores the metadata about the blocks, and DataNodes stores the data blocks.<\/p>\n<p><span style=\"color: #333333\">Explore everything that HDFS offers by\u00a0<a href=\"https:\/\/data-flair.training\/blogs\/hadoop-hdfs-tutorial\/\"><strong>HDFS\u00a0introductory tutorial<\/strong><\/a>.<\/span><\/p>\n<p>Let&#8217;s see how the files are written in Hadoop HDFS.<\/p>\n<h2>HDFS write operation<\/h2>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/HDFS-Data-Write-Operation.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75920\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/HDFS-Data-Write-Operation.jpg\" alt=\"HDFS Write Operation\" width=\"802\" height=\"420\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/HDFS-Data-Write-Operation.jpg 802w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/HDFS-Data-Write-Operation-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/HDFS-Data-Write-Operation-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/HDFS-Data-Write-Operation-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/HDFS-Data-Write-Operation-520x272.jpg 520w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/a><\/p>\n<p>To write data in HDFS, the client first interacts with the <strong>NameNode<\/strong> to get permission to write data and to get IPs of <strong>DataNodes<\/strong> where the client writes the data. The client then directly interacts with the DataNodes for writing data. The DataNode then creates a replica of the data block to other DataNodes in the pipeline based on the replication factor.<\/p>\n<p><strong>DFSOutputStream<\/strong> in HDFS maintains two queues (data queue and ack queue) during the write operation.<\/p>\n<h3>1. The client interacts with HDFS NameNode<\/h3>\n<ul>\n<li>To write a file inside the HDFS, the client first interacts with the NameNode. NameNode first checks for the client privileges to write a file. If the client has sufficient privilege and there is no file existing with the same name, NameNode then creates a record of a new file.<\/li>\n<li>NameNode then provides the address of all DataNodes, where the client can write its data. It also provides a security token to the client, which they need to present to the DataNodes before writing the block.<\/li>\n<li>If the file already exists in the HDFS, then file creation fails, and the client receives an <strong>IO Exception<\/strong>.<\/li>\n<\/ul>\n<h3>2. The client interacts with HDFS DataNode<\/h3>\n<p>After receiving the list of the DataNodes and file write permission, the client starts writing data directly to the first DataNode in the list. As the client finishes writing data to the first DataNode, the DataNode starts making replicas of a block to other DataNodes depending on the replication factor.<\/p>\n<p>If the replication factor is 3, then there will be a minimum of 3 copies of blocks created in different DataNodes, and after creating required replicas, it sends an acknowledgment to the client.<\/p>\n<p>Thus it leads to the creation of a pipeline, and data replication to the desired value, in the cluster.<\/p>\n<h3>Internals of file write in Hadoop HDFS<\/h3>\n<p>Let us understand the HDFS write operation in detail. The following steps will take place while writing a file to the HDFS:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/05\/Data-Write-Mechanism-in-HDFS.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-38\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/05\/Data-Write-Mechanism-in-HDFS.gif\" alt=\"HDFS write operation\" width=\"960\" height=\"541\" \/><\/a><\/p>\n<p><strong>1.<\/strong> The client calls the <strong>create()<\/strong> method on <strong>DistributedFileSystem<\/strong> to create a file.<\/p>\n<p><strong>2.<\/strong> DistributedFileSystem interacts with NameNode through the RPC call to create a new file in the filesystem namespace with no blocks associated with it.<\/p>\n<p><strong>3.<\/strong> The NameNode checks for the client privileges and makes sure that the file doesn&#8217;t already exist. If the client has sufficient privileges and no file with the same name exists, the NameNode makes a record of the new file. Otherwise, the client receives an I\/O exception, and file creation fails. The DistributedFileSystem then returns an FSDataOutputStream for the client where the client starts writing data. <a href=\"https:\/\/hadoop.apache.org\/docs\/r2.7.5\/api\/org\/apache\/hadoop\/fs\/FSDataOutputStream.html\">FSDataOutputstream<\/a>, in turn, wraps a DFSOutputStream, which handles communication with the DataNodes and NameNode.<\/p>\n<p><strong>4.<\/strong> As the client starts writing data, the <strong>DFSOutputStream<\/strong> splits the client&#8217;s data into packets and writes it to an internal queue called the <strong>data<\/strong> <strong>queue<\/strong>. <strong>DataStreamer<\/strong>, which is responsible for telling the NameNode to allocate new blocks by choosing the list of suitable DataNode to store the replicas, uses this data queue.<\/p>\n<p>The list of DataNode forms a pipeline. The number of DataNodes in the pipeline depends on the replication factor.<\/p>\n<p>Suppose the replication factor is 3, so there are three nodes in the pipeline.<\/p>\n<p>The DataStreamer streams the packet to the first DataNode in the pipeline, which stores each packet and forwards it to the second node in the pipeline. Similarly, the second DataNode stores the packet and transfers it to the next node in the pipeline (last node).<\/p>\n<p><em>Finding difficulty ? Just look at this video to understand the <a href=\"https:\/\/www.youtube.com\/watch?v=hwCh4OMjLK0&amp;amp;t=1s\"><strong>HDFS file write operation<\/strong><\/a> easily.<\/em><\/p>\n<p><strong>5.<\/strong> The <strong>DFSOutputStream<\/strong> also maintains another queue of packets, called <strong>ack queue,<\/strong> which is waiting for the acknowledgment from DataNodes.<\/p>\n<p>Packet in the ack queue gets remove only when it receives an acknowledgment from all the DataNodes in the pipeline.<\/p>\n<p><strong>6.<\/strong> The client calls the <strong>close()<\/strong> method on the stream when he\/she finishes writing data. Thus, before communicating the NameNode to signal about the file complete, the client close() method\u2019s action pushes the remaining packets to the DataNode pipeline and waits for the acknowledgment.<\/p>\n<p><strong>7.<\/strong> As the Namenode already knows about the blocks (the file made of), so the NameNode only waits for blocks to be minimally replicated before returning successfully.<\/p>\n<h3>What happens if DataNode fails while writing a file in the HDFS?<\/h3>\n<p>While writing data to the DataNode, if DataNode fails, then the following actions take place, which is transparent to the client writing the data.<\/p>\n<p><strong>1.<\/strong> The pipeline gets closed, packets in the ack queue are then added to the front of the data queue making DataNodes downstream from the failed node to not miss any packet.<\/p>\n<p><strong>2.<\/strong> Then the current block on the alive DataNode gets a new identity. This id is then communicated to the NameNode so that, later on, if the failed DataNode recovers, the partial block on the failed DataNode will be deleted.<\/p>\n<p><strong>3.<\/strong> The failed DataNode gets removed from the pipeline, and a new pipeline gets constructed from the two alive DataNodes. The remaining of the block&#8217;s data is then written to the alive DataNodes, added in the pipeline.<\/p>\n<p><strong>4.<\/strong> The NameNode observes that the block is <strong>under-replicated<\/strong>, and it arranges for creating further copy on another DataNode. Other coming blocks are then treated as normal.<\/p>\n<h3>How to Write a file in HDFS &#8211; Java Program<\/h3>\n<p>A sample code to write a file to HDFS in Java is as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">FileSystem fileSystem = FileSystem.get(conf);\r\n\/\/ Check if the file already exists\r\nPath path = new Path(\"\/path\/to\/file.ext\");\r\nif (fileSystem.exists(path)) {\r\nSystem.out.println(\"File \" + dest + \" already exists\");\r\nreturn;\r\n}\r\n\/\/ Create a new file and write data to it.\r\nFSDataOutputStream out = fileSystem.create(path);\r\nInputStream in = new BufferedInputStream(new FileInputStream(\r\nnew File(source)));\r\nbyte[] b = new byte[1024];\r\nint numBytes = 0;\r\nwhile ((numBytes = in.read(b)) &gt; 0) {\r\nout.write(b, 0, numBytes);\r\n}\r\n\/\/ Close all the file descripters\r\nin.close();\r\nout.close();\r\nfileSystem.close();<\/pre>\n<h2>Summary<\/h2>\n<p>After <span style=\"color: #333333\">reading<\/span> this article, you have a good idea about the HDFS file write operation. From this article, we clearly understand the anatomy of file write in Hadoop.<\/p>\n<p>The article has described the file write in detail along with the explanation of replicas creation during file write. We have also seen what happens if the DataNode fails while writing the file.<\/p>\n<p>Now its time to play with HDFS, follow frequently used <a href=\"https:\/\/data-flair.training\/blogs\/top-hadoop-hdfs-commands-tutorial\/\"><strong>HDFS Command-List<\/strong><\/a>\u00a0tutorial.<\/p>\n<p>Any Doubts? <strong>Ask<\/strong> <strong>DataFlair<\/strong><\/p>\n<p>Keep Executing!!<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:2486,&quot;href&quot;:&quot;https:\\\/\\\/hadoop.apache.org\\\/docs\\\/r2.7.5\\\/api\\\/org\\\/apache\\\/hadoop\\\/fs\\\/FSDataOutputStream.html&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251211072910\\\/https:\\\/\\\/hadoop.apache.org\\\/docs\\\/r2.7.5\\\/api\\\/org\\\/apache\\\/hadoop\\\/fs\\\/FSDataOutputStream.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-12 06:16:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-18 05:42:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-21 08:10:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-28 09:14:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-02 06:43:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-06 11:40:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-14 01:23:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-19 06:53:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-22 10:29:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-27 15:58:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-31 04:14:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-04 03:24:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-08 13:45:23&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-11 13:48:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-16 16:41:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 15:34:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-23 16:22:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-28 06:35:23&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-06 03:38:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-11 05:08:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-17 08:16:59&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-22 10:44:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-26 09:05:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 08:40:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 18:25:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-09 05:32:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-16 02:09:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 07:54:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-24 15:22:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-29 07:10:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-03 20:28:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-08 10:59:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-12 00:48:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-19 04:55:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-25 07:09:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-28 13:27:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-04 19:46:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-07 23:51:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-11 16:40:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-16 02:56:48&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-16 02:56:48&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:2487,&quot;href&quot;:&quot;https:\\\/\\\/www.youtube.com\\\/watch?v=hwCh4OMjLK0\\u0026amp;t=1s&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20230407120749\\\/https:\\\/\\\/www.youtube.com\\\/watch?v=hwCh4OMjLK0&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-11 07:28:47&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2025-12-11 07:28:47&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever thought how files are written in the world\u2019s most reliable storage? After learning the HDFS read operation, let us now see the Hadoop HDFS file write operation. In this article, we will study&#46;&#46;&#46;<\/p>\n","protected":false},"author":7,"featured_media":75920,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[21899,1971,5548,21901,21885,5599,21900,21898],"class_list":["post-68","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hdfs","tag-anatomy-of-file-write-in-hadoop","tag-big-data-training","tag-hdfs","tag-hdfs-data-write-operation","tag-hdfs-read-and-write-operation","tag-hdfs-write-operation","tag-how-to-write-data-from-hadoop","tag-write-operation-in-hdfs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HDFS Data Write Operation - Anatomy of file write in Hadoop - DataFlair<\/title>\n<meta name=\"description\" content=\"what is HDFS data write operation, HDFS write pipeline, file write process in Hadoop, interaction of Client with NameNode&amp;datanode with HDFS video tutorial.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HDFS Data Write Operation - Anatomy of file write in Hadoop - DataFlair\" \/>\n<meta property=\"og:description\" content=\"what is HDFS data write operation, HDFS write pipeline, file write process in Hadoop, interaction of Client with NameNode&amp;datanode with HDFS video tutorial.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-02T13:28:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-25T17:04:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/HDFS-Data-Write-Operation.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HDFS Data Write Operation - Anatomy of file write in Hadoop - DataFlair","description":"what is HDFS data write operation, HDFS write pipeline, file write process in Hadoop, interaction of Client with NameNode&datanode with HDFS video tutorial.","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:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/","og_locale":"en_US","og_type":"article","og_title":"HDFS Data Write Operation - Anatomy of file write in Hadoop - DataFlair","og_description":"what is HDFS data write operation, HDFS write pipeline, file write process in Hadoop, interaction of Client with NameNode&datanode with HDFS video tutorial.","og_url":"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2016-06-02T13:28:15+00:00","article_modified_time":"2021-08-25T17:04:18+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/HDFS-Data-Write-Operation.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd"},"headline":"HDFS Data Write Operation &#8211; Anatomy of file write in Hadoop","datePublished":"2016-06-02T13:28:15+00:00","dateModified":"2021-08-25T17:04:18+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/"},"wordCount":1118,"commentCount":8,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/HDFS-Data-Write-Operation.jpg","keywords":["anatomy of file write in Hadoop","big data training","hdfs","HDFS data write operation","HDFS read and write operation","HDFS Write Operation","how to write data from Hadoop","write operation in HDFS"],"articleSection":["HDFS Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/","url":"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/","name":"HDFS Data Write Operation - Anatomy of file write in Hadoop - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/HDFS-Data-Write-Operation.jpg","datePublished":"2016-06-02T13:28:15+00:00","dateModified":"2021-08-25T17:04:18+00:00","description":"what is HDFS data write operation, HDFS write pipeline, file write process in Hadoop, interaction of Client with NameNode&datanode with HDFS video tutorial.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/HDFS-Data-Write-Operation.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/06\/HDFS-Data-Write-Operation.jpg","width":802,"height":420,"caption":"HDFS Write Operation"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/hdfs-data-write-operation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"HDFS Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/hdfs\/"},{"@type":"ListItem","position":3,"name":"HDFS Data Write Operation &#8211; Anatomy of file write in Hadoop"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team specializes in creating clear, actionable content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Backed by industry expertise, we make learning easy and career-oriented for beginners and pros alike.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam3\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":9,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":75981,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/68\/revisions\/75981"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/75920"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}