杨一的Blog
yangyi · 共 63 篇文章
Mesa数据模型
Mesa的数据组织单元叫做表. 每张表都有独立的模式信息描述表的组织结构. 主要包括K集合和V集合,即键和值区间 , 其他模型表述还包括聚合函数F,其值集合由集合V聚合得到,即:F : V × V. 聚合函数满足结合律,即 F(F(v0, v1), v2) = F(v0, F(v1, v2). 此外,模式中还包括对于表中K结合的索引. K和V的集合以列和元组的形式表述, 每一列都有固定的取值类型 (比如 int32,int64, string). 模式给每一个单独的V集合列定义一个聚合函数, 这样根据在两个元组之间(两行数据),可以获得公式如下: F((x1, . . . , xk), (y…
2014-08-22 19:04 · 评论(0)
批处理和实时数据的矛盾
Storm绝对是Hadoop的进化。是有生命力的系统。批处理本身的目的就是聚合和关系优化,实时系统和批处理系统的结合方式是两者最大的区别
2014-07-29 16:29 · Big Data · 评论(0)
机器学习常用方法
相似度分析 : 欧式距离(坐标距离) 皮尔逊相关系数 非监督聚合: K-均值聚合(随机选聚合数量值,就近聚合) 分类聚合(两两聚合形成树) 搜索引擎: 爬虫(URL追踪,去环) 分词(最小词串法,统计语言模型法-相近词条件概率计算乘积) 索引/检索(Big Table/Nosql DB) 排序(词频,词距,PageRank,点击率-样本学习,首段出现位置,URL,Meta) 最优化算法: 多变量(不同布局)求低cost 随机大量解选优 爬山调优 模拟退火算法(多变量上下范围调优) 遗传算法(随机起点,精英遴选,变异/杂交) 文本过滤: 简单特征过滤 - 广告标记,大写字符,显著色彩 贝叶斯分…
2014-06-11 23:24 · Machine Learning · 评论(1)
Predicted transactions
When you put something into a dynamic array, it won't grow by just 1 when reaching the limit. This is important because changing size is an expensive operation. For example if I have a job to execute, and the input data just keep coming and coming every now and then. There could be 2 models for thi…
2014-05-03 15:41 · Others · 评论(0)
An enhanced model to deal with large/complex data queries
When talking about Big data, most people think of data in the volume perspective, which is essentially true, but there are also other dimensions such as data variaty and data relationships. Just like other alternative solutions in the internet industry, CURD is the basic operations for data, then w…
2014-05-03 15:23 · Big Data · 评论(0)
关于大数据架构设计-翻译manning新书的要点
Nathan Marz的书还是要看一看的,毕竟那个墙外的网站经受住了美国大选结果出炉的考验 为什么要讨论大数据设计 电子数据已成为每天生活的一部分,不论是网络上,还是科学实验的记录上 数据的增长影响到业务的开展,引发了传统关系型数据库的性能瓶颈,传统的设计管理方式很难扩展到大数据上 为解决大数据带来的问题,不同的软件开发领域以NoSQL的名义引入了很多新的技术,这些新技术可以在某种程度上支撑数据的扩展,但是没有一个一致的设计方式,即需要根据具体的业务和技术架构灵活处理 这些技术的领导者包括:Google,Amazon和开源社区。技术包括:分布式文件系统,分布式计算框架,分布式锁框架,Key-…
2012-11-10 17:10 · Big Data · 评论(0)
profiling java applications with jvisualvm
Open jvisualvm, which is bundled with the standard javase 6 release. It is placed under $JAVA_HOME/bin, implemented with the Netbeans framework. Click on the samples tag. Here we have 2 factors for profiling, CPU and Memory. Click Settings, choose "include only packages" and setup the app packages …
Powerful LDAP client
Here is a brief introduction of the LDAP protocol, which is used extensively in large organizations: http://quark.humbug.org.au/publications/ldap/ldap_tut.html Before integration programs with these LDAP servers, here is a fantastic LDAP testing client named JXPlorer: http://jxplorer.org/downloads/…
2011-06-18 20:58 · Others · 评论(0)
Be careful about the snapshots
We are a global team with around 30 devs that generally focusing on the same product. And we have a mirror site of maven repo maintained using Nexus. The proxy server is placed in the US and when we start checking out the latest code and rebuild, it usually takes the Beijing team a lot of time. The…
2011-06-18 20:00 · Others · 评论(3)
How to install pgsql on Solaris 10
Check out the OS version and architecture, such as: bash-3.00# cat /etc/release Solaris 10 5/08 s10s_u5wos_10 SPARC bash-3.00# isainfo -b 64 Although it's not hard to build code from scratch, it's much easier to download the pre-build version. Say for this SunOS, the URL would be: http://wwwmaster.…
2011-06-18 19:32 · Others · 评论(0)
static import
Static import支持略去类型名的public static字段使用 如: import static java.lang.Math.PI; import static java.lang.Math.pow; 或全部: import static java.lang.Math.*; 例子: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); System.out.println("Considering a circle with …
2011-05-22 10:51 · Java · 评论(0)
JPA的一些知识(Entity)
何为Entity Java EE规范中关于Entity的第一句就是An entity is a lightweight persistence domain object entity应该和E-R图中的E是一个意思就是实体,接下来是“轻量级的持久化domain object”, 啥是domain object? 按维基上的解释就是一个多层的业务系统中持有状态的对象,用来进行层次间数据的传递。其中分离了动作(通常如此)的被称为贫血业务对象(Anemic),该模式被Martin Fowler大叔作为反模式批判。Entity中持久化的状态可以通过持久化属性或字段表示,并用注解进行标记。 如何理解持…
2011-05-21 22:54 · Java · 评论(0)
多线程过桥的问题
题目:有一个南北向的桥,只能容纳一个人,现桥的两边分别有10人和12人,编制一个多线程序让这些人到达对岸,每个人用一个线程表示,桥为共享资源。在过桥的过程中显示谁在过桥及其走向。 import threading import time from collections import deque class Person(threading.Thread): def __init__(self, id, msg): threading.Thread.__init__(self) self.id = id self.msg = msg def run(self): cross(self) de…
2011-05-14 17:50 · Others · 评论(0)
把若干鸡蛋放到篮子里快速取出的方法
有1000个鸡蛋,10个筐,将鸡蛋放入这样10个筐中,给定一个任意数N<1000,问如何放置,能使我们快速的取出相应数目的鸡蛋? r = int(input("Input a number:")) n = 1000 i = 1 s = [] while (i - 1) < n: s.append(i) i <<= 1 rest = n - s.pop() + 1 useRest = False if r >= rest: r = r - rest useRest = True choice = map(lambda x: x & r != 0,s) print("\t".join(str(v…
2011-05-03 20:15 · 评论(0)