
设计模式
文章平均质量分 77
iteye_12877
这个作者很懒,什么都没留下…
展开
-
Condition 在多线程协作中应用实例
import java.util.ArrayList;import java.util.List;import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;import java.util.concurrent.locks.Condition;import java.u...2014-01-16 15:47:16 · 176 阅读 · 0 评论 -
Hive Failed to connect to the MetaStore Server 解决方案
1、最近在自学hive。安装hive及使用hive自带数据库可以正常运行。但是呢我想使用mysql作为后台数据库。因此要进行一翻配置。根据网上的文档,配置后,使用命令show databases 时,报错。错误信息是:Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient 再看hive...原创 2013-06-01 15:21:11 · 3160 阅读 · 1 评论 -
单例模式实现
代码如下:public class Singleton { private static Singleton instance = null; public static synchronized Singleton getInstance() { if(instance == null){ instance = new Singleton(); } r...原创 2011-03-08 15:34:53 · 79 阅读 · 0 评论