2011 年文章归档
共 10 篇文章
gentoo share net folder (网络共享文件夹)
服务端: 安装samba emerge -av net-fs/samba 配置: cp /etc/samba/smb.conf.default /etc/samba/smb.conf nano /etc/samba/smb.conf 内容: [global] workgroup = MYGROUP server string = Samba Server security = user guest account = user_test1 log file = /var/log/samba/log.%m max log size = 50 dns proxy = no [homes] com…
2011-10-02 17:49 · LINUX
如何使用JVisualVM进行性能分析
地址: https://visualvm.dev.java.net/ 连接 1、本地机器的程序直接可以监听到 2、远程机器的程序需要加上JVM参数 -Dcom.sun.management.jmxremote= true -Dcom.sun.management.jmxremote.port= 9090 -Dcom.sun.management.jmxremote.ssl= false -Dcom.sun.management.jmxremote.authenticate= false 备注:另外需要检查 hostname –i 看解析出来是否为本地的IP,如是127.0.0.1或者IP为多…
2011-09-25 22:32 · JAVA
HBase配置LZO压缩
系统: gentoo HDFS: hadoop:hadoop-0.20.2-cdh3u0 HBase: HBase:0.90.3 安装过程: 1、安装lzo emerge dev-libs/lzo 2.1 下载 download from: wget http://www.apache.org/dist//hbase/hbase-0.90.3/hbase-0.90.3.tar.gz wget http://hadoop-gpl-compression.apache-extras.org.codespot.com/files/hadoop-gpl-compression-0.1.0-rc0.t…
2011-07-10 22:40 · HBase
HBase RegionServer 退出 ( ZooKeeper session expired)
RegionServer 由于 ZooKeeper session expired 而退出,头疼了很久,总结可能的原因: 1、网络不好 2、GC时间过长,程序暂停导致租约过期 3、CPU忙,维护zookeeper的线程不能及时得到执行机会(调度) 解决方案: RS配置zookeeper.session.timeout时间长点,我配置的180000 RS配置hbase.regionserver.restart.on.zk.expire设置为true 参考下源代码 /** * We register ourselves as a watcher on the master address ZNo…
2011-04-23 08:32 · HBase
HBase迁移数据方案1(两个集群不能通信)
前一篇文章里面介绍了 两个可以直接通信的集群之间很容易拷贝数据从而迁移HBase数据。 但是如果两个集群在不同的网络,没法通信呢? 今天测试了一个方案: 把某个表(table1)从集群1迁移到集群2(两个集群互相看不见),步骤如下 1、拷贝集群1的表文件到本地磁盘 : /app/cloud/hadoop/bin/hadoop fs -copyToLocal /hbase/table1 /data0/hbase-backup/table1 2、对于文件操作,很简单吧,随便你怎么去拷贝来拷贝去 3、如果集群2中也有对应的表文件,那么删除掉,然后拷贝 /app/cloud/hadoop/bin/h…
2011-03-30 18:23 · HBase
HBase如何迁移数据
HBase如何迁移数据?这里有个方案: http://blog.mozilla.com/data/2011/02/04/migrating-hbase-in-the-trenches/ ,我还未验证,因为我碰到了更加棘手的问题,我的两个集群在两个局域网,没法通信。(不过可以有一台机双网卡连接两个集群)。 先了解下 /app/cloud/hadoop/bin/hadoop distcp src desc 原文内容: We recently had a situation where we needed to copy a lot of HBase data while migrating fr…
2011-03-10 13:42 · HBase
HBase如何存取多个版本的值
HBase如何存取多个版本的值? 废话少说,一般情况下使用Put的这个方法 保存一个版本: /** * Add the specified column and value to this Put operation. * @param family family name * @param qualifier column qualifier * @param value column value */ public Put add(byte [] family, byte [] qualifier, byte [] value) { return add(family, qualifie…
2011-03-07 16:11 · HBase
Gentoo, Mounting a remote Shared Folder
http://en.gentoo-wiki.com/wiki/Mounting_a_remote_Shared_Folder In order to mount a remote filesystem, you must configure your kernel accordingly. cd /usr/src/linux make menuconfig Linux Kernel Configuration: CIFS File system support File Systems ---> [*] Network File Systems ---> <*> CIFS support (…
2011-02-23 15:04 · LINUX
JDK5中的concurrent包、线程池
concurrent并发包里面几个重要的接口有: Executor、ExecutorService, ScheduledExecutorService ; 重要的实现类有: ScheduledThreadPoolExecutor, ThreadPoolExecutor ; 关于这几个接口和实现类的类图可以参见文档最后的UML图,图中对一些比较重要的属性、方法进行红色标识,可以重点关注; 先来说说 java.util.concurrent.ThreadPoolExecutor ,也就是我们经常说到的线程池,通过该类,应用可以直接拿来使用,只要在初始化时设置不同的参数即可;其主要的参数有以下几个…
2011-02-19 23:43 · JAVA
HBase简介(很好的梳理资料)
一、 简介 history started by chad walters and jim 2006.11 G release paper on BigTable 2007.2 inital HBase prototype created as Hadoop contrib 2007.10 First useable Hbase 2008.1 Hadoop become Apache top-level project and Hbase becomes subproject 2008.10 Hbase 0.18,0.19 released hbase是bigtable的开源山寨版本。是建立…
2011-01-30 10:18 · HBase