python spark streaming 从 kafka获取nginx日志,秒级统计url pv,并写入mysql
mysql建库建表>createdatabasenginx;>usenginx>createtableurl_access(idintNOTNULLAUTO_INCREMENTprimarykey,timestampvarchar(256),urlvarchar(256),pvlong);#!/usr/bin/envpython#-*-coding:utf-8-*-#@Time:2019/01/0