企业级HBase搭建

企业级HBase搭建

HBase介绍

这部分请参考我的博文:Hadoop数据存储

企业级HBase参数配置

设置linux系统最大进程数和最大文件打开数

使用root用户设置,完成需要重新登录。

vim /etc/security/limits.conf

root    soft   nproc   50000
root    hard   nproc   50000
root    soft   nofile  25535
root    hard   nofile  25535
hadoop    soft   nproc   50000
hadoop    hard   nproc   50000
hadoop    soft   nofile  25535
hadoop    hard   nofile  25535

调整linux内核参数

vim /etc/sysctl.conf

net.ipv4.ip_forward= 0
net.ipv4.conf.default.rp_filter= 1
net.ipv4.conf.default.accept_source_route= 0
kernel.core_users_pid= 1
net.ipv4.tcp_syncookies= 1
net.bridge.bridge-nf-call-ip6tables= 0
net.bridge.bridge-nf-call-iptables= 0
net.bridge.bridge-nf-call-arptables= 0
kernel.mggmnb= 65536
kernel.mggmax= 65536
kernel.shmmax= 68719476736
kernel.shmall= 268435456
net.ipv4.tcp_max_syn_backlog= 65000
net.core.netdev_max_backlog= 32768
net.core.somaxconn= 32768
fs.file-max= 65000
net.core.wmem_default= 8388608
net.core.rmem_default= 8388608
net.core.rmem_max= 16777216
net.core.wmem_max= 16777216
net.ipv4.tcp_timestamps= 1
net.ipv4.tcp_synack_retries= 2
net.ipv4.tcp_syn_retries= 2
net.ipv4.tcp_mem= 94500000 915000000 927000000
net.ipv4.tcp_max_orphans= 3276800
net.ipv4.tcp_tw_reuse= 1
net.ipv4.tcp_tw_recycle= 1
net.ipv4.tcp_keepalive_time= 1200
net.ipv4.tcp_syncookies= 1
net.ipv4.tcp_fin_timeout= 10
net.ipv4.tcp_keepalive_intvl= 15
net.ipv4.tcp_keepalive_probes= 3
net.ipv4.ip_local_port_range= 1024 65535
net.ipv4.conf.eml.send_redirects= 0
net.ipv4.conf
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
什么是ZooKeeper ? ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件。它是一个为分布式应用提供一致性服务的软件,提供的功能包括:配置维护、域名服务、分布式同步、组服务等。 ZooKeeper的目标就是封装好复杂易出错的关键服务,将简单易用的接口和性能高效、功能稳定的系统提供给用户。 Rabbit ZooKeeper Extensions 该项目使用了 Apache ZooKeeper .NET async Client 组件,除提供了基本的zk操作,还额外封装了常用的功能以便让.net开发者更好的使用zookeeper。 提供的功能 session过期重连 永久watcher 递归删除节点 递归创建节点 跨平台(支持.net core) 使用说明 创建连接 IZookeeperClient client = new ZookeeperClient(new ZookeeperClientOptions         {             ConnectionString = "172.18.20.132:2181",             BasePath = "/", //default value             ConnectionTimeout = TimeSpan.FromSeconds(10), //default value             SessionTimeout = TimeSpan.FromSeconds(20), //default value             OperatingTimeout = TimeSpan.FromSeconds(60), //default value             ReadOnly = false, //default value             SessionId = 0, //default value             SessionPasswd = null //default value         }); 创建节点 var data = Encoding.UTF8.GetBytes("2016"); //快速创建临时节点 await client.CreateEphemeralAsync("/year", data); await client.CreateEphemeralAsync("/year", data, ZooDefs.Ids.OPEN_ACL_UNSAFE); //快速创建永久节点 await client.CreatePersistentAsync("/year", data); await client.CreatePersistentAsync("/year", data, ZooDefs.Ids.OPEN_ACL_UNSAFE); //完整调用 await client.CreateAsync("/year", data, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT_SEQUENTIAL); //递归创建 await client.CreateRecursiveAsync("/microsoft/netcore/aspnet", data, CreateMode.PERSISTENT); 获取节点数据 IEnumerable data = await client.GetDataAsync("/year"); Encoding.UTF8.GetString(data.ToArray()); 获取子节点 IEnumerable children= await client.GetChildrenAsync("/microsoft"); 判断节点是否存在 bool exists = await client.ExistsAsync("/year"); 删除节点 await client.DeleteAsync("/year"); //递归删除 bool success = await client.DeleteRecursiveAsync("/microsoft"); 更新数据 Stat stat = await client.SetDataAsync("/year", Encoding.UTF8.GetBytes("2017")); 订阅数据变化 await client.Subscrib

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值