- 博客(103)
- 资源 (8)
- 收藏
- 关注
原创 hbase flush前提: 等待相关事务都完成
DefaultMemStore: @Override public void rollback(Cell cell) { // If the key is in the snapshot, delete it. We should not update // this.size, because that tracks the size of only the ...
2016-07-04 16:40:38
219
原创 druid
默认端口:coordinator http://localhost:8081overlord http://localhost:8090/console.htmlbroker 8082 (1) druid datasource配置保存7天的数据详见http://druid.io/docs/latest/operations/rule-c...
2015-10-29 12:13:38
355
原创 git
git 回滚:(1)本地回滚git reset --hard 版本号(2)强行回滚到远程服务器:git push -f git diff commit_previous commit > mypatch.diff :最原始的diff信息,对于这里的commit_previous(commit之前一个commit),可以使用“commit^”来表示,这样比较方便,不易出...
2014-10-30 09:38:31
213
原创 hbase的一些语义
hbase里面对一行操作前会加锁。http://hadoop-hbase.blogspot.com/2012/01/hbase-intra-row-transactions.htmlhttps://issues.apache.org/jira/browse/HBASE-3584HBASE-3584的功能是对同一行的Put和Delete可以原子性的完成。 Delete:...
2014-06-04 16:39:43
185
原创 如何高效使用SimpleDateFormat
在我们的业务代码中很多地方会用到SimpleDateFormat,把long型的时间转换成string类型,这里就会用到SimpleDateFormat,而这个类不是线程安全的,所以业务代码中往往如下的方式使用:01/**02 * 将毫秒时间转换为 20120813154028 这种形式03 *04 *...
2014-03-07 16:08:16
250
原创 性能查看
(1) topH 看线程,以及线程id1看各个cpu top -Hp pid (2) pstack pid | less 看线程在做什么 (3) jstack pid | less 根据线程id转换成16进制看 线程栈 通过 printf "%x\n" 30834 首先转化成16进制 jstat -gcutil 28385 1000jstat -...
2014-01-13 20:27:30
119
原创 Unexpected state导致HMaster abort
线上和开发集群都遇到过master abort的情况,而且错误都是Unexpected state导致的FATAL错误2014-01-08 13:44:40,770 FATAL org.apache.hadoop.hbase.master.HMaster: Master server abort: loaded coprocessors are: []2014-01-08 13:44:...
2014-01-09 11:44:36
487
原创 hbase build Too many unapproved licenses
[ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.8:check (default) on project hbase: Too many unapproved licenses: 2856 -> [Help 1] 在target/rat.txt下面寻找哪些文件前面打了问号,去掉这些文件!...
2013-12-30 16:02:29
271
原创 hbase hbck 导致的multi assign
http://hbase.apache.org/book.html#d2907e14182 $ ./bin/hbase hbck -fixAssignments hbck -fixAssignments执行的时候会从regionserver读取online的region,如果有个region正在opening,那么它会不在online列表中,这个时候hbck会再assign这...
2013-12-25 18:03:40
219
原创 HBase Log Split 配置相关
(1)HMaster SplitLogManager // get a list for previously failed RS which need log splitting work // we recover hbase:meta region servers inside master initialization and // handle other...
2013-12-15 16:54:29
216
原创 hbase jmx
conf/hbase-env.sh 里面配了 JMX后就可以用 jconsole远程连到regionserver上面去看进程的metrics。 # Uncomment and adjust to enable JMX exporting# See jmxremote.password and jmxremote.access in $JRE_HOME/lib/management to...
2013-12-11 20:42:19
426
原创 hbase bulk多family,锁住region
HBase在bulk 多family的数据时,会获得整个region的写锁 // we need writeLock for multi-family bulk load startBulkRegionOperation(hasMultipleColumnFamilies(familyPaths)); multi-CF bulk load is not ato...
2013-10-29 15:14:01
174
原创 Too many fetch failures
http://lucene.472066.n3.nabble.com/Reg-Too-many-fetch-failures-Error-td4037975.html http://www.slideshare.net/cloudera/hadoop-troubleshooting-101-kate-ting-cloudera http://lucene...
2013-10-29 10:42:51
214
原创 Phoneix
https://github.com/forcedotcom/phoenix http://www.vogella.com/articles/MySQLJava/article.html HBase shell :create 't1', {NAME => 'f1', VERSIONS => 5}put 't1', "row1", 'f1:1', "aaa...
2013-10-22 11:42:07
216
原创 hbase RowCounter 使用
hbase org.apache.hadoop.hbase.mapreduce.RowCounter tablename cf:cq有同学说这个运行出来的结果不对,结果只有几十,而实际上应该有几百万。差别这么大,原因在哪里?查看代码发现 RowCounter的代码片段 scan.setFilter(new FirstKeyOnlyFilter()); if...
2013-10-15 16:48:47
2088
原创 cdh3集群 distcp 数据到 cdh4集群
从cdh3集群 distcp 数据到 cdh4集群上面详见: http://cloudera.com/content/cloudera-content/cloudera-docs/CDH4/latest/CDH4-Installation-Guide/cdh4ig_topic_7_2.html 注意: (1)要启个mapreduce集群,在cdh4上启动mr (2)hadoop distc...
2013-09-26 21:54:59
192
原创 hbase add table
把table数据从一个集群移动到另外一个集群 (1)把table的目录拷贝过来,放到hbase的root目录下(2)table的region信息写到meta表里面bin/hbase org.jruby.Main bin/add_table.rb /hbase94/t1(3)disable table(4)enable table ...
2013-09-26 21:49:42
387
原创 hbase shell
hbase shell 命令 mvn clean; mvn package -DskipTests=true -Dhadoop.profile=2.0 https://code.google.com/p/powermock/issues/detail?id=504There is a work-around for this issue: run the j...
2013-09-26 11:18:47
136
原创 hive rename table name
hive rename tablenamehive rename的时候,如果table不是外部表,那么table的location会进行修改。 如果table是外部表,那么location不变。 HiveAlterHandler // if this alter is a rename, and u...
2013-09-18 14:28:45
1931
原创 cdh4 vs cdh3 client处理DataNode异常的不同
cdh4在处理pipeline中的错误时,逻辑上与原先不一样。 cdh3在处理pipeline的错误时,假设当前pipeline有3个datanode,如果一个有问题,那么通过移除掉坏的datanode,重新建立只有2个datanode的pipeline,然后接着往这两个节点的pipeline写,直到结束。 cdh4默认处理时不一样,如果当前pipeline有3个datanode,有一...
2013-09-13 21:13:35
219
原创 hive的distribute by如何partition long型的数据
有用户问:hive的distribute by分桶是怎么分的。如果distribute by sellerId , reduce个数设的20,那是按照sellerId mod 20来分桶吗?sellerId 是bigint类型。原先我也以为是这样子的,但是用户提出了疑问:很奇怪,跑出来的结果,有一小部分数据不对。这是sellerId,按照 mod的话,应该在第8分文件,但是却在第0份文件中...
2013-08-20 10:15:54
430
原创 hdfs 升级,cdh3 升级 cdh4
Step 1: 做下saveNamespace操作,停掉集群,并备份下 HDFS 的 Metadata 1.1 让namenode进入safe mode状态 $ bin/hadoop dfsadmin -safemode enter 1.2 执行saveNamespace操作 $ bin/hadoop dfsadmin -saveNamespace 1.3 stop 集群 ...
2013-08-05 18:09:05
277
原创 hbase snapshot
Snapshot: (1) take a snapshot table是在enable状态,那么使用EnabledTableSnapshotHandler table是在disable状态,使用DisabledTableSnapshotHandler,在HMaster端完成所有操作 (2) getCompletedSnapshots 获得已完成的snapshot,正在进行中的被忽略...
2013-06-06 16:40:21
330
原创 hbase split 导致compact abort的日志
2013-06-06 14:58:43,131 INFO org.apache.hadoop.hbase.regionserver.SplitTransaction: Starting split of region TestTable,8WXEKLMO72,1370431726449.974515d502b3876142181e57e3d4a74e.2013-06-06 14:58:43...
2013-06-06 16:37:05
703
1
原创 hive like vs rlike vs regexp
like vs rlike vs regexp rlike == regexp,底层实现一样,使用正则 like 有一些优化,对于查询类型分为五种类型:NONE, // "abc"BEGIN, // "abc%"END, // "%abc"MIDDLE, // "%abc%"COMPLEX, // all other cases, such as "ab%c_de"...
2013-04-11 18:53:16
849
原创 HBase maxIdleTime
HBaseClient端会建立跟HRegionServer或者HMaster的tcp连接,而这个连接在一定时间内没有请求的话,那么这个连接就会被关闭。如果应用请求比较少,加上跨机房的话,tcp连接的建立会比较耗时,导致请求rt稍高,这个时候可以调整tcp连接的存活时间,参数是client端的 this.maxIdleTime = conf.getInt("hbase.ipc.client....
2013-03-29 18:01:59
380
原创 HBase Create Table
基于HBase trunk代码http://svn.apache.org/repos/asf/hbase/trunk,Revision: 1431176 Create table 的过程,Create table时 只有一个region 的assign 过程。 图示 Client ...
2013-01-10 15:50:43
402
原创 facebook hbase版本目前做的一些重要特性,提升性能
(1)每个regionserver多个HLog,提升写。 社区还没有 https://issues.apache.org/jira/browse/HBASE-5699https://issues.apache.org/jira/browse/HBASE-6981http://svn.apache.org/viewvc?view=revision&revision=14123...
2012-11-22 19:36:13
166
原创 Server端处理时间很长,Client发生SocketTimeoutException
Client端只有一个put请求,往server端写数据,server端处理时间过长,导致client端SocketTimeoutException 0.94版本 Client端发生异常SocketTimeoutException: 12/11/20 19:03:18 WARN client.HConnectionManager$HConnectionImplementat...
2012-11-22 11:37:56
1412
原创 RPC HBaseServer
HBaseServer:一个请求发送的数据是:数据的长度(int类型,不包括本身) + call id(int类型) + call的内容 (1)Listener 监听连接请求,来了新的Connection,按照round robin方式选择一个Reader,由这个Reader来读取解析这个Connection上面的call。 Reader 数量由ipc.se...
2012-11-12 20:28:45
106
原创 HDFS HBase NIO相关知识
HDFS的NIO有一些相关的知识偶尔需要注意下:(1) 使用了堆外内存Control direct memory buffer consumption by HBaseClienthttps://issues.apache.org/jira/browse/HBASE-4956 standard hbase client, asynchbase client, netty and...
2012-09-26 18:29:33
262
原创 HBase HDFS 的检验
对于0.94版本来说,有几个地方会发生检验(1)HFile (HRegionServer里面)(2)FSInputChecker (DFSClient里面) DFSClient : 非本地读取,通过DataNode读取,RemoteBlockReaderDisk -> DataNode -> DFSClient(RemoteBlockReader)...
2012-09-24 14:04:11
159
原创 java.net.SocketTimeoutException: 480000 millis timeout hdfs
hdfs集群出现SocketTimeoutException,但是原因不得而知,社区不少issue都提到过,但是就是不懂具体原因。https://issues.apache.org/jira/browse/HDFS-693https://issues.apache.org/jira/browse/HDFS-770https://issues.apache.org/jira/brow...
2012-08-13 16:45:34
1116
原创 HBase如何从Hadoop读取数据,DFSInputStream
HDFS Client的读取流是从DFSInputStream来获得的,外层做了不少包装。从DFSInputStream读取数据有两种方式:(1)seek(long targetPos) + read(byte buf[], int off, int len)(2)read(long position, byte[] buffer, int offset, int length) ...
2012-08-08 15:41:46
725
原创 DFSClient Packet dfs.write.packet.size
HBase 里面调用DFSOutputStream的方法常用的是:write、sync write会往当前Packet里面写数据,sync会强制生成一个Packet。在DFSClient Packet里面每次都会new 一个 big byte array,size 是65557(more than 64K,data+checksum+head),由于sync会强制生成Packet,对于小k...
2012-07-30 20:01:30
229
原创 hbase、hadoop checksum相关
support checksums in HBase block cachehttps://issues.apache.org/jira/browse/HBASE-5074 Store data and checksums together in block filehttps://issues.apache.org/jira/browse/HDFS-2699Skip che...
2012-07-25 21:16:58
346
原创 region split时metascan出现regioninfo为空
最近测试94版本时,出现过多次 HRegionInfo was null or empty in Meta 的异常 WARN org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation: Encountered problems when prefetch META table:java.io.IOE...
2012-07-19 22:30:03
255
原创 hive sql where条件很简单,但是太多
insert overwrite table aaaapartition(pt='20120717')select auction_id,property_id,value_id from xxxx where pt='20120717' and ((property_id = 1626130 and value_id = 46276) or(property...
2012-07-18 15:51:23
1929
1
原创 DFSClient 写一个Block的过程
DFSClient 写一个Block的过程 (1) 上层应用程序往输出流(FSDataOutputStream封装)写数据,底层DFSClient把数据切分成packets(典型的是64K),一个一个packet发送出去。Packet 格式: * (H is head, C is checksum data, D is payload d...
2012-07-12 21:39:37
145
原创 hbase hbck
https://issues.apache.org/jira/browse/HBASE-5128 https://github.com/jmhsieh/hbase-repair-scripts HBASE-5128之前版本的HBCK:检查master、regionserver内存中的状态以及hdfs上面数据的状态之间的一致性 (1)获取所有region的信息(r...
2012-06-14 19:44:07
128
工作流管理:模型、方法和系统
2009-09-01
hdfs官方设计文档(翻译).doc
2009-03-24
MapReduce综述
2008-11-21
flashfxp
2007-11-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人