? 在使用airflow的过程中需要大量的dag脚本进行性能测试,如果一个个去编写dag脚本未免太过麻烦,于是想到用python的jinja2模板引擎实现批量脚本生成。 先通过pip命令安装jinja2模块: 然后创建模板文件(模板可以是任何形式的文本格式,没有特定扩展名,甚至可以不要扩展名): f ...
分类:
编程语言 时间:
2018-08-03 11:33:13
阅读次数:
478
RDD运行原理 1.创建 RDD 对象 2.DAGScheduler模块介入运算,计算RDD之间的依赖关系。RDD之间的依赖关系就形成了DAG 3.每一个JOB被分为多个Stage,划分Stage的一个主要依据是当前计算因子的输入是否是确定的,如果是则将其分在同一个Stage,避免多个Stage之间 ...
分类:
其他好文 时间:
2018-08-02 16:02:35
阅读次数:
148
先tarjan缩成DAG,然后答案就变成了最长链,dp的同时计数即可 就是题面太唬人了,没反应过来 ...
分类:
编程语言 时间:
2018-07-31 21:37:45
阅读次数:
129
#include<iostream>#include<cstdio>#include<cstring>using namespace std;int main (){ int t; cin>>t; while(t--) { int m,k=1; scanf("%d",&m); int sum=0; ...
分类:
其他好文 时间:
2018-07-29 19:28:09
阅读次数:
154
群里一位朋友发出来的故障,经过沟通圆满解决此故障。故障提示:解决方法:要添加副本的DAG成员服务器有一个服务没有起来。服务:RemoteRegistry此服务的作用是远程写入注册表。其实成员服务器都需要此服务自动启动。
分类:
数据库 时间:
2018-07-28 15:18:08
阅读次数:
170
#include<iostream>#include<string.h>#include<stdio.h>using namespace std;int main (){ char s[1005]; while(gets(s)) { int m=strlen(s); int n=m; for(int ...
分类:
其他好文 时间:
2018-07-27 13:19:20
阅读次数:
134
#include<iostream>#include<stdio.h>using namespace std;int gcd(int a,int b){ if(b==0) return a; return gcd(b,a%b);}int main (){ int a,b,c,d; char ch1, ...
分类:
其他好文 时间:
2018-07-27 13:10:34
阅读次数:
111
#include<iostream>using namespace std;int main (){ int t; cin>>t; while(t--) { int n; cin>>n; if(n>=90 && n<=100) cout<<"A"<<endl; else if(n>=80 && n< ...
分类:
其他好文 时间:
2018-07-25 15:13:23
阅读次数:
130
#include<iostream>using namespace std;int main (){ int t; cin>>t; while(t--) { int n,k; cin>>n>>k; int count=n; while(n>=k) { int tmp=n; n=n/k; count= ...
分类:
其他好文 时间:
2018-07-25 13:15:28
阅读次数:
116
#include<iostream>#include<stdio.h>#include<algorithm> using namespace std;int f1(int n){ int a[4]; a[0]=n/1000; a[1]=n/100%10; a[2]=n%100/10; a[3]=n% ...
分类:
其他好文 时间:
2018-07-24 19:28:07
阅读次数:
136