- 博客(4)
- 资源 (4)
- 收藏
- 关注
原创 hadoop 2.6 Yarn Service源代码分析
Service有四种状态,用一个枚举来表示。 /** * Service states */ public enum STATE { /** Constructed but not initialized */ NOTINITED(0, "NOTINITED"), /** Initialized but not started or stopped
2016-02-24 15:35:47 764
原创 Singleton的最佳方法
Singleton的最佳方法是使用单元素的枚举类型,这种方法在功能上与公有域方法相近,但是它更加简洁,无偿地提供了序列化机制,绝对防止多次实例化,代码如下: public enum EnumSingleton { INSTANCE; public void getId(){ } }
2016-02-18 18:20:04 354
原创 使用java Reflection机制使单例模式不再只有一个对象的实例
在java的单例模式中,有几个要点。第一,构造方法私有,防止其它应用程序调用构造方法来创建对象;第二,有一个static的对象存放全局性变量,有一个getInstance方法来返回全局性变量,常见代码如下: public class FactoryImpl { private final static AtomicInteger count = new AtomicInteger(0)
2016-02-18 18:04:36 591
原创 java语句顺序有时很重要
我们学习java时,通常被告知,变量定义的顺序不重要,但是以下程序确在jdk 1.7上运行出错。 public class FactoryImpl implements Serializable { private final static FactoryImpl INSTANCE = new FactoryImpl(); private final static Atomic
2016-02-18 17:43:54 7919 1
Hive 性能测试程序,https://github.com/hortonworks/hive-testbench 编译
2023-02-24
The Log-Structured Merge-Tree (LSM-Tree).pdf
2021-06-22
Distributed cycle detection in large-scale sparse graphs.pdf
2020-08-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人