自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 资源 (4)
  • 收藏
  • 关注

原创 hive group by

group by 操作:1,Map端聚合:Map端进行部分聚合hive.map.aggr用于设定是否在Map端进行聚合,默认hive.map.aggr=true,version:0.10.0另外,hive.groupby.mapaggr.checkinterval=100000用于设定Map端进行聚合的操作条目2,数据倾斜:hive.groupby.skewdata设定是否在数

2013-07-23 21:26:38 4280

原创 hive Sortby/Order by/Cluster By/Distribute By 操作 通过学生-课程关系表熟悉hive语句

首先是数据:student.txt:95001,AA,F,20,CS95002,BB,M,19,IS95003,CC,M,22,MA95004,DD,F,19,IS95005,EE,F,18,MA95006,FF,F,23,CS95007,GG,M,19,MA95008,HH,M,18,CS95009,II,M,18,MA95010,JJ,F,19,CS95011,KK

2013-07-23 20:50:41 4323

原创 strtok()函数

strtok()函数#include#includeint main(){char srcstr[] = "abcde,f";char *p;p = strtok(srcstr,",");if(p) printf("%s\n",p);return 0;}

2013-07-22 21:00:38 1080

原创 gettimeofday(struct timeval *tv, struct timezone *tz)函数

gettimeofday(struct timeval *tv, struct timezone *tz)函数功能:获取当前精确时间(Unix时间)其中:timeval为时间truct timeval{long tv_sec; // 秒数long  tv_usec; // 微秒数}timezone为时区#include#includeint main()

2013-07-19 20:13:48 4655

转载 Redis Sentinel;Redis Sentinel配置;redis集群;redis故障转移

# Redis-Sentinel的官网地址:http://redis.io/topics/sentinel# 注意:Redis-Sentinel官网提供不是稳定版!个人感觉这个比keepalived+redis来切换好非常多。配置环境:OS: CentOS6.1 x86  *  4Software: redis-2.6.9内存: 16GCPU: E5

2013-07-19 19:40:59 21108 3

原创 hive 参数配置

1,hive.exec.parallel参数:功能:同一个sql中的不同的job是否可以同时运行默认为false:

2013-07-17 21:31:02 3560

转载 Redis配置文件redis.conf参数解读

redis.conf配置选项如下daemonize 是否以后台进程运行,默认为nopidfile 如以后台进程运行,则需指定一个pid,默认为/var/run/redis.pidbind 绑定主机IP,默认值为127.0.0.1(注释)port 监听端口,默认为6379timeout 超时时间,默认为300(秒)loglevel 日志记录等级,有4个可选值,debug,ve

2013-07-17 21:14:24 986

转载 条件变量、pthread_cond_init

1.初始化条件变量pthread_cond_init#include int pthread_cond_init(pthread_cond_t *cv,const pthread_condattr_t *cattr);返回值:函数成功返回0;任何其他返回值都表示错误初始化一个条件变量。当参数cattr为空指针时,函数创建的是一个缺省的条件变量。否则条件变量的属性将由cattr中的

2013-07-17 21:12:16 826

原创 hive join explain

数据:1,join2,left outer joinselect * from tb1 left outer join tb2 on tb1.num=tb2.num;hive> select * from tb1 left outer join tb2 on tb1.num=tb2.num > ;Total MapReduce jobs = 1Launchi

2013-07-17 19:44:12 2022

原创 mysql 相关error

1,ERROR 2003 (HY000): Can't connect to MySQL server on '' (111)原因是mysql默认支持从本机登陆,:注释掉bind-address就好了

2013-07-16 20:26:05 954

原创 snprintf函数的使用

函数原型:int snprintf(char *str, size_t size, const char *format, ...);功能:将可变个参数(...)按照format格式化成字符串,然后将其复制到str中(1) 如果格式化后的字符串长度 (2) 如果格式化后的字符串长度 >= size,则只将其中的(size-1)个字符复制到str中,并给其后添加一个字符串结束符('\

2013-07-15 21:45:35 1484

转载 分布式文件系统FastDFS架构剖析

FastDFS是一款类Google FS的开源分布式文件系统,它用纯C语言实现,支持Linux、FreeBSD、AIX等UNIX系统。它只能通过专有API对文件进行存取访问,不支持POSIX接口方式,不能mount使用。准确地讲,Google FS以及FastDFS、mogileFS、HDFS、TFS等类Google FS都不是系统级的分布式文件系统,而是应用级的分布式文件存储服务。Fas

2013-07-15 19:27:34 3208

原创 Jedis Client的使用以及序列化

JedisPool pool = new JedisPool(poolConfig, IP, PORT, timeout);public String set(String key,String value) {       Jedis jedis = null;boolean success = true;try {jedis = this.pool.ge

2013-07-09 20:42:03 5745

原创 hbase shell之创建表的同时创建分区

1,创建表的同时创建分区:create 'tb_splits', {NAME => 'cf', VERSIONS=> 3},{SPLITS => ['a','b','c']}2,这个时候可以http://hadoopmaster:60010/master-status去看看发现这个表有4个regions:在看看怎么split的吧:

2013-07-09 19:57:43 9893 1

原创 hadoop ssh无密码登陆

VM DHCP蛋疼了,这次整个static...scp

2013-07-09 19:48:36 1121

原创 轻量级消息队列服务UCMQ

1,Libevent的安装 wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz tar zxvf libevent-2.0.21-stable.tar.gz  cd libevent-2.0.21-stable ./configure --prefix

2013-07-03 20:18:36 5514

原创 Java NIO框架Netty1简单发送接受

1,Server端:package com.netty1;import org.jboss.netty.bootstrap.ServerBootstrap; import org.jboss.netty.channel.ChannelFactory; import org.jboss.netty.channel.ChannelPipeline; import org

2013-07-02 19:22:14 9523 1

原创 Ubuntu下简单配置Jboss

下载jboss :http://www.jboss.org/jbossas/downloads 解压:unzip jboss-as-distribution-6.0.0.20100429-M3.zip配置path:3,启动:sh  run.sh4,访问:localhost;80805,进入jbossweb.sar:6,修改访问端口

2013-07-01 19:51:56 3234

mysql-connector-java-5.1.6-bin.jar

mysql驱动需要的jar包mysql-connector-java-5.1.6-bin.jar

2013-04-08

飞思卡尔单片机之ATD寄存器详解

做智能车的可以拿去参考参考。。。应该很有用的 freescale xs128

2010-12-19

飞思卡尔智能车单片机资料1

做车的可以拿去参考参考。。。freescale xs128 单片机的资料啊

2010-12-19

计算机二级考试试题.

计算机二级考试试题.很难找的资源。二级C的经典。。。。

2010-06-24

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除