![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
个人分享
scc诚诚
这个作者很懒,什么都没留下…
展开
-
对比比较两个文件(url list)差异脚本
对比比较两个文件(url list)差异脚本extract_prefix.py#!/usr/bin/pythonimport osimport sysmemory_list = []def load(path): if not os.path.exists(path): print "not found %s" % path exit(-1) with open(path, 'r') as f: for line in f:原创 2020-12-18 11:10:28 · 301 阅读 · 0 评论 -
Rabbitmq收发消息示例
rabbitmq收发消息基本功能示例yum install pythonuum install python-pip python -m pip install pika -upgradepip install --upgrade pip确保python环境和pip环境import pikacredentials = pika.PlainCredentials('root', 'Scc123456!')Parameter = pika.ConnectionParameters('10.0.原创 2020-12-16 17:10:04 · 158 阅读 · 0 评论 -
Redis持久化——RDB与AOF区别
Redis是一种高级key-value数据库。它跟memcached类似,不过数据可以持久化,而且支持的数据类型很丰富。有字符串,链表,集 合和有序集合。支持在服务器端计算集合的并,交和补集(difference)等,还支持多种排序功能。所以Redis也可以被看成是一个数据结构服务 器。Redis的所有数据都是保存在内存中,然后不定期的通过异步方式保存到磁盘上(这称为“半持久化模式”);也可以把每一次数据变化都写入到一个append only file(aof)里面(这称为“全持久化模式”)。由于Red原创 2020-12-16 16:31:51 · 109 阅读 · 0 评论 -
HDFS基本操作+权限问题处理
https://www.linuxidc.com/Linux/2012-12/75751.htm默认hdfs路径:/user/操作过程中首次报错DEPRECATED: Use of this script to execute hdfs command is deprecated.Instead use the hdfs command for it.put: in': No such file or directory:hdfs://ambariagent.ksc.com:8020/user.原创 2020-12-16 16:26:15 · 634 阅读 · 0 评论 -
Elasticsearch跨集群数据迁移方案+代码操作
主流的ES迁移有三套方案1、logstash数据同步2、ES dump3、ES snapshot迁移1、logstash数据同步1. 指定索引index全量迁移配置文档:当目标端数据已经存在,无论数据是否变更,均执行更新覆盖,目标数据不存在则新建。input {elasticsearch {hosts => [“120.92.155.44:9200”]index => “map”docinfo => true}}output {elasticsearch {原创 2020-12-16 16:06:58 · 681 阅读 · 0 评论 -
使用logstash传输处理日志输出到ES,再通过Kibana做分析
目前发现网上找到了大部分kibana操作都是旧版本,已不适用于新版本的kibana操作和使用(且发现部分数据处理过程中跟现有部分日志内容脱节)本文重点是传输日志+处理数据+kibana操作(对于ES+kibana搭建以及logstash原理不多做介绍)重点内容传输日志=logstash使用以及基本的操作规范,sincedb_path意义和常见问题。数据处理=logstash导入输出的过程中有2个要点必须明确1、filter grok正则,把数据导入过程中分不同的类,用于kibana数据分类处理原创 2020-12-16 15:53:08 · 1092 阅读 · 0 评论 -
kafka python client收发消息示例
Python 发送消息python有成熟的kafka python clientgithub以及官文都有示例,这边做个简单&快速的总结:1. 首先需要更新pippip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simplepip install kafka-python -i https://pypi.tuna.tsinghua.edu.cn/simplePython代码示例https://help.ali原创 2020-12-16 15:18:54 · 357 阅读 · 0 评论