上一页 1 2 3 4 5 6 ··· 15 下一页
摘要: 参考:从Paxos到Zookeeper分布式一致性原理和实践 使用的zk依赖是cdh5.16.2的3.4.5 <!-- zookeeper --> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</ 阅读全文
posted @ 2020-08-02 23:39 tonglin0325 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 1.CaseFormat CaseFormat是guava中用于字符串格式转换的工具,有以下几种类型 UPPER_CAMEL,比如 UpperCamel UPPER_UNDERSCORE,比如 UPPER_UNDERSCORE LOWER_CAMEL,比如 lowerCamel LOWER_HYPH 阅读全文
posted @ 2020-07-25 22:58 tonglin0325 阅读(379) 评论(0) 推荐(0) 编辑
摘要: 别名是一个指针或者名称,可以对应一个或者多个具体的索引。 别名的创建,这样就给一个名为es的索引添加了一个别名:alias_test lintong@lintongdeMacBook-Pro ~ $ curl -XPUT 'http://master:9200/es/_alias/alias_tes 阅读全文
posted @ 2020-07-20 23:35 tonglin0325 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 1,由cdh安装的kafka的默认存储路径如图所示在/var/local/kafka/data,一般会进行修改 kafka配置参考:apache kafka系列之server.properties配置文件参数说明 路径下文件如下 如果是多个路径的话,使用,进行分隔,比如/data01/kafka/d 阅读全文
posted @ 2020-07-19 16:57 tonglin0325 阅读(952) 评论(0) 推荐(1) 编辑
摘要: 参考:分布式系统协议Paxos、Raft和ZAB Paxos算法是一种提高分布式系统容错率的一致性算法 Paxos 算法的步骤是这样: 1.首先有两种角色,一个是“提议者”,一个是“接受者”。提议者可以向接受者提出提议,然后接受者表达意见。 2.因为存在多个提议者,如果同时表达意见会出现意见不一致的 阅读全文
posted @ 2020-07-18 15:05 tonglin0325 阅读(567) 评论(0) 推荐(0) 编辑
摘要: 1.Master选举 在分布式系统中,需要选举一台机器作为master或者leader。 这时候,可以选择一个跟节点,比如/master,然后多台机器同时像这个节点创建一个子节点/master/lock,利用zookeeper的特性,最终只有一台机器能否创建成功,成功的那台机器就是Master; 其 阅读全文
posted @ 2020-07-12 15:12 tonglin0325 阅读(148) 评论(0) 推荐(0) 编辑
摘要: ZkClient是开源的zk客户端,对Zookeeper原生的java api进行了封装,实现了诸如session超时重连,watcher反复注册等功能。 依赖的话有 <dependency> <groupId>com.101tec</groupId> <artifactId>zkclient</a 阅读全文
posted @ 2020-07-12 00:11 tonglin0325 阅读(651) 评论(0) 推荐(0) 编辑
摘要: 参考:从Paxos到Zookeeper分布式一致性原理和实践 使用的zk依赖是cdh5.16.2的3.4.5 <!-- zookeeper --> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</ 阅读全文
posted @ 2020-07-11 16:11 tonglin0325 阅读(1012) 评论(0) 推荐(0) 编辑
摘要: 参考:从Paxos到Zookeeper分布式一致性原理和实践 使用的zk依赖是cdh5.16.2的3.4.5 <!-- zookeeper --> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</ 阅读全文
posted @ 2020-07-11 14:13 tonglin0325 阅读(723) 评论(0) 推荐(0) 编辑
摘要: 用于将本地特定规则的请求转发到某个ip port代理 mac系统需要编辑~/.$hadow$ocksX-NG/gfwli$t.js中的FindProxyForURL函数 var proxy = "PROXY 127.0.0.1:xxxx; DIRECT;"; var rules = [ "||xxx 阅读全文
posted @ 2020-07-09 23:43 tonglin0325 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 参考:从Paxos到Zookeeper分布式一致性原理和实践 使用的zk依赖是cdh5.16.2的3.4.5 <!-- zookeeper --> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</ 阅读全文
posted @ 2020-07-05 23:50 tonglin0325 阅读(514) 评论(0) 推荐(0) 编辑
摘要: 参考:从Paxos到Zookeeper分布式一致性原理和实践 使用的zk依赖是cdh5.16.2的3.4.5 <!-- zookeeper --> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</ 阅读全文
posted @ 2020-07-05 19:35 tonglin0325 阅读(1539) 评论(0) 推荐(0) 编辑
摘要: 参考:从Paxos到Zookeeper分布式一致性原理和实践 使用的zk依赖是cdh5.16.2的3.4.5 <!-- zookeeper --> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</ 阅读全文
posted @ 2020-07-05 17:11 tonglin0325 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 1.将系统进行root 手机的miui版本需要是开发版,并且进行了root,这样才能获取到卸载系统自带软件的权限 尤其是小爱同学这个语音助手,消耗了过多的系统资源,使得手机变得卡顿,所以建议卸载掉 像通过安全中心进行卸载的方式是不能完全卸载掉的,会随着系统后台再次进行安装,所以只能获取root权限后 阅读全文
posted @ 2020-06-14 13:31 tonglin0325 阅读(4887) 评论(0) 推荐(0) 编辑
摘要: Flink集群部署的方式有以下几种,在本文中主要介绍Flink on yarn: Yarn Mesos Docker/Kubernetes Standalone 参考: https://www.slideshare.net/tillrohrmann/redesigning-apache-flinks 阅读全文
posted @ 2020-06-01 00:18 tonglin0325 阅读(658) 评论(0) 推荐(0) 编辑
摘要: 1.在使用frp进行内网穿透的基础上,在内网机器的frpc.ini配置中添加 [web] type = tcp local_ip = master local_port = 内网端口 remote_port = 外网机器端口 启动 ./frpc -c frpc.ini 2.在内网机器上启动ss-se 阅读全文
posted @ 2020-05-02 16:57 tonglin0325 阅读(1323) 评论(0) 推荐(0) 编辑
摘要: 1.前提:1台有公网ip的服务器(1核1G),1台在内网的服务器(16G) 2.在公网机器上安装frp,并启动frp server 下载并解压 wget https://github.com/fatedier/frp/releases/download/v0.33.0/frp_0.33.0_linu 阅读全文
posted @ 2020-05-01 23:58 tonglin0325 阅读(694) 评论(1) 推荐(0) 编辑
摘要: 如果机器ip变更的话,cdh将无法正常启动,需要修改两个地方的ip地址 1.数据库scm库的HOSTS表,将IP_ADDRESS字段的ip修改成变更后的ip地址 2.修改/etc/cloudera-scm-agent/config.ini中的ip地址 然后进行重启 阅读全文
posted @ 2020-04-11 10:51 tonglin0325 阅读(429) 评论(1) 推荐(0) 编辑
摘要: sqlalchemy是Python的ORM框架 1.安装sqlalchemy 2.安装mysql-connector 阅读全文
posted @ 2020-04-09 15:16 tonglin0325 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Hive hook是hive的钩子函数,可以嵌入HQL执行的过程中运行,比如下面的这几种情况 参考 https://www.slideshare.net/julingks/apache-hive-hooksminwookim130813 有了Hook,可以实现例如非法SQL拦截,SQL收集和审计等功 阅读全文
posted @ 2020-03-21 22:00 tonglin0325 阅读(7739) 评论(0) 推荐(3) 编辑
摘要: Flink的kafka connector文档 https://ci.apache.org/projects/flink/flink-docs-release-1.12/zh/dev/connectors/kafka.html Flink写入kafka时候需要实现序列化和反序列化 部分代码参考了 h 阅读全文
posted @ 2020-03-15 15:23 tonglin0325 阅读(1868) 评论(0) 推荐(0) 编辑
摘要: Flink也和和spark-shell类似的交互式开发模式 bin/start-scala-shell.sh yarn Starting Flink Shell: 20/03/14 14:34:07 INFO configuration.GlobalConfiguration: Loading co 阅读全文
posted @ 2020-03-14 14:52 tonglin0325 阅读(825) 评论(0) 推荐(0) 编辑
摘要: 参考Flink官方example https://github.com/apache/flink/blob/master/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples 阅读全文
posted @ 2020-03-13 15:54 tonglin0325 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 参考Flink官方代码的example https://github.com/apache/flink/blob/master/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examp 阅读全文
posted @ 2020-03-13 15:15 tonglin0325 阅读(1468) 评论(0) 推荐(0) 编辑
摘要: 可以使用CM提供的api查询cdh集群的信息 http://cloudera.github.io/cm_api/ 7.0.3的api文档 https://archive.cloudera.com/cm7/7.0.3/generic/jar/cm_api/apidocs/index.html 查询im 阅读全文
posted @ 2020-03-12 19:38 tonglin0325 阅读(2429) 评论(0) 推荐(0) 编辑
摘要: 1.下载安装文件 https://github.com/docker/kitematic/releases 解压并安装 sudo dpkg -i ./Kitematic-0.17.10_amd64.deb 启动,然后可以启动容器 并可以修改端口映射 如果kitematic的my images无法显示 阅读全文
posted @ 2020-03-11 11:05 tonglin0325 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 本来想cdh集成flink,但是我的cdh版本为5.16.2,参考了下面的issue可能cdh版本太低,至少要cdh6 https://github.com/pkeropen/flink-parcel/issues 进行独立安装 wget https://archive.apache.org/dis 阅读全文
posted @ 2020-03-10 22:16 tonglin0325 阅读(1897) 评论(0) 推荐(0) 编辑
摘要: 1.hive sql提交到yarn上面执行之后,将会成为MR任务执行 正在运行的MR任务的application查看的url,不同类似的任务查看的url可能会不同,比如Spark,Flink等 http://xxxx:8088/cluster/app/application_158225xxxxx_ 阅读全文
posted @ 2020-03-10 15:11 tonglin0325 阅读(1056) 评论(0) 推荐(0) 编辑
摘要: 1.yarn top,查看yarn上面的资源使用情况 2.队列使用状态 queue -status root.xxx_common Queue Information : Queue Name : root.xxx_common State : RUNNING Capacity : 100.0% C 阅读全文
posted @ 2020-03-10 10:15 tonglin0325 阅读(1998) 评论(0) 推荐(0) 编辑
摘要: Shard是什么? 在下面的文档中进行了介绍 https://www.elastic.co/guide/cn/elasticsearch/guide/current/kagillion-shards.html 1.一个分片的底层即为一个 Lucene 索引,会消耗一定文件句柄、内存、以及 CPU 运 阅读全文
posted @ 2020-02-24 15:04 tonglin0325 阅读(4810) 评论(0) 推荐(1) 编辑
摘要: 在最新的mac catalina系统中,已经从karabiner更名为karabiner-elements,安装的版本为Karabiner-Elements-12.9.0 下载地址:https://pqrs.org/osx/karabiner/ 安装后会有两个应用,一个是Karabiner-Elem 阅读全文
posted @ 2020-02-23 11:44 tonglin0325 阅读(2339) 评论(0) 推荐(0) 编辑
摘要: 1.在 ~/.zshrc 中添加 source ~/.bash_profile 参考:https://blog.csdn.net/qq_18505715/article/details/83276208 2.比如mac的git命令补全不生效,可以参考如下文章添加 https://blog.csdn. 阅读全文
posted @ 2020-02-15 22:19 tonglin0325 阅读(1494) 评论(0) 推荐(0) 编辑
摘要: 参考:https://juejin.im/post/5daec26a51882575d50cd0aa 1.查看brew当前源 git -C "$(brew --repo)" remote -v origin https://github.com/Homebrew/brew (fetch) origi 阅读全文
posted @ 2020-02-15 22:15 tonglin0325 阅读(2477) 评论(0) 推荐(0) 编辑
摘要: 参考:https://www.ctolib.com/greymd-tmux-xpanes.html brew install tmux-xpanes 或者 # Install `add-apt-repository` command, if necessary. $ sudo apt install 阅读全文
posted @ 2020-02-15 22:07 tonglin0325 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 项目中有一张表是记录人员,在每个新用户调用接口认证通过了之后,会有一个往该表插入这个新用户信息的操作。 但是在线上环境中,发现该表的自增id不连续,且间隔都是差了2,比如上一个人的id是10,下一个人的id就是12,而在前端页面中,一个用户认证通过后,会调用3个接口,初步排查是MySQL并发操作导致 阅读全文
posted @ 2020-02-01 15:38 tonglin0325 阅读(6667) 评论(0) 推荐(0) 编辑
摘要: 1.git clone git clone git@github.com:DeemOpen/zkui.git 2.打包 mvn clean install 3.复制config.cfg到target目录,并修改zk地址 4.配置 supervisor zkui.conf [program:zkui] 阅读全文
posted @ 2020-01-20 11:21 tonglin0325 阅读(262) 评论(0) 推荐(0) 编辑
摘要: hive是使用antlr来解析的 parser要做的事情,是从无结构的字符串里面,解码产生有结构的数据结构(a parser is a function accepting strings as input and returning some structure as output),参考 Par 阅读全文
posted @ 2020-01-19 11:05 tonglin0325 阅读(5280) 评论(3) 推荐(1) 编辑
摘要: 在索引模板里面,date类型的字段的format支持多种类型,在es中全部会转换成long类型进行存储,参考 一个索引模板范例 阅读全文
posted @ 2019-10-29 11:36 tonglin0325 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 参考 1.下载插件 2.安装 如果遇到 Exception in thread "main" java.lang.IllegalArgumentException: Unknown properties in plugin descriptor: [jvm, site] 解压zip文件,然后修改 p 阅读全文
posted @ 2019-10-27 16:28 tonglin0325 阅读(844) 评论(0) 推荐(0) 编辑
摘要: 场景:两个用户同时读取了数据库中的一条记录,此时用户A对其中一个字段的值进行了修改操作并进行了提交,后来用户B也对这个字段进行了修改,用户B的提交将会覆盖用户A提交的值 关于乐观锁和悲观锁 悲观锁: 每次去取数据,很悲观,都觉得会被别人修改,所以在拿数据的时候都会上锁。 简言之,共享资源每次都只给一 阅读全文
posted @ 2019-10-23 11:00 tonglin0325 阅读(4127) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 ··· 15 下一页