批量执行hbase shell 命令 major_compact('t_abc')

关于Hbase手动实现Major Compact的办法 本人小菜,如有错误或疏漏之处,请各位大牛批评指正,求共同进步。发表此博文,旨在帮助遇到类似问题的朋友一点小的建议或思路。废话少说,开始吧。。。       最近,因项目需要。Hbase数据量很大,项目组提出需要对Hbase中目前所有表(当前有5个)进行major_compact操作。是按照需要,每天凌晨3点自动执行major_compact操作。             具体实现:     阅读详情

 

?

1

2

3

4

5

6

7

8

9

10

#!/bin/bash

source /etc/profile

exec $HBASE_HOME/bin/hbase shell <<EOF

  truncate 'tracker_total_apk_fact_zyt'

major_compact('t_abc')

disable 't_abc'

drop 't_abc'

create 't_abc', 'info'

 

EOF

以上这篇hbase-shell批量命令执行脚本的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

您可能感兴趣的文章:

HBase shell操作,看这一篇就够了 1.基本操作 1 进入 HBase客户端的命令 hbase shell 2.查看帮助命令 help 3.查看当前数据库有哪些表 list 2.表的基本操作 1.创建表 hbase(main):006:0> create 'student','infor' 2.插入数据到表 hbase(main):008:0> put 'student','1001',... 阅读详情

相关推荐

hbase-shell批量命令执行脚本的方法

批量执行hbase shell 命令 #!/bin/bash source /etc/profile exec $HBASE_HOME/bin/hbase shell <<EOF truncate 'tracker_total_apk_fact_zyt' major_compact('t_abc') disable 't_abc' drop 't_abc' create 't_abc', 'info' EOF 以上这篇hbase-shell批量命令执行脚本的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持软件开发网。

hbase compaction

minor compaction 会真正删除 ttl的内容 major compaction ttl 多余version

longlovefilm的博客 844

FPGA实现PI控制

FPGA实现PI控制

m0_57319166的博客 3898

HBASE手动触发major_compact

定时执行脚本 #!/bin/bash source /etc/profile sh ./hbase shell <<EOF major_compact 'table_name' EOF major_compact 语法: #Compact all regions in a table: hbase> major_compact 't1' #Compact an entire...

刘本龙的专栏 4293

Geneformer实战:如何用Hugging Face Transformers快速搭建单细胞转录组分类模型

本文详细介绍了如何使用Geneformer和Hugging Face Transformers快速搭建单细胞转录组分类模型。通过环境准备、数据预处理、模型加载与配置、训练Pipeline构建等步骤,帮助读者掌握基于Transformer架构的单细胞数据分析技术,提升分类准确率和效率。

rl6adventurer的博客 605

学习STM32的流体水位传感器

引言: 流体水位传感器是一种常用于测量液体水位的设备,广泛应用于水位监测、液位控制和流量计量等领域。STM32是一款功能强大的单片机,具有丰富的外设和灵活的编程能力,非常适合用于流体水位传感器的开发。本文将介绍如何使用STM32开发板与流体水位传感器进行连接和通信,并通过编写代码实现水位的测量和显示。五、总结: 通过以上的代码示例,我们可以实现使用STM32开发板与流体水位传感器进行连接和通信的功能。三、编写代码: 以下是使用STM32CubeIDE编写的示例代码,实现了读取流体水位传感器的功能。

xiaoalla的博客 743

HBase compaction了解和手动触发major_compaction方法

Major Compaction 的作用: 1.将一个Region下的所有StoreFile合并成一个StoreFile文件 2.对于删除、过期、多余版本的数据进行清除 3.提高读写数据的效率 HBase中实现了两种compaction的方式: 1.Minor compaction:只用来做部分文件的合并操作以及包括minVersion=0并且设置ttl的过期版本清理,不做任何删除数据、多版本数据的清理工作。 2.Major compaction:是对Region下的HStore的所有StoreFile执行

c18092694487t的博客 7317

代谢组数据分析(二十六):LC-MS/MS代谢组学和脂质组学数据的分析流程

本教程概述了LC-MS/MS在代谢组学和脂质组学数据分析中的应用流程。首先介绍了样本的采集、提取和LC-MS/MS分析,随后详细阐述了质谱数据的预处理、峰值识别、特征注释,以及数据标准化和统计分析的重要性。特别强调了使用XCMS和CAMERA进行数据对齐和加合物识别,以及利用MultiABLER和LipidFinder进行数据过滤、插补和标准化处理。此外,还介绍了如何应用EigenMS算法进行数据标准化,以及如何使用Limma包进行差异分析。整个流程旨在提高数据质量,确保分析结果的准确性和可靠性,为后续的生

专注生信领域 1960

HBase自动大合并脚本

HBASE有默认的大合并机制。我们可以使用major_compact命令手动合并。 但是如果hbase中的表很多的时候,就该写个脚本了。 说明:只使用了major_compact这个合并命令。 #!/bin/bash time_start=`date "+%Y-%m-%d %H:%M:%S"` echo "开始进行HBase的大合并.时间:${time_start}" str=`echo...

Ancony_的博客 2474

量化交易:如何在QMT中运行Python策略并在VSCode中高效调试?

哈喽,大家好,我是木头左!

木头大左的博客 3761

基于深度学习的商品标签识别系统:UI界面 + YOLOv8/v7/v6/v5代码 + 训练数据集

基于YOLO系列模型的商品标签识别系统能够有效解决商品信息提取的自动化问题。通过合理的数据集准备、模型训练和UI设计,我们可以实现一个功能强大的商品标签识别系统。希望本文提供的内容能够为大家提供有价值的帮助。

YOLO 476

HBase 常用Shell命令

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_34265814的博客 2338

一.镜头知识之焦点,焦距,有效焦距,前焦距,后焦距

由光学系统中镜片的最后一面到像面的距离。

AIoT深度探索者 | 嵌入式系统架构师 深耕物联网(IoT)与人工智能(AI)融合技术,聚焦​​边缘计算、图像开发、低功耗通信协议​​,致力于智能硬件,关注我获取最新技术文章信息与海量资源~ 5591

HBase在split和major compact的一些非通常情况下的触发条件

原 HBase在split和major compact的一些非通常情况下的触发条件 2013年03月10日 17:51:25 杨步涛的博客 阅读数:9914更多 所属专栏: HBase存储 版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.youkuaiyun.com/yangbutao/article/details/8627120 HBase中的major comp...

大JAVA解决方案 739

基于SAGE算法的宽带信道参数估计算法的MATLAB仿真

本文将介绍如何使用MATLAB进行SAGE算法的仿真,以便更好地理解和应用该算法。SAGE算法是一种基于最大期望(Expectation-Maximization)方法的迭代估计算法,用于估计未知的参数。在宽带信道参数估计中,SAGE算法通过迭代优化来估计信道的传输函数。总结起来,本文介绍了如何使用MATLAB进行基于SAGE算法的宽带信道参数提取算法的仿真。通过以上步骤,我们可以得到估计的信道响应,并与真实信道响应进行比较。此外,SAGE算法还可以与其他信道估计算法相结合,以提高估计的准确性和性能。

CodeRoarX的博客 1076

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

hbase major compact脚本

major_compact脚本 注意大合并很消耗资源,启动时要挑选集群闲暇时间 针对hbase1.x 针对hbase2.x

南风知我意 1921

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

HBase学习笔记(四)——HBase的flush、compact机制

在HBase中数据被写入 WAL 和 MemStore 后就可以说数据已经被成功写入到 Hbase 了。MemStore 中的数据达到一定的阈值,会被 Flush 成 HDFS 中的 HFile 文件。但是随着 Flush 次数的不断增多,HFile 的文件数量也会不断增多。从多个 HFile 文件中读取记录,将导致更多的 IOPS,这会使得读取时延不断增大。 Compaction 可以将一些 HFile 文件合并成为较大的 HFile 文件,也可以把所有的 HFile 文件合并成为一个大的 HFi

u011047968的专栏 2401

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

major_compact

一、major_compact的操作目的 (1)合并文件 (2)清除删除、过期、多余版本的数据 (3)提高读写数据的效率   HBase中实现了两种compaction的方式:minor and major. Minor compactions will usually pick up a couple of the smaller adjacent StoreFiles and rew...

mnasd的博客 7980

【博学谷学习记录】超强总结,用心分享 | HBase概述与基本Shell操作

HBase介绍与基本shell操作

Onzswhite的博客 198

HBase Minor Compaction和Major Compaction

背景 HBase在将数据落盘到HDFS上之后,为了解决小文件并提高数据访问效率,定义了两种方式来合并HFile文件。 1. Minor Compaction 控制Minor Compaction的几个参数及说明: 参数名 默认值 描述信息 hbase.hstore.compaction.min 3 表示至少要有三个文件满足minor合并要求时才会启动minor合并 hbase.hstore.compaction.mix 10 表示一次minor合并最多选择10个store file进行合

Chdaring的博客 1398

【leveldb】Compact(二 十 二):Major Compaction-Compaction的封装

在正式开始讲解Major Compaction之前我们需要知道Compact的Compaction数据怎么来的。leveldb将要进行Compact的数据封装成了一个class Compaction类,Compaction的数据结构以及怎么来的及做了些什么事,这是本篇要着重介绍的。 Compaction调用 当调用后台压缩函数DBImpl::BackgroundCompaction()时,根据手动Compact还是自动Compact来产生Compaction。 void DBImpl::Backgroun

蜗牛,为梦想而生。 834

Hbase 线上集群 OutOfMemory 性能优化

Hbase OutOfMenory 性能优化

weixin_39338423的博客 1051
上一篇: hbase优化操作与建议
下一篇: JVM内存结构--新生代及新生代里的两个Survivor区(下一轮S0与S1交换角色,如此循环往复)、常见调优参数
王树民
博客等级 码龄10年 912粉丝 560原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值