deepin 安装 habse

server/2024/12/23 23:10:47/

deepin 安装 habse

创建软件目录

mkdir -p /home/lhz/opt
cd /home/lhz/opt

下载软件

wget https://dlcdn.apache.org/hbase/2.6.1/hbase-2.6.1-hadoop3-bin.tar.gz

hbase_15">解压 hbase

tar -zxvf hbase-2.6.1-hadoop3-bin.tar.gz

hbase__21">修改 hbase 目录名称

mv hbase-2.6.1-hadoop3 hbase-2

配置环境变量

vim /home/lhz/.bashrc
export HBASE_HOME=/home/lhz/opt/hbase-2
export PATH=$PATH:$HBASE_HOME/bin

完整

export JAVA_HOME=/home/lhz/opt/jdk-8
export M2_HOME=/home/lhz/opt/mavenexport ZOOKEEPER_HOME=/home/lhz/opt/zookeeper-3export HDFS_NAMENODE_USER=lhz
export HDFS_SECONDARYNAMENODE_USER=lhz
export HDFS_DATANODE_USER=lhz
export HDFS_ZKFC_USER=lhz
export HDFS_JOURNALNODE_USER=lhz
export HADOOP_SHELL_EXECNAME=lhzexport YARN_RESOURCEMANAGER_USER=lhz
export YARN_NODEMANAGER_USER=lhzexport HADOOP_HOME=/home/lhz/opt/hadoop-3
export HADOOP_INSTALL=$HADOOP_HOME
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_COMMON_HOME=$HADOOP_HOME
export HADOOP_HDFS_HOME=$HADOOP_HOME
export YARN_HOME=$HADOOP_HOME
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
export JAVA_LIBRARY_PATH=$HADOOP_HOME/lib/nativeexport HBASE_HOME=/home/lhz/opt/hbase-2export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin:$ZOOKEEPER_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$HBASE_HOME/bin

删除帮助文档

rm -rf /home/lhz/opt/hbase-2/docs

修改配置文件

cd /home/lhz/opt/hbase-2/conf
hbase__82">hbase 环境变量
vim hbase-env.sh
export JAVA_HOME=/home/lhz/opt/jdk-8
export HBASE_CLASSPATH=/home/lhz/opt/hadoop-3/etc/hadoop
export HBASE_MANAGES_ZK=false
export HBASE_HEAPSIZE=1G
export HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP=true

如果使用jdk21可以使用如下配置

export JAVA_HOME=/home/lhz/opt/jdk-21
export HBASE_CLASSPATH=/home/lhz/opt/hadoop-3/etc/hadoop
export HBASE_MANAGES_ZK=false
export HBASE_HEAPSIZE=1G
export HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP=true
export HBASE_JSHELL_ARGS="--startup DEFAULT --startup PRINTING --startup hbase_startup.jsh"
hbase__107">hbase 配置文件
vim hbase-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration><!-- mycluster是根据hdfs-site.xml的dfs.nameservices的value进行配置 --><property><name>hbase.rootdir</name><value>hdfs://lihaozhe/hbase</value></property><property><name>hbase.master</name><value>8020</value></property><property><name>hbase.cluster.distributed</name><value>true</value></property><property><name>hbase.zookeeper.quorum</name><value>lihaozhe:2181</value></property><property><name>hbase.unsafe.stream.capability.enforce</name><value>false</value></property>
</configuration>
regionservers
vim regionservers
lihaozhe

hbase_152">启动 hbase

start-hbase.sh 

查看 Java 进程

jps

web ui

http://lihaozhe:16010/

hmaster

hbase_shell_170">hbase shell

基本操作

hbase_shell_174">进入 hbase shell

hbase shell

使用帮助

help

命令

COMMAND GROUPS:Group name: generalCommands: processlist, status, table_help, version, whoamiGroup name: ddlCommands: alter, alter_async, alter_status, clone_table_schema, create, describe, disable, disable_all, drop, drop_all, enable, enable_all, exists, get_table, is_disabled, is_enabled, list, list_regions, locate_region, show_filtersGroup name: namespaceCommands: alter_namespace, create_namespace, describe_namespace, drop_namespace, list_namespace, list_namespace_tablesGroup name: dmlCommands: append, count, delete, deleteall, get, get_counter, get_splits, incr, put, scan, truncate, truncate_preserveGroup name: toolsCommands: assign, balance_switch, balancer, balancer_enabled, catalogjanitor_enabled, catalogjanitor_run, catalogjanitor_switch, cleaner_chore_enabled, cleaner_chore_run, cleaner_chore_switch, clear_block_cache, clear_compaction_queues, clear_deadservers, clear_slowlog_responses, close_region, compact, compact_rs, compaction_state, compaction_switch, decommission_regionservers, flush, flush_master_store, get_balancer_decisions, get_balancer_rejections, get_largelog_responses, get_slowlog_responses, hbck_chore_run, is_in_maintenance_mode, list_deadservers, list_decommissioned_regionservers, list_liveservers, list_unknownservers, major_compact, merge_region, move, normalize, normalizer_enabled, normalizer_switch, recommission_regionserver, regioninfo, rit, snapshot_cleanup_enabled, snapshot_cleanup_switch, split, splitormerge_enabled, splitormerge_switch, stop_master, stop_regionserver, trace, unassign, wal_roll, zk_dumpGroup name: replicationCommands: add_peer, append_peer_exclude_namespaces, append_peer_exclude_tableCFs, append_peer_namespaces, append_peer_tableCFs, disable_peer, disable_table_replication, enable_peer, enable_table_replication, get_peer_config, list_peer_configs, list_peers, list_replicated_tables, remove_peer, remove_peer_exclude_namespaces, remove_peer_exclude_tableCFs, remove_peer_namespaces, remove_peer_tableCFs, set_peer_bandwidth, set_peer_exclude_namespaces, set_peer_exclude_tableCFs, set_peer_namespaces, set_peer_replicate_all, set_peer_serial, set_peer_tableCFs, show_peer_tableCFs, update_peer_configGroup name: snapshotsCommands: clone_snapshot, delete_all_snapshot, delete_snapshot, delete_table_snapshots, list_snapshots, list_table_snapshots, restore_snapshot, snapshotGroup name: configurationCommands: update_all_config, update_config, update_rsgroup_configGroup name: quotasCommands: disable_exceed_throttle_quota, disable_rpc_throttle, enable_exceed_throttle_quota, enable_rpc_throttle, list_quota_snapshots, list_quota_table_sizes, list_quotas, list_snapshot_sizes, set_quotaGroup name: securityCommands: grant, list_security_capabilities, revoke, user_permissionGroup name: proceduresCommands: list_locks, list_proceduresGroup name: visibility labelsCommands: add_labels, clear_auths, get_auths, list_labels, set_auths, set_visibilityGroup name: rsgroupCommands: add_rsgroup, alter_rsgroup_config, balance_rsgroup, get_namespace_rsgroup, get_rsgroup, get_server_rsgroup, get_table_rsgroup, list_rsgroups, move_namespaces_rsgroup, move_servers_namespaces_rsgroup, move_servers_rsgroup, move_servers_tables_rsgroup, move_tables_rsgroup, remove_rsgroup, remove_servers_rsgroup, rename_rsgroup, show_rsgroup_configGroup name: storefiletrackerCommands: change_sft, change_sft_allSHELL USAGE:
Quote all names in HBase Shell such as table and column names.  Commas delimit
command parameters.  Type <RETURN> after entering a command to run it.
Dictionaries of configuration used in the creation and alteration of tables are
Ruby Hashes. They look like this:{'key1' => 'value1', 'key2' => 'value2', ...}and are opened and closed with curley-braces.  Key/values are delimited by the
'=>' character combination.  Usually keys are predefined constants such as
NAME, VERSIONS, COMPRESSION, etc.  Constants do not need to be quoted.  Type
'Object.constants' to see a (messy) list of all constants in the environment.If you are using binary keys or values and need to enter them in the shell, use
double-quote'd hexadecimal representation. For example:hbase> get 't1', "key\x03\x3f\xcd"hbase> get 't1', "key\003\023\011"hbase> put 't1', "test\xef\xff", 'f1:', "\x01\x33\x40"The HBase shell is the (J)Ruby IRB with the above HBase-specific commands added.
For more on the HBase Shell, see http://hbase.apache.org/book.html

查看集群状态

查看版本号

version

查看登录用户

whoami

操作表

查看表空间

list_namespace

创建表空间

create_namespace 'lihaozhe',{"author"=>"lihaozhe", "create_time"=>"2024-11-06 14:30:00"}

描述表空间

describe_namespace 'lihaozhe'

查看某表空间下有哪些表

list_namespace_tables 'lihaozhe'

删除表空间

drop_namespace 'lihaozhe'

指定命名空间创建表

create 'lihaozhe:user', 'info' , 'msg'
create 'lihaozhe:person', {NAME => 'info', VERSIONS => 5} , {NAME => 'msg', VERSIONS => 5}

查看当前存在哪些表

所有表空间

list

描述表

describe 'lihaozhe:person'

验证表是否被禁用

is_disabled 'lihaozhe:user'

禁用表

disable 'lihaozhe:user'

启用表

enable 'lihaozhe:user'

插入数据到表

put 'lihaozhe:person',1001,'info:name','user1001'
put 'lihaozhe:person',1001,'info:gender',1
put 'lihaozhe:person',1001,'msg:slogan','hello world'put 'lihaozhe:person',1002,'info:name','user1002'
put 'lihaozhe:person',1002,'info:gender',0
put 'lihaozhe:person',1002,'msg:slogan','hello'put 'lihaozhe:person',1003,'info:name','user1003'
put 'lihaozhe:person',1003,'info:gender',1
put 'lihaozhe:person',1003,'msg:slogan','hi'

查询

扫描全表中的数据
scan 'lihaozhe:person'
按照指定 RowKey 查询
get 'lihaozhe:person', 1001
查询某 RowKey 下某列簇的值
get 'lihaozhe:person', 1001 , 'info'
查询表中某行+某一列簇+某一列的值
get 'lihaozhe:person', 1001 , 'info:name'

更新指定字段的数据

put 'lihaozhe:person',1001,'info:gender',0

统计数据

count 'lihaozhe:person'

删除数据

删除指定数据
delete 'lihaozhe:person',1001,'msg:slogan'
删除某RowKey下所有数据
deleteall 'lihaozhe:person',1001

清空表

truncate 'lihaozhe:person'

删除表

先禁用再删除不然会报错

disable 'lihaozhe:person'
drop 'lihaozhe:person'

的数据

put 'lihaozhe:person',1001,'info:gender',0

统计数据

count 'lihaozhe:person'

删除数据

删除指定数据
delete 'lihaozhe:person',1001,'msg:slogan'
删除某RowKey下所有数据
deleteall 'lihaozhe:person',1001

清空表

truncate 'lihaozhe:person'

删除表

先禁用再删除不然会报错

disable 'lihaozhe:person'
drop 'lihaozhe:person'

http://www.ppmy.cn/server/152603.html

相关文章

通过Canvas获得视频某一帧

原生js的video标签并没有直接获得某一个时间视频内容的功能&#xff0c;但我们可以结合画布canvas来提取视频内容。这样也能用于获得视频封面等等功能 <template><div><!-- 视频文件上传输入框 --><video ref"videoEle" src"视频链接"…

基于koa服务端脚手架搭建(文件加载器) --【elpis全栈项目笔记】

基于koa服务端脚手架(文件加载器) --【elpis-core】 前言&#xff1a; elpis-core 是一个项目文件加载器。基于一定的约定&#xff0c;将功能不同的代码分类放置到不同的目录下管理。适用于项目代码规范化、减少维护成本、沟通成本&#xff0c;易于扩展。&#xff08;简易版的 …

PHP医院安全(不良)事件管理系统源码,通过运用RCA分析工具,借助柏拉图、鱼骨图等分析工具,分析问题产生的根本原因

医院安全&#xff08;不良&#xff09;事件管理系统采用无责的、自愿的填报不良事件方式&#xff0c;有效地减轻医护人员的思想压力&#xff0c;实现以事件为主要对象&#xff0c;可以自动、及时、实际地反应医院的安全、不良、近失事件的情况&#xff0c;更好地掌握不良事件的…

彭绍亮教授课题组在人工智能图像分析算法用于从肺癌组织病理图像中预测STAS取得重要进展|文献分享·24-12-22

小罗碎碎念 近日&#xff0c;湖南大学信息科学与工程学院彭绍亮教授课题组与中南大学湘雅二医院胸外科、病理科合作&#xff0c;联合在Nature 子刊npj Precision Oncology发表了题为Feature-interactive Siamese graph encoder-based image analysis to predict STAS from his…

使用 Elasticsearch 查询和数据同步的实现方法

在开发过程中&#xff0c;将数据从数据库同步到 Elasticsearch (ES) 是常见的需求之一。本文将重点介绍如何通过 Python 脚本将数据库中的数据插入或更新到 Elasticsearch&#xff0c;并基于多字段的唯一性来判断是否执行插入或更新操作。此外&#xff0c;我们还将深入探讨如何…

【图形渲染】【Unity Shader】【Nvidia CG】有用的参考资料链接

【背景】 学Shader和学其他任何IT技能一样&#xff0c;需要备有合适的查阅资料的池子&#xff0c;本文就将这些池子一站式备齐给到大家。 【Unity Shader相关学习参考文档链接】 Unity Shader官方文档&#xff1a; http://docs.unity3d.com/Manual/SL-Reference.html 官方…

【软件工程】第一章·软件工程概述

&#x1f308; 个人主页&#xff1a;十二月的猫-CSDN博客 &#x1f525; 系列专栏&#xff1a; &#x1f3c0;软件开发必练内功_十二月的猫的博客-CSDN博客 &#x1f4aa;&#x1f3fb; 十二月的寒冬阻挡不了春天的脚步&#xff0c;十二点的黑夜遮蔽不住黎明的曙光 目录 1. 前…

FFmpeg 框架简介和文件解复用

文章目录 ffmpeg框架简介libavformat库libavcodec库libavdevice库 复用&#xff08;muxers&#xff09;和解复用&#xff08;demuxers&#xff09;容器格式FLVScript Tag Data结构&#xff08;脚本类型、帧类型&#xff09;Audio Tag Data结构&#xff08;音频Tag&#xff09;V…