当前位置: 首页 > news >正文

ViewFs And Federation On HDFS

序言

ViewFs 是在Federation的基础上提出的,用于通过一个HDFS路径来访问多个NameSpace,同时与ViewFs搭配的技术是client-side mount table(这个就是具体的规则配置信息可以放置在core.xml中,也可以放置在mountTable.xml中). 

总的来说ViewFs的其实就是一个中间层,用于去连接不同的Namenode,然后返还给我们的客户端程序. 所以ViewFs必须要实现HDFS的所有接口,这样才能来做转发管理. 这样就会有一些问题,比如不同的NameNode版本带来的问题,就没法解决cuiyaonan2000@163.com

Federation Of HDFS

只是单纯的搭建联盟其实比较简单.

core.xml

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License. See accompanying LICENSE file.
--><!-- Put site-specific property overrides in this file. --><configuration><property><name>hadoop.tmp.dir</name><value>/soft/hadoop/data_hadoop</value></property><!-- 这里的ip要改成对应的namenode地址 --><property><name>fs.defaultFS</name><value>hdfs://hadoop:9000/</value></property></configuration>

hfds-site.xml

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License. See accompanying LICENSE file.
--><!-- Put site-specific property overrides in this file. --><configuration><property><name>dfs.replication</name><value>2</value></property><property><name>dfs.namenode.name.dir</name><value>file:/soft/hadoop/data_hadoop/datanode</value></property><property><name>dfs.datanode.data.dir</name><value>file:/soft/hadoop/data_hadoop/namenode</value></property><property><name>dfs.permissions</name><value>false</value></property><property><name>dfs.nameservices</name><value>ns1,ns2</value></property><property><name>dfs.namenode.rpc-address.ns1</name><value>hadoop:9000</value></property><property><name>dfs.namenode.http-address.ns1</name><value>hadoop:50070</value></property><property><name>dfs.namenode.secondaryhttp-address.ns1</name><value>hadoop:50090</value></property><property><name>dfs.namenode.rpc-address.ns2</name><value>hadoop1:9000</value></property><property><name>dfs.namenode.http-address.ns2</name><value>hadoop1:50070</value></property><property><name>dfs.namenode.secondaryhttp-address.ns2</name><value>hadoop1:50090</value></property></configuration>

启动

首先就是需要格式化namenode,这个很常规 hdfs namenode -format

关于联盟版本的创建则需要设置联盟的id,所以需要再格式化namenode 的时候指定

hdfs namenode -format -clusterId cui

验证

 

 最主要的就是共用DataNode,即他们的DataNode 信息一样

ViewFs  Of HDFS

http://www.lryc.cn/news/129302.html

相关文章:

  • 每日一学——无线基础知识
  • 【腾讯云 Cloud Studio 实战训练营】在线 IDE 编写 canvas 转换黑白风格头像
  • 【Hystrix技术指南】(7)故障切换的运作流程原理分析(含源码)
  • Springboot 整合MQ实现延时队列入门
  • 前端基础(Vue框架)
  • 【实用插件】ArcGIS for AutoCAD插件分享下载
  • GaussDB数据库SQL系列-子查询
  • Kafka 什么速度那么快
  • 环形链表笔记(自用)
  • js循环中发起请求数据不一致问题
  • 工作流自动化:提升效率、节约成本的重要工具
  • 仿牛客论坛项目day7|Kafka
  • [SpringCloud] 组件性能优化技巧
  • okhttp下载文件 Java下载文件 javaokhttp下载文件 下载文件 java下载 okhttp下载 okhttp
  • Oracle/PL/SQL奇技淫巧之Json转表
  • 每日一学——网络安全
  • python中的lstm:介绍和基本使用方法
  • 【Flink】Flink窗口触发器
  • 深度云化时代,什么样的云网络才是企业的“心头好”?
  • 【快应用】快应用广告学习之激励视频广告
  • 国产化系统中遇到的视频花屏、卡顿以及延迟问题的记录与总结
  • go内存管理机制
  • 【Python】Web学习笔记_flask(5)——会话cookie对象
  • 用友U8+CRM 任意文件上传+读取漏洞复现
  • 【量化课程】08_1.机器学习量化策略基础实战
  • Mongodb 更新集合的方法到底有几种 (中) ?
  • 预演攻击:谁需要网络靶场,何时需要
  • 【Linux】IO多路转接——poll接口
  • 系统架构设计师---OSI七层协议
  • Next.js - Route Groups(路由组)