上一页 1 ··· 3 4 5 6 7 8 9 10 下一页

2015年2月26日

Sample SecondarySort 浅析

摘要: 示例文件:100 99 100 98 100 56 100 78 20 100 30 100 20 50 30 50 30 60 20 80 需求:首先按第一个数字分组,组成按第二个数字排序。解决方案: ... 阅读全文

posted @ 2015-02-26 21:23 tneduts 阅读(345) 评论(0) 推荐(0) 编辑

Java zip and unzip demo

摘要: 目录结构如下:import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;import java.nio.file.Path;import ... 阅读全文

posted @ 2015-02-26 08:05 tneduts 阅读(1727) 评论(0) 推荐(0) 编辑

2015年2月25日

Oracle Jdbc demo

摘要: 两种方式:thin是一种瘦客户端的连接方式,即采用这种连接方式不需要安装oracle客户端,只要求classpath中包含jdbc驱动的jar包就行。thin就是纯粹用Java写的ORACLE数据库访问接口。 oci 是一种胖客户端的连接方式,即采用这种连接方式需要安装oracle客户端。oci是O... 阅读全文

posted @ 2015-02-25 08:26 tneduts 阅读(554) 评论(1) 推荐(0) 编辑

2015年2月23日

Sample Join Analysis

摘要: Sample data: student.txt 1,yaoshuya,25 2,yaoxiaohua,29 3,yaoyuanyie,15 4,yaoshupei,26 Sample data:score.txt 1,yuwen,100 1,shuxue,99 2,yuwen,99 2,shuxue,88 ... 阅读全文

posted @ 2015-02-23 16:36 tneduts 阅读(351) 评论(0) 推荐(0) 编辑

Sample MultipleFileWordcount CombineFileInputFormat

摘要: 在旧版本的samples中,使用的是旧的api,mapred下面的MultiFileInputFormat,现在已经过时。现在推荐使用mapreduce下面的CombineInputFormat来处理。应用场景: 如果文件数量大,而且单个文件又比较小,若是使用FileInputFormat进行分片... 阅读全文

posted @ 2015-02-23 09:25 tneduts 阅读(389) 评论(0) 推荐(0) 编辑

2015年2月22日

FileOutputFormat

摘要: TextOutputFormat 默认输出字符串输出格式;SequenceFileOutputFormat 序列化文件输出;MultipleOutputs 可以把输出数据输送到不同的目录;下面我们以分析FileOutputFormat为例,得到一些启迪,来满足我们的某些需要,如修改keyvalue的... 阅读全文

posted @ 2015-02-22 21:30 tneduts 阅读(467) 评论(0) 推荐(0) 编辑

Combine small files to Sequence file

摘要: Combine small files to sequence file or avro files are a good method to feed hadoop. Small files in hadoop will take more namenode memory resource. SequenceFileInputFormat 是一种Key value 格式的文件格式。 Key... 阅读全文

posted @ 2015-02-22 11:05 tneduts 阅读(378) 评论(0) 推荐(0) 编辑

2015年2月21日

FileInputFormat

摘要: MapReduce框架要处理数据的文件类型 FileInputFormat这个类决定。 TextInputFormat是框架默认的文件类型,可以处理Text文件类型,如果你要处理的文件类型不是Text, 譬如说是Xml或DB,你就需要自己实现或用库中已有的类型。 FileInputFormat的主要方法之一getSplits完成的功能是获取job要处理的路径文件所在的block信息。 数据... 阅读全文

posted @ 2015-02-21 20:59 tneduts 阅读(355) 评论(0) 推荐(0) 编辑

Sample: Write And Read data from HDFS with java API

摘要: HDFS: hadoop distributed file system 它抽象了整个集群的存储资源,可以存放大文件。 文件采用分块存储复制的设计。块的默认大小是64M。 流式数据访问,一次写入(现支持append),多次读取。 不适合的方面: 低延迟的数据访问 解决方案:HBASE 大量的小文件 解决方案:combinefileinputformat... 阅读全文

posted @ 2015-02-21 14:10 tneduts 阅读(535) 评论(0) 推荐(0) 编辑

2015年2月19日

Oracle 性能维护一点

摘要: 大数据量表的维护原则 1.如果此表经常CRUD,最好的办法是定期收集统计信息传递给oracle优化器,提高性能。例如dbms_stats.gather_table_stats命令。 可以做在ETL中,定期执行。 2.考虑使用业务常用字段来进行分区,例如时间或地域等。以提高表查询的效率。 视图创建原则 1.绝对禁止在视图的基础上再创建视图,为什么这样会影响性能? ... 阅读全文

posted @ 2015-02-19 10:11 tneduts 阅读(132) 评论(0) 推荐(0) 编辑

DW与DM

摘要: DW组成部分简介 DW的组成部分有:针对数据源的分析、数据的ETL、数据的存储结构,元数据管理等。 数据源分析 主要是分析要抽取哪些数据,如何抽取(全量还是增量)?它的更新周期是怎么样的?它的数据质量如何? 确定数据的格式,数据的域。 ETL ETL之前需要知道以下内容,数据源有哪些系统,各个业务系统的RDBMS是什么?是否存在手工维护的数据? 数据抽取... 阅读全文

posted @ 2015-02-19 09:57 tneduts 阅读(1230) 评论(0) 推荐(0) 编辑

WordCount Analysis

摘要: 1.Create a new java project, then copy examples folder from /home/hadoop/hadoop-1.0.4/src; Create a new folder named src, then Paste to the project to this folder. Error: Could not find or load main... 阅读全文

posted @ 2015-02-19 00:30 tneduts 阅读(355) 评论(0) 推荐(0) 编辑

2015年2月17日

Oracle Stored Procedure demo

摘要: 1.how to find invalid status stored procedure and recompile them?SELECT OBJECT_NAME , status FROM user_objects WHERE OBJECT_TYPE = 'PROCEDURE';Alter p... 阅读全文

posted @ 2015-02-17 12:37 tneduts 阅读(418) 评论(0) 推荐(0) 编辑

2015年2月16日

Linux shell basic3 dd wc comm chmod ls

摘要: Generating files of any size /dev/zerois a character special device, which infinitely returns the zero byte (\0).The above command will create a file ... 阅读全文

posted @ 2015-02-16 12:39 tneduts 阅读(454) 评论(1) 推荐(0) 编辑

2015年2月15日

Linux shell basic2 cat find tr

摘要: Cat stands for concatenate.Case 1.When the text files have more blank lines, we want to remove them.We can use regex \s+ '\n'.cat file.txt | tr \s '\n... 阅读全文

posted @ 2015-02-15 21:34 tneduts 阅读(206) 评论(1) 推荐(0) 编辑

2015年2月14日

Shell basic1

摘要: A shell script is a text file that typically begins with a shebang, as follows: #!/bin/bash /bin/bash is the interpreter command path for Bash. $ sh /home/path/script.sh # Using full path of scri... 阅读全文

posted @ 2015-02-14 11:30 tneduts 阅读(188) 评论(1) 推荐(0) 编辑

2015年2月13日

Storm wordcount Read from file

摘要: source code:package stormdemo;import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.FileNotFoundException;import java.io.FileRead... 阅读全文

posted @ 2015-02-13 09:00 tneduts 阅读(510) 评论(0) 推荐(0) 编辑

2015年2月12日

Java Consumer and Producer demo

摘要: import java.util.Random; import java.util.concurrent.LinkedBlockingQueue; class producer { Random rdm = new Random(); void produce( Lin... 阅读全文

posted @ 2015-02-12 19:01 tneduts 阅读(362) 评论(0) 推荐(0) 编辑

Regarding learning

摘要: when you learn something, just like learn computer language.if you just learn some basic usage, not master the nature. you will be restricted by the l... 阅读全文

posted @ 2015-02-12 07:38 tneduts 阅读(204) 评论(0) 推荐(0) 编辑

2015年2月11日

Design Pattern :Factory and Reflect in java

摘要: interface page { void Render(); } class pageA implements page { @Override public void Render() { System.out.println("I am " + this.getClass().getName()); ... 阅读全文

posted @ 2015-02-11 21:55 tneduts 阅读(135) 评论(0) 推荐(0) 编辑

java server programing

该文被密码保护。 阅读全文

posted @ 2015-02-11 07:56 tneduts 阅读(7) 评论(5) 推荐(0) 编辑

2015年2月7日

Storm calculate pv

摘要: 本题其实就是storm的wordcout,需要把一个gz压缩的文件读取,并使用storm计算其pv. 样本 数据: 存储为accesslog.gz 我把它加载到我的虚拟机中/mnt/下。 没有使用trident,刚学习最基本的。 所以把spout的数目设定为1. 把文件路径存储在config 的map中了,其实是想使用参数进行传递,这样更友好。 读取完之后把它存储到一个文件当中。... 阅读全文

posted @ 2015-02-07 13:36 tneduts 阅读(330) 评论(0) 推荐(0) 编辑

2015年1月27日

Varchar2 size how to decide?

摘要: When you execute a complicate store procedure, maybe it will execute a long time, maybe you want to change some logic,And retry, but when you recreate... 阅读全文

posted @ 2015-01-27 17:18 tneduts 阅读(203) 评论(1) 推荐(0) 编辑

2015年1月26日

Snowflake weakness and type2 fact table

摘要: DimProductDimSubcategoryDimcategoryproductpksubcategorypkcategorypkskusubcategoryNamecategoryNameproductNamecategorypksubcategorypkSnow flake schema ... 阅读全文

posted @ 2015-01-26 12:19 tneduts 阅读(293) 评论(0) 推荐(0) 编辑

2015年1月25日

Storm集群的安装与测试

摘要: 首先安装zookeeper集群,然后安装storm集群。我使用的是centos 32bit的三台虚拟机.MachineNameipnamenode192.168.99.110datanode01192.168.99.111datanode02192.168.99.112首先配置好ssh,可以无密码互... 阅读全文

posted @ 2015-01-25 18:41 tneduts 阅读(614) 评论(0) 推荐(0) 编辑

2015年1月24日

DimDate populate data

摘要: 日期维度 任何一个数据仓库都应该有一个日期维度。 因为很少有不需要通过日期维度看数据的情况存在。 日期维度的好处是,你可以通过他连接各个事实表,然后在报表端传送报表参数的时候, 直接自动过滤日期维度的相关值,而不需要自己写query. 去掉了西班牙语和法语的那些列。 You know that th... 阅读全文

posted @ 2015-01-24 15:47 tneduts 阅读(462) 评论(1) 推荐(0) 编辑

DW Basic Knowledge2

摘要: DW的元数据是指除去数据本身之外的所有信息。围绕DBMS方面的元数据可以描述为表定义,分区设置,索引视图定义,以及DBMS级安全方面的特权与授权等内容。 在任何场合下,ODS要么是一个处在OLTP和DW之间的第三方物理系统,要么是DW的一个专门管理的热区(用于支持实时交互操作,数据查询具有固定的结构... 阅读全文

posted @ 2015-01-24 12:26 tneduts 阅读(207) 评论(0) 推荐(0) 编辑

SSAS-many 2 many one simple sample

摘要: 基本业务:一个事件发生后,影响到多个国家,这个事件也会被定一个事件类型(这里简化为type1,2,3),处理这个事件花费多长时间。我们的事实表就记录这个事情,相对应的我们设计两个维表,一个是国家,一个是事件类型,我们可以从这两个维度slice数据。 因为受影响的国家是多值的,所以一条fact表中的记... 阅读全文

posted @ 2015-01-24 07:42 tneduts 阅读(571) 评论(0) 推荐(0) 编辑

2015年1月22日

DW Basic Knowledge1

摘要: 以下内容,常读常新,每次都有新的感悟和认识。 数据仓库必须使组织机构的信息变得容易存取。 数据仓库的内容需要是容易理解的,数据对业务人员也必定是直观的,明显的。 数据仓库重新组织了原来OLTP数据库的结构,根据业务需求,但又结合数据建模的一些特性。数据仓库必须一致地展示组织机构的信息。 数据仓库中... 阅读全文

posted @ 2015-01-22 21:46 tneduts 阅读(178) 评论(0) 推荐(0) 编辑

Design Tip #142 Building Bridges

摘要: http://www.kimballgroup.com/2012/02/design-tip-142-building-bridges/The dominant topologies of Data Warehouse modelling (Star, Snowflake) are designed... 阅读全文

posted @ 2015-01-22 16:34 tneduts 阅读(180) 评论(0) 推荐(0) 编辑

2015年1月21日

check the element in the array occurs more than half of the array length

摘要: Learn this from stackflow.public class test {public static void main(String[] args) throws IOException{int [] a={1,2,3,4,4,4,5,4,4};int r=GetMajorElem... 阅读全文

posted @ 2015-01-21 15:46 tneduts 阅读(146) 评论(0) 推荐(0) 编辑

2015年1月18日

TC79

摘要: /* INSERT INTO TC79(PatientID,AdmissionDate,DischargeDate,Cost) SELECT * FROM ( SELECT 709,TO_DATE('2011-07-27','YYYY-MM-DD'),TO_DATE('2011-07-31','YYYY-MM-DD'),450 FROM DUAL UNION ALL ... 阅读全文

posted @ 2015-01-18 20:58 tneduts 阅读(361) 评论(0) 推荐(0) 编辑

2015年1月16日

SQL TUNNING

摘要: In a Nested Loops Join, for example, the first accessed table is called the outer table and the second one the inner table. In a Hash Join, the first ... 阅读全文

posted @ 2015-01-16 19:48 tneduts 阅读(213) 评论(0) 推荐(0) 编辑

Oracle PLSQL

摘要: Oracle :show explain planselect * from table(dbms_xplan.display);EXPLAIN PLAN FOR statementsIn fact, in a typical data warehouse environments, a bitma... 阅读全文

posted @ 2015-01-16 10:44 tneduts 阅读(206) 评论(0) 推荐(0) 编辑

2015年1月14日

DB String Split sample

摘要: 以sqlserver为例进行说明,代码稍加修改,可以用于ORACLE。字符串的拆分和聚合是数据库开发人员比较常见的任务。关于字符串的聚合和拆分,sqlserver的标准解决方案是for xml path.oracle 11g提供了listagg函数方便获取。今天就字符串的拆分进行分析。重点在于思路。... 阅读全文

posted @ 2015-01-14 21:22 tneduts 阅读(779) 评论(1) 推荐(0) 编辑

2015年1月5日

dw websites

摘要: http://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/http://www.datamartist.c... 阅读全文

posted @ 2015-01-05 12:29 tneduts 阅读(196) 评论(7) 推荐(0) 编辑

2014年12月11日

Load xlsx in a folder to RDBMS table with Talend

摘要: Step 1 . Use tFileList component to get the file list. And set proper property.Step 2. Use tFileInputExcel to Read Xlsx File. For this, I build a Exc... 阅读全文

posted @ 2014-12-11 17:44 tneduts 阅读(280) 评论(0) 推荐(0) 编辑

Reading WebSites

摘要: oraclehttp://www.eygle.com/archives/2006/02/the_sun_repays_industriously.html蕃茄土豆:https://pomotodo.com/机器学习http://www.52nlp.com/Ruby 学习http://rubylear... 阅读全文

posted @ 2014-12-11 09:00 tneduts 阅读(313) 评论(5) 推荐(0) 编辑

2014年12月10日

SQOOP Load Data from Oracle to Hive Table

摘要: sqoop import -D oraoop.disabled=true \--connect "jdbc:oracle:thin:@(description=(address=(protocol=tcp)(host=HOSTNAME)(port=PORT))(connect_data=(servi... 阅读全文

posted @ 2014-12-10 16:26 tneduts 阅读(1078) 评论(0) 推荐(0) 编辑

2014年12月4日

Csharp--Read Csv file to DataTable

摘要: 在网上找的资料都不怎么好使,许多代码一看就知道根本没有考虑全面。 最后找到一个好用的,在codeproject上,这位老兄写成了一个framework,太重了。http://www.codeproject.com/Articles/9258/A-Fast-CSV-Reader确实挺好用的。 我没耐下... 阅读全文

posted @ 2014-12-04 21:39 tneduts 阅读(1278) 评论(7) 推荐(1) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 下一页

导航