python
文章平均质量分 90
复杂脑力劳动者
大数据开发、大数据运维
涉猎elk、hdfs、hive、yarn、flink、spark、kafka
展开
-
不会java但是想用flink,会python就够了 !PyFlink【一、进入pyflink的世界】
不会java,只会python的开发不是个好运维原创 2020-06-07 15:25:34 · 5010 阅读 · 6 评论 -
python抽取zabbix历史数据(1、调用zabbix的history.get接口2、直接取zabbix-mysql表,速度更快)
需求:轮训抽取指定hostid上单个监控项或者多个监控项的历史天数的所有数据效果:落地到本地文件中结果如下{"itemid": "28885", "clock": "1585756825", "value": "97.6439", "ns": "271291797"}{"itemid": "28885", "clock": "1585756885", "value": "97.6375", "ns": "354267511"}{"itemid": "28885", "clock": "15857.原创 2020-05-11 00:00:35 · 1614 阅读 · 2 评论 -
python多条件抓去es数据并写入excel(大量数据)
环境:python3.7注意elasticsearch包要跟es环境版本号对应上from elasticsearch import Elasticsearch as esimport xlwtinstance = es(hosts='192.168.21.120')query = { "query": { "bool": { "mu...原创 2019-11-04 22:59:05 · 744 阅读 · 0 评论 -
es python接口批量更新命令
from elasticsearch import Elasticsearch as esinstance = es(hosts='192.168.21.120')query = { "script": { "lang": "painless", "inline": "if(ctx._source.AREA=='上海') {ctx._source.OR...原创 2019-11-04 22:57:52 · 740 阅读 · 0 评论 -
将路径下的压缩文件进行批量解压操作
import shutilimport osimport globclass Ball(object): def __init__(self, source_dir, target_dir): self.source_dir = source_dir self.target_dir = target_dir self.boot_dir...原创 2019-11-04 22:56:56 · 220 阅读 · 0 评论 -
简易轻量级http接口采集器
github下载地址:https://github.com/jingweiz300/http_metricfrom bottle import Bottle,run,route,template,post,requestimport jsonimport osimport logginglogging.basicConfig(filename='http_metric.log', ...原创 2019-11-04 22:55:54 · 446 阅读 · 0 评论