摘要: kafka topic常用命令 创建topic ./bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 #副本数量 --partitions 1 #分区数量 --topic test1 查看所有 阅读全文
posted @ 2020-09-10 11:36 JunCode 阅读(1872) 评论(0) 推荐(0) 编辑
摘要: 在supervisord初体验篇我们已经把supervisord搭建起来了,也了解了一些基本的使用方法 supervisord初体验传送门 下面我们就开始配置一个实际使用的实例程序 supervisord常用配置参数 参数 作用 示例 process_name 程序的名字 testSuperviso 阅读全文
posted @ 2020-09-10 11:27 JunCode 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 这里是写入mysql和oracle的两个例子 from sqlalchemy import create_engine import pandas as pd user="" password="" host="" port="" database="" mysql_engine = create_ 阅读全文
posted @ 2020-09-10 11:21 JunCode 阅读(321) 评论(0) 推荐(0) 编辑
摘要: Supervisor是一个客户端/服务器系统,允许其用户监视和控制类似UNIX的操作系统上的许多进程。 安装 使用pip进行安装 supervisord是python的一个库可以直接用过pip来进行安装 pip install supervisor 手动安装 如果没有pip可以在PyPi上下载sup 阅读全文
posted @ 2020-09-10 11:08 JunCode 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 安装相关的包顺序 pip3 install six pip3 install bit_array pip3 install bitarray==0.8.3 pip3 install thriftpy==0.3.9 pip3 install pure-sasl==0.5.1 pip3 install 阅读全文
posted @ 2020-09-10 11:00 JunCode 阅读(280) 评论(0) 推荐(0) 编辑
摘要: getpass模块 getpass模块使用于隐藏输入信息的模块,一般用于在保护密码输入的时候是使用 使用: #encoding=utf-8 import getpass pwd = getpass.getpass("请输入密码: ") print("密码输入成功!") print("你的密码是:%s 阅读全文
posted @ 2020-09-10 10:55 JunCode 阅读(142) 评论(0) 推荐(0) 编辑
摘要: scala 打包和编译插件 <build> <plugins> <plugin> <groupId>org.scala-tools</groupId> <artifactId>maven-scala-plugin</artifactId> <version>2.15.2</version> <exe 阅读全文
posted @ 2020-09-10 10:40 JunCode 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 使用more_itertools 这里要使用到more_itertools这个包,直接用pip安装就可以了 pip install more_itertools 查看迭代器可迭代的次数 import more_itertools # data是你的迭代器 print(more_itertools.i 阅读全文
posted @ 2020-09-10 10:38 JunCode 阅读(1344) 评论(0) 推荐(0) 编辑
摘要: 需求场景 拆分方法 方法一 df=df.drop('cont', axis=1).join(df['cont'].str.split('/', expand=True).stack().reset_index(level=1, drop=True).rename('tag')) 方法二 df=df[ 阅读全文
posted @ 2020-09-10 10:34 JunCode 阅读(2654) 评论(0) 推荐(0) 编辑
摘要: Hive元数据相关配置 hive的配置 下面是Hive元存储”的存储位置为MySQL数据库,必要的配置。包括连接URL,驱动类,数据库账号以及密码 <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://m 阅读全文
posted @ 2020-09-10 10:24 JunCode 阅读(2605) 评论(0) 推荐(0) 编辑