ITeye博客

渴死的火烈鸟

standalone · 共 356 篇文章

ClassFormatError

Exception in thread "main" java.lang.ClassFormatError: poi.HelloWorldApp (unrecognized class file version) at java.lang.VMClassLoader.defineClass(libgcj.so.7rh) at java.lang.ClassLoader.defineClass(libgcj.so.7rh) at java .security.SecureClassLoader.defineClass(libgcj.so.7rh) at java.net.URLClassLoa…

2010-11-02 10:48 · java · 评论(0)

GC信息的格式

[GC [<collector>: <starting occupancy1> -> <ending occupancy1>, <pause time1> secs] <starting occupancy3> -> <ending occupancy3>, <pause time3> secs] <collector> GC为minor收集过程中使用的垃圾收集器起的内部名称. <starting occupancy1> young generation 在进行垃圾收集前被对象使用的存储空间. <ending occupancy1> young generation 在进行垃圾收集后被对象使…

2010-10-28 16:36 · java · 评论(0)

awk code

netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'

2010-10-26 17:53 · linux · 评论(0)

HBase中几个存在thread contention的地方

hbase code 0.26 从thread dump的结果看出来有几个地方是会导致线程BLOCKED。 "Thread-29" tid=38 daemon=false priority=5 state=BLOCKED at org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegionInMeta at org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion at org.apache.hadoop.hba…

2010-10-25 17:10 · java · 评论(0)

Multithreaded Hash Table

Multithreaded Hash Table http://weblogs.java.net/blog/elevy/archive/2007/04/multithreaded_h_1.html

2010-10-21 15:26 · java · 评论(0)

为什么wait()必须要在放synchronized里面?

假如你要调用某个对象的wait()方法,一般都要放在synchronized声明里面,why? 下面是答案。 Suppose d is the object we're using to invoke wait . When a thread invokes d.wait , it must own the intrinsic lock for d — otherwise an error is thrown. Invoking wait inside a synchronized method is a simple way to acquire the intrinsic lock. W…

2010-10-19 11:01 · java · 评论(0)

How to print stack trace in your java code?

When debugging java code, sometimes it's important to know where you come from. So you can print current stack trace to help you. 1. new Exception().printStackTrace(); 2. Thread.currentThread().getStackTrace(); This returns an array of StackTraceElement that represents current stack of your program.

2010-10-15 10:08 · java · 评论(0)

细说HBase怎么完成一个Get操作 (client side)

源码解析基于HBase-0.20.6。 先看HTable类get()方法的code: HTable.java /** * Extracts certain cells from a given row. * @param get The object that specifies what data to fetch and from which row. * @return The data coming from the specified row, if it exists. If the row * specified doesn't exist, the {@link Result…

2010-10-14 14:37 · hbase · cloud · 评论(1)

Hbase read performance with increasing number of client threads

在跑ycsb的时候,发现在做heavy的get操作的时候,ycsb统计的latency很大,100个thread的时候就接近100ms,而从ganglia上看hbase的“get_avg_time"这个metric发现只有20~30左右。最终查看code,发现100个thread共享同一个连接,所有Call的请求数据都走这一个连接,所以在大量请求并发时会造成拥堵,latency变大。具体看下面这个方法: public Writable[] call(Writable[] params, InetSocketAddress[] addresses) throws IOException { i…

2010-10-12 23:19 · hbase · cloud · 评论(0)

介绍overload与override区别的文章

http://hi.baidu.com/trackofyouth/blog/item/cc720f2d050c21e28b1399e0.html

2010-10-12 11:42 · java · 评论(0)

What are some tips for configuring HBase?

Jeff Hammerbacher 8 endorsements 2 votes by Oleksiy Kovyrin and Alex Kamil Much of this content is taken from the HBase Overview [1] and the HBase Default Configuration [2] . System Increase the default per-process file handle limit [3] in /etc/security/limits.conf HDFS Set dfs.datanode.max.xceiver…

2010-10-11 15:42 · hbase · cloud · 评论(0)

Thread dump result of region server

"IPC Server handler 26 on 60020" tid=72 daemon=true priority=5 state=BLOCKED at org.apache.hadoop.hbase.regionserver.HLog.append at org.apache.hadoop.hbase.regionserver.HRegion.put at org.apache.hadoop.hbase.regionserver.HRegion.put at org.apache.hadoop.hbase.regionserver.HRegion.put at org.apache.…

2010-09-29 09:58 · java · 评论(0)

State of a Thread

NEW - A thread that has not yet started is in this state. RUNNABLE - A thread executing in the Java virtual machine is in this state. BLOCKED - A thread that is blocked waiting for a monitor lock is in this state. WAITING - A thread that is waiting indefinitely for another thread to perform a parti…

2010-09-28 14:53 · java · 评论(0)

当hbase的master无法停掉的时候……

some times you will find the master in a hbase cluster cannot be stopped, so check the following two items suggested by some guy in hbase user mail list. But I'm not sure it helps. > If zookeeper is not running (or do not have the quorum) in a cluster setup, hbase does not go down..bring up zookeep…

2010-09-28 11:19 · hbase · cloud · 评论(0)

字符串指针、字符数组的sizeof和strlen结果

int main(){ char *p1="china"; char p2[]="china"; char p3[100]={0}; strcpy(p3, "china"); cout << sizeof(p1) << endl; cout << sizeof(p2) << endl; cout << sizeof(p3) << endl; cout << strlen(p1) << endl; cout << strlen(p2) << endl; cout << strlen(p3) << endl; } 在vc上面的输出结果: 4 6 100 5 5 5 解释:sizeof(p1)是一…

2010-09-27 08:36 · c++ · 评论(0)