2014年5月21日

Python:本地缓存localcache

摘要: Apache本地缓存文件:基于hashlib缓存1.文件内容如下,localcache.py# -*- coding: utf-8 -*-## Copyright(c) 2010 poweredsites.org## Licensed under the Apache License, Versio... 阅读全文

posted @ 2014-05-21 09:29 云梦山庄 阅读(4404) 评论(0) 推荐(0)

Python:与Redis结合

摘要: 1.service/__init__.pyimport redisfrom service.wredis import RedisWritedServiceclass Service(object): def __init__(self): self.cache = MClient(MC_S... 阅读全文

posted @ 2014-05-21 09:27 云梦山庄 阅读(317) 评论(0) 推荐(0)

Python:定时任务

摘要: #!/usr/bin/env python# -*- coding: utf-8 -*-# Abstract: 定时任务import osimport reimport sysimport loggingimport datetimeimport threading,timesys.path.app... 阅读全文

posted @ 2014-05-21 09:25 云梦山庄 阅读(2058) 评论(0) 推荐(0)

Python:邮件发送

摘要: 1. 封装源码#!/usr/bin/env python# -*- coding: utf-8 -*-# Abstract: send mailimport smtplibfrom email.mime.text import MIMETextfrom email.mime.multipart im... 阅读全文

posted @ 2014-05-21 09:24 云梦山庄 阅读(340) 评论(0) 推荐(0)

Hive:大数据表和小表连接采用mapjoin技巧

摘要: 今天做了一下CTR的数据抽取,在抽取过程中,由于展现表数据量非常大,连接另外一个小表的时候,直接跑崩了。下面是采用mapjoin方式解决了此问题,做个笔记,以便查用:---- 节点总数:50---- section_data_tmp_dresult为大表,共23.3 G---- section_da... 阅读全文

posted @ 2014-05-21 09:15 云梦山庄 阅读(824) 评论(0) 推荐(0)

导航