This is set in the dfs.datanode.data.dir property, which defaults to file://${hadoop.tmp.dir}/dfs/data (see details here).

However, in your case, the problem is that you are not using the full path within HDFS. Instead, do:

hadoop fs -ls /usr/local/myhadoop-tmp/

Note that, you also seem to be confusing the path within HDFS to the path in your local file system. Within HDFS, your file is in /usr/local/myhadoop-tmp/. In your local system (and given your configuration setting), it is under /usr/local/myhadoop-tmp/dfs/data/; in there, there's a directory structure and naming convention defined by HDFS, that is independent to whatever path in HDFS you decide to use. Also, it won't have the same name, since it is divided into blocks and each block is assigned a unique ID; the name of a block is something like blk_1073741826.

To conclude: the local path used by the datanode is NOT the same as the paths you use in HDFS. You can go into your local directory looking for files, but you should not do this, since you could mess up the HDFS metadata management. Just use the hadoop command-line tools to copy/move/read files within HDFS, using any logical path (in HDFS) that you wish to use. These paths within HDFS do not need to be tied to the paths you used in for your local datanode storage (there is no reason to or advantage of doing this).

HDFS不存在绝对路径,无法找到文件所在具体位置的更多相关文章

  1. mysql如何查看自己数据库文件所在的位置

    mysql如何查看自己数据库文件所在的位置 C:\Program Files\MySQL\MySQL Server 5.5 mysql数据库 方法/步骤     第1步: 打开mysqml文件夹,显示 ...

  2. eclipse打开本地文件所在目录位置的快捷键

    在开发的过程中总是会遇到需要在本地文件夹找到该本地文件的情况,比如说要发送给同事什么的. 在使用Eclipse的过程中,大多数人都是先在Eclipse目录中定位到文件,然后通过在文件的右键属性中找到文 ...

  3. windows phone 7 定位(获取经纬度),然后找到经纬度所在的位置(城市信息)

    原文:windows phone 7 定位(获取经纬度),然后找到经纬度所在的位置(城市信息) 前几天做项目用到, 代码贴给大家. /// <summary> /// 获取当前位置的经纬度 ...

  4. Idea 设置单击打开文件或者双击打开文件、自动定位文件所在的位置

    以下定位,框架下,打开文件的点击方式,以及点击标签导航页上的已打开文件定位到展开路径,如下图:

  5. IntelliJ Idea设置单击打开文件或者双击打开文件、自动定位文件所在的位置

  6. python 获取当前py文件所在的位置 及对应的文件名称

    # 导入sys整个模块 import sys # 使用sys模块名作为前缀来访问模块中的成员 print(sys.argv[0]) 当前文件名:12.py 程序运行结果: ============== ...

  7. Laravel框架中文件所在的位置

  8. 设置vim的默认工作路径同时与自动设当前编辑的文件所在目录为当前工作路径不冲突

    问题: 想让vim自动设当前编辑的文件所在目录为当前工作路径不冲突,但是当vim新建文件的时候,工作路径会又自动切换缓存path下. 如何使当使用vim打开文件时,vim的工作路径是当前文件所在的路径 ...

  9. JAVA 取得当前目录的路径/Servlet/class/文件路径/web路径/url地址

    在写java程序时不可避免要获取文件的路径...总结一下,遗漏的随时补上 1.可以在servlet的init方法里 String path = getServletContext().getRealP ...

随机推荐

  1. maven把项目打包成jar包后找不到velocity模板的bug

    使用springmvc 开发时候要实现发送velcotiy模板邮件,在配置正常后,在本地测试正常后,使用maven打包成jar包后,报以下错误, Caused by: org.apache.veloc ...

  2. win10 死机

    其实Win10系统还是不错的,如果你的电脑升级Win10后中招经常死机,可以用下面的方案来应对. 1.下载安装支持兼容Win10的软件版本,下载软件之前看一下兼容列表里是否有Win10系统.虽然Win ...

  3. PokeCats开发者日志(十)

      现在是PokeCats游戏开发的第三十三天的中午,收到了中国版权保护中心软件登记部发来的受理通知书.   上易版权看一眼,貌似离拿证不远了.   想一想还有点小激动呢!

  4. 手把手教你写Kafka Streams程序

    本文从以下四个方面手把手教你写Kafka Streams程序: 一. 设置Maven项目 二. 编写第一个Streams应用程序:Pipe 三. 编写第二个Streams应用程序:Line Split ...

  5. vue-cli3配置postcss-cssnext

    1. // npm install autoprefixer --save-dev 此步不需要了,因为postcss-cssnext自带这个依赖 npm install postcss-cssnext ...

  6. keyboard shortcuts & Xcode 10

    keyboard shortcuts & Xcode 10 Xcode Keyboard Shortcuts https://swifteducation.github.io/assets/p ...

  7. java 中使用Base64

    byte[] cipherData = Base64.encodeBase64(plainText.getBytes()); //默认不换行 byte[] cipherData = Base64.en ...

  8. 【bzoj1704】[Usaco2007 Mar]Face The Right Way 自动转身机 贪心

    题目描述 农夫约翰有N(1≤N≤5000)只牛站成一排,有一些很乖的牛朝前站着.但是有些不乖的牛却朝后站着.农夫约翰需要让所有的牛都朝前站着.幸运的是约翰最近买了一个自动转身机.这个神奇的机器能使K( ...

  9. Codeforces Round #524 Div. 2 翻车记

    A:签到.room里有一个用for写的,hack了一发1e8 1,结果用了大概600+ms跑过去了.惨绝人寰. #include<iostream> #include<cstdio& ...

  10. Android 字母导航条实现

    在Activity中进行功能的实现,需要用到第三方jar包:pinyin4j.jar,此jar包用于将汉字转换为汉语拼音. 首先,设置右侧边栏索引列表(A-Z),并且设置列表点击,Touch事件,点击 ...