拉链表思路图:
使用HiveSQL增量完成拉链表加工思路:
和有趣的人做尽有趣的事
环境准备
1.克隆项目到本地
1 | git clone https://github.com/apache/dolphinscheduler.git |
2.导入项目到IDEA,并切换分支到3.1.0
1 | git checkout 3.1.0-release |
3.编译项目
spotless是一种代码格式化工具,使用 spotless:apply 表示格式化module代码
mvnw同mvn的功能是一样的,mvnw做了项目适配
1 | ./mvnw spotless:apply |
4.在mysql创建database数据库
1 | CREATE SCHEMA dolphinschedulertest; |
找到脚本dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql并运行
5.修改项目配置文件
全局搜索application.yaml
,将文件中涉及postgresql的替换为mysql
1 | # driver-class-name: org.postgresql.Driver |
6.修改dolphinscheduler-bom下pom.xml
1 | <dependency> |
7.修改logback-spring.xml
全局搜索logback-spring.xml,将下面内容添加到其中
1 | <root level="INFO"> |
8.配置启动项
分别配置MasterServer, WorkerServer, ApiApplicationServer
main
in the class org.apache.dolphinscheduler.server.master.MasterServer
by Intellij IDEA, with the configuration VM Options -Dlogging.config=classpath:logback-spring.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql
main
in the class org.apache.dolphinscheduler.server.worker.WorkerServer
by Intellij IDEA, with the configuration VM Options -Dlogging.config=classpath:logback-spring.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql
main
in the class org.apache.dolphinscheduler.api.ApiApplicationServer
by Intellij IDEA, with the configuration VM Options -Dlogging.config=classpath:logback-spring.xml -Dspring.profiles.active=api,mysql
. After it started, you could find Open API documentation in http://localhost:12345/dolphinscheduler/swagger-ui/index.html9.配置zookeeper
参考以前的博客zookeeper部署
10.启动前端
1 | pnpm install |
11.启动后端
分别在IDEA中运行MasterServer, WorkerServer, ApiApplicationServer
登陆账号密码 admin/dolphinscheduler123
参考文档:https://www.bookstack.cn/read/dolphinscheduler-3.1.0-en/af18cd17a04eb31f.md
编译错误1:
1 | [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.1:pnpm (pnpm install) on project dolphinscheduler-ui: Failed to run task: 'pnpm install' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 9 (Exit value: 9) -> [Help 1] |
解决办法:
修改dolphinscheduler-ui模块下的pom.xml,修改后记得重新执行./mvnw spotless:apply
格式化代码
1 | <!-- <plugins>--> |
创建start.py,代码如下:
1 | #!/usr/bin/env python |
运行start.py,端口为8000
1 | python start.py 8000 |
在站点根目录下执行
1 | cnpm install hexo-hide-posts --save |
在站点目录下的_config.yml
中如下配置:
1 | # hexo-hide-posts |
在文章的属性中定义 hidden: true
即可隐藏文章。
1 | --- |
虽然首页上被隐藏了,但你仍然可以通过 https://hexo.test/lorem-ipsum/
链接访问它。
你可以在命令行运行 hexo hidden:list
来获取当前所有的已隐藏文章列表。
参考blog:https://www.cnblogs.com/yangstar/articles/16690342.html
1 | mkdir -p ~/.vim/colors ; cd ~/.vim/colors |
执行完成以后,重新运行vim查看效果。
1 |
|
因工作需要,使用Iterm2自动跳转远程终端,提高工作效率
安装oath-toolkit
1 | brew search oath-toolkit |
使用下面命令获取token, 注:${SECKEY} 是一个变量,按照自己的填写
1 | alias smCode="echo `oathtool --totp -b ${SECKEY} `| pbcopy" |
将脚本保存juneyao_auto_ssh_prd.sh
1 | #!/bin/bash |
脚本的使用命令:
1 | sh juneyao_auto_ssh_prd.sh -HOST=jmp.juneyaoair.com -PORT=2222 -PASSWORD=123123 |
在ITerm2终端中进行配置
Preference… -> Profiles -> +
将脚本运行命令填入到Send text at start:文本框中保存即可。
因为需要使用多个github账号,但只有一台电脑,想要动态切换不同用户,并且做到免密提交。
github登录账号 | github用户名 |
---|---|
cnnqjban521@gmail.com | hoey94 |
351865576@qq.com | hoey1994 |
Github账号 | 项目 |
---|---|
cnnqjban521@gmail.com | Test |
351865576@qq.com | test |
为两个账号生成不同的公钥(*.pub)和密钥
1 | ssh-keygen -t rsa -C "cnnqjban521@gmail.com" -f ~/.ssh/id_rsa_hoey94 |
生成的两组,公钥和密钥,分别到github官网上配置免密登录 Settings->SSH and GPG Keys->New SSH Key,填写的内容可以是用下面命令查看
1 | cat ~/.ssh/id_rsa_hoey94.pub |
创建~/.ssh/config,将内容填入进去
1 | vim ~/.ssh/config |
这里解释一下这一组内容的含义,平常克隆的时候我们会这么写:
1 | git clone git@github.com:hoey1994/test.git |
但如果如果按照上面内容进行配置以后,在克隆的时候要改成这样:
1 | git clone git@github-hoey1994:hoey1994/test.git |
请仔细对比一下上面两个克隆命令之间的差异
按照同样原理,将另一个账号也配置一下
1 | Host github-hoey94 |
如果端口有修改,可以按照下面的方式进行填写
Host gitlib-juneyao
HostName gitlab.juneyaoair.com
Port 10022
IdentityFile /Users/hoey/.ssh/id_rsa_juneyao
推荐不要跳过这一步,gacm是管理git用户很不错的一个工具,可以稍微熟悉一下命令。对于commit 的author的信息,可以快速的进行切换,因为本地有多个用户,使用它可以大大提高效率。
1 | git config --global --unset user.email |
安装多用户管理工具gacm,具体安装步骤见github
使用gacm命令添加两个账户
1 | gacm add --name hoey94 --email cnnqjban521@gmail.com |
在账号cnnqjban521@gmail.com(hoey94)下创建Test项目
在账号351865576@qq.com(hoey1994)下创建test项目
使用下面命令分别克隆到本地
1 | # 克隆Test |
改动一下里面的内容并提交完成测试。