1 weekend110的hdfs源码跟踪之打开输入流 + hdfs源码跟踪之打开输入流总结
Posted 大数据和人工智能躺过的坑
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了1 weekend110的hdfs源码跟踪之打开输入流 + hdfs源码跟踪之打开输入流总结相关的知识,希望对你有一定的参考价值。
3种形式的元数据,fsimage是在磁盘上,meta.data是在内存上,
我们继续,前面呢,断点是打在这一行代码处,
FileSystem fs = FileSystem.get(conf);
weekend110的hdfs下载数据源码跟踪铺垫 + hdfs下载数据源码分析-getFileSystem
现在,开始weekend110的hdfs源码跟踪之打开输入流
1、 清掉之前,所有的断点,
dfs是fs的成员,
此刻,断点过不去了,为什么?因为,这需要在服务器上运行。
由此可见,newInfo里面就是block信息。
LocatedBlocks{
fileLength=143588167
underConstruction=false
blocks=[LocatedBlock{BP-168439838-192.168.80.110-1468829197712:blk_1073741856_1032; getBlockSize()=134217728; corrupt=false; offset=0; locs=[192.168.80.110:50010]}, LocatedBlock{BP-168439838-192.168.80.110-1468829197712:blk_1073741857_1033; getBlockSize()=9370439; corrupt=false; offset=134217728; locs=[192.168.80.110:50010]}]
lastLocatedBlock=LocatedBlock{BP-168439838-192.168.80.110-1468829197712:blk_1073741857_1033; getBlockSize()=9370439; corrupt=false; offset=134217728; locs=[192.168.80.110:50010]}
isLastBlockComplete=true}
BP-168439838-192.168.80.110-1468829197712
这是机器集群的信息,
[[email protected] app]$ cd hadoop-2.4.1/
[[email protected] hadoop-2.4.1]$ ll
total 60
drwxr-xr-x. 2 hadoop hadoop 4096 Jul 18 15:48 bin
drwxrwxr-x. 4 hadoop hadoop 4096 Jul 18 20:37 data
drwxr-xr-x. 3 hadoop hadoop 4096 Jun 21 2014 etc
drwxr-xr-x. 2 hadoop hadoop 4096 Jun 21 2014 include
drwxr-xr-x. 3 hadoop hadoop 4096 Jun 21 2014 lib
drwxr-xr-x. 2 hadoop hadoop 4096 Jun 21 2014 libexec
-rw-r--r--. 1 hadoop hadoop 15458 Jun 21 2014 LICENSE.txt
drwxrwxr-x. 3 hadoop hadoop 4096 Jul 22 11:20 logs
-rw-r--r--. 1 hadoop hadoop 101 Jun 21 2014 NOTICE.txt
-rw-r--r--. 1 hadoop hadoop 1366 Jun 21 2014 README.txt
drwxr-xr-x. 2 hadoop hadoop 4096 Jun 21 2014 sbin
drwxr-xr-x. 4 hadoop hadoop 4096 Jun 21 2014 share
[[email protected] hadoop-2.4.1]$ clear
[[email protected] hadoop-2.4.1]$ cd data/
[[email protected] data]$ ll
total 8
drwxrwxr-x. 5 hadoop hadoop 4096 Jul 18 16:15 dfs
drwxr-xr-x. 12 hadoop hadoop 4096 Jul 22 11:20 nm-local-dir
[[email protected] data]$ cd dfs/
[[email protected] dfs]$ ll
total 12
drwx------. 3 hadoop hadoop 4096 Jul 18 23:07 data
drwxrwxr-x. 3 hadoop hadoop 4096 Jul 18 23:06 name
drwxrwxr-x. 3 hadoop hadoop 4096 Jul 18 23:07 namesecondary
[[email protected] dfs]$ cd data/
[[email protected] data]$ ll
total 8
drwxrwxr-x. 3 hadoop hadoop 4096 Jul 18 16:14 current
-rw-rw-r--. 1 hadoop hadoop 16 Jul 22 11:19 in_use.lock
[[email protected] data]$ cd current/
[[email protected] current]$ ll
total 8
drwx------. 4 hadoop hadoop 4096 Jul 22 11:20 BP-168439838-192.168.80.110-1468829197712
-rw-rw-r--. 1 hadoop hadoop 229 Jul 22 11:19 VERSION
[[email protected] current]$ cd BP-168439838-192.168.80.110-1468829197712/
[[email protected] BP-168439838-192.168.80.110-1468829197712]$ ll
total 12
drwxrwxr-x. 4 hadoop hadoop 4096 Jul 18 23:02 current
-rw-rw-r--. 1 hadoop hadoop 0 Jul 22 11:20 dncp_block_verification.log.curr
-rw-rw-r--. 1 hadoop hadoop 348 Jul 22 11:20 dncp_block_verification.log.prev
drwxrwxr-x. 2 hadoop hadoop 4096 Jul 22 11:19 tmp
[[email protected] BP-168439838-192.168.80.110-1468829197712]$ cd current/
[[email protected] current]$ ll
total 16
-rw-rw-r--. 1 hadoop hadoop 23 Jul 18 23:02 dfsUsed
drwxrwxr-x. 2 hadoop hadoop 4096 Jul 20 15:20 finalized
drwxrwxr-x. 2 hadoop hadoop 4096 Jul 20 15:20 rbw
-rw-rw-r--. 1 hadoop hadoop 131 Jul 22 11:19 VERSION
[[email protected] current]$ cd finalized/
[[email protected] finalized]$ ll
total 141340
-rw-rw-r--. 1 hadoop hadoop 134217728 Jul 19 09:59 blk_1073741856
-rw-rw-r--. 1 hadoop hadoop 1048583 Jul 19 09:59 blk_1073741856_1032.meta
-rw-rw-r--. 1 hadoop hadoop 9370439 Jul 19 09:59 blk_1073741857
-rw-rw-r--. 1 hadoop hadoop 73215 Jul 19 09:59 blk_1073741857_1033.meta
-rw-rw-r--. 1 hadoop hadoop 168 Jul 19 13:05 blk_1073741858
-rw-rw-r--. 1 hadoop hadoop 11 Jul 19 13:05 blk_1073741858_1034.meta
-rw-rw-r--. 1 hadoop hadoop 71 Jul 20 15:20 blk_1073741866
-rw-rw-r--. 1 hadoop hadoop 11 Jul 20 15:20 blk_1073741866_1042.meta
[[email protected] finalized]$
以上是weekend110的hdfs源码跟踪之打开输入流
下面,继续,weekend110的hdfs源码跟踪之打开输入流总结
以上是关于1 weekend110的hdfs源码跟踪之打开输入流 + hdfs源码跟踪之打开输入流总结的主要内容,如果未能解决你的问题,请参考以下文章
4 weekend110的hdfs下载数据源码跟踪铺垫 + hdfs下载数据源码分析-getFileSystem(值得反复推敲和打断点源码)
3 weekend110的job提交的逻辑及YARN框架的技术机制 + MR程序的几种提交运行模式
4 weekend110的textinputformat对切片规划的源码分析 + 倒排索引的mr实现 + 多个job在同一个main方法中提交