上一页 1 2 3 4 5 6 7 8 ··· 16 下一页
摘要: 一、Session Bean 生命周期中可用的Annotation @PreConstruct @PostConstruct @PreDestroy @PrePassive @PostActive @Init @Remove 二、Stateful Session Bean 必须实现接口 三、拦截器 阅读全文
posted @ 2015-09-12 13:52 lihui1625 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 事务ACID: 原子性、一致性、隔离性、持久性一、事务传播属性: 类别未嵌套其他事务已嵌套其他事务其他NEVER无事务抛出异常 NOT_SUPPORTED无事务其他事务挂起,直到本方法结束后,该事务才恢复本类别的方法内部不能增删改本类别不需要事务,故而在查询时性能高。 SUPPORTS无事务加入该事... 阅读全文
posted @ 2015-09-12 12:57 lihui1625 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 原文:http://blog.csdn.net/zythy/article/details/18426347 2个数据集: student. 结构为(classNo,stuNo,score) teacher 结构为(classNo,name) GROUP 执行以下命令: 结果如下: 其中的Paral 阅读全文
posted @ 2015-07-29 18:42 lihui1625 阅读(280) 评论(0) 推荐(0) 编辑
摘要: public class MyDijkstraTest { /** * @param args */ public static int U = 99999999; public static void main(String[] args) { int[][] graph = { { 0, ... 阅读全文
posted @ 2015-07-06 18:16 lihui1625 阅读(111) 评论(0) 推荐(0) 编辑
摘要: package dijkstra;import java.util.ArrayList;import java.util.HashSet;import java.util.List;import java.util.Set;public class Dijkstra { public static ... 阅读全文
posted @ 2015-07-06 15:39 lihui1625 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 1. 一般统计量 均值、方差、最小值、最大值、1%分位数、5%分位数、 10%分位数、25%分位数、 50%分位数、75%分位数、90%分位数、 95%分位数、 99%分位数。 一般要将数据排序后才能求得分位数。 1.1 对每个Model(SEG_A、SEG_B、SEG_C、ALL),计算score 阅读全文
posted @ 2015-07-03 11:08 lihui1625 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 如果有表中有重复键,做表连接后,可能会产生很大的数据表A 有两个重复键a:col1 col2a 1a 2表B 有两个重复键a:col1 col2a 3a 4做内连接:select * from A join B on A.col1 = B.col1, 结果a 1 ... 阅读全文
posted @ 2015-06-09 20:35 lihui1625 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 1. 元数据配置 配置属性 javax.jdo.option.ConnectionURL, javax.jdo.option.ConnectionDriverName 等 2. 集合数据类型 STRUCT: MAP: ARRAY: 3.分割符 \n 分行 \001 分列 \002 分隔ARRAY、S 阅读全文
posted @ 2015-06-03 21:16 lihui1625 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 1. Word Count 例子 inputfile = load 'file' as (line); 内容: {line: bytearray} (Look at the stars, ) (Look how they shine for you, ) (And everything you do 阅读全文
posted @ 2015-06-03 20:38 lihui1625 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Pig: 1. 内连接: join_table = join table1 by col1, join table2 by col2 2. 外连接: 左外连接:join_table = join table1 by col1 left outer, join table2 by col2 其中out 阅读全文
posted @ 2015-06-02 18:11 lihui1625 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 一、Pig 优化 pig 主要瓶颈: (1). 输入数据量大小 (2). shuffle大小,即Map输出的大小 (3). 输出结果大小 (4). 中间结果大小 (5).内存 主要优化策略: 1. 尽早过滤 (filter) ,去除不需要的记录行 2. 尽早映射 (foreach......gene 阅读全文
posted @ 2015-05-31 21:28 lihui1625 阅读(251) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/dmcpxy/article/details/18257065 1.1 配置 编辑$HADOOP_HOME/etc/hadoop/hdsf-site.xml文件,增加如下配置: <property> <name>dfs.access.time.precisi 阅读全文
posted @ 2015-05-21 18:14 lihui1625 阅读(1167) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/dmcpxy/article/details/182570651.1 配置编辑$HADOOP_HOME/etc/hadoop/hdsf-site.xml文件,增加如下配置: dfs.access.time.precision 3600000 The acce... 阅读全文
posted @ 2015-05-21 18:14 lihui1625 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Linux 技巧:让进程在后台可靠运行的几种方法申 毅, 软件工程师, IBM 中国软件开发中心2008 年 5 月 29 日我们经常会碰到这样的问题,用 telnet/ssh 登录了远程的 Linux 服务器,运行了一些耗时较长的任务, 结果却由于网络的不稳定导致任务中途失败。如何让命令提交后不受... 阅读全文
posted @ 2015-05-20 12:20 lihui1625 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Linux 技巧:让进程在后台可靠运行的几种方法 申 毅, 软件工程师, IBM 中国软件开发中心 2008 年 5 月 29 日 我们经常会碰到这样的问题,用 telnet/ssh 登录了远程的 Linux 服务器,运行了一些耗时较长的任务, 结果却由于网络的不稳定导致任务中途失败。如何让命令提交 阅读全文
posted @ 2015-05-20 12:20 lihui1625 阅读(119) 评论(0) 推荐(0) 编辑
摘要: public class Floyed { public final static int UNLIMITED = Integer.MAX_VALUE; public static int[][] caculate(final int[][] linkedMatrix) { ... 阅读全文
posted @ 2015-03-06 15:01 lihui1625 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Warshall算法 :将无权图的连接矩阵转化为联通表。 public class Walshall { public static int[][] caculate(final int[][] linkedMatrix) { int M = linkedMatrix.lengt... 阅读全文
posted @ 2015-03-06 14:01 lihui1625 阅读(106) 评论(0) 推荐(0) 编辑
摘要: public class UnweightedGraph { private final List vertexes = new ArrayList(); private final Map> linkTable = new TreeMap>(); public List get... 阅读全文
posted @ 2015-03-06 13:17 lihui1625 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1、行操作 sedcat txt | sed '2d‘ // 删除第2行cat txt | sed '2,5d’ // 删除第2-5行'cat txt | sed '2,$d‘ // 删除第2到最后1行cat txt | sed '2a hhhhhh... 阅读全文
posted @ 2015-02-19 19:26 lihui1625 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 1、行操作 sed cat txt | sed '2d‘ // 删除第2行 cat txt | sed '2,5d’ // 删除第2-5行' cat txt | sed '2,$d‘ // 删除第2到最后1行 cat txt | sed '2a hhhhhhh' // 第2后加上一行hhhhhhh 阅读全文
posted @ 2015-02-19 19:26 lihui1625 阅读(103) 评论(0) 推荐(0) 编辑
摘要: grep 't[ae]st' myTxt // 查找 tast 或test grep '[^g]oo' myTxt // 查找含有oo,但前面没有g grep '[^a-zA-Z]oo' myTxt // 查找含有oo,但前面没有字母 grep '^the' myTxt // 查找the开头 gre 阅读全文
posted @ 2015-02-19 18:14 lihui1625 阅读(101) 评论(0) 推荐(0) 编辑
摘要: grep 't[ae]st' myTxt // 查找 tast 或testgrep '[^g]oo' myTxt // 查找含有oo,但前面没有ggrep '[^a-zA-Z]oo' myTxt // 查找含有oo,但前面没有字母grep '^the' m... 阅读全文
posted @ 2015-02-19 18:14 lihui1625 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 1、切分提取 cut用":"切分[admin@VA128 ~]$ echo $PATH/opt/phoenix/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/vm... 阅读全文
posted @ 2015-02-19 17:49 lihui1625 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1、切分提取 cut 用":"切分 [admin@VA128 ~]$ echo $PATH /opt/phoenix/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt 阅读全文
posted @ 2015-02-19 17:49 lihui1625 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 1、变量取消 unset [admin@VA128 ~]$ myVar='hahahaha' [admin@VA128 ~]$ echo $myVar hahahaha [admin@VA128 ~]$ unset myVar [admin@VA128 ~]$ echo $myVar 2、单双引号区 阅读全文
posted @ 2015-02-19 17:11 lihui1625 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 1、变量取消 unset[admin@VA128 ~]$ myVar='hahahaha'[admin@VA128 ~]$ echo $myVarhahahaha[admin@VA128 ~]$ unset myVar[admin@VA128 ~]$ echo $myVar2、单双引号区别单引号与双... 阅读全文
posted @ 2015-02-19 17:11 lihui1625 阅读(90) 评论(0) 推荐(0) 编辑
摘要: http://cailin.iteye.com/blog/2014486 ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,它包含一个简单的原语集,分布式应用程序可以基于它实现同步服务,配置维护和命名服务等。Zookeeper是hadoop的一个子项目,其发展历程无需赘述。在分布式 阅读全文
posted @ 2015-01-30 17:21 lihui1625 阅读(147) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/cutesource/article/details/5822459 ZooKeeper的实现机理 ZooKeeper的实现机理是我看过的开源框架中最复杂的,它的解决是分布式环境中的一致性问题,这个场景也决定了其实现的复杂性。看了两三天的源码还是有些摸不着头 阅读全文
posted @ 2015-01-30 17:15 lihui1625 阅读(137) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/java2000_wl/article/details/8694270 获取锁实现思路: 1. 首先创建一个作为锁目录(znode),通常用它来描述锁定的实体,称为:/lock_node 2. 希望获得锁的客户端在锁目录下创建znode,作为锁/lock_n 阅读全文
posted @ 2015-01-30 16:45 lihui1625 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 1、如何快速求得与某个数平方根最接近的整数数学上平方根一般由级数展开求得。但是此处只求其近似整数,用二分查找法,复杂度为Log(N)。2、有一个几个T的大文件,记录了若干价格记录,需要累加计算总价,如何算。现在计算机内存有限。使用Java内存映射文件 java.nio.MappedByteBuffe... 阅读全文
posted @ 2015-01-24 13:36 lihui1625 阅读(144) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 16 下一页