Spark源码解读之spark-shell
依稀记得在刚开始学习spark框架的时候,第一次接触的就是spark-shell这个东西,但背后它究竟做了什么样的工作,今天来一探究竟: 打开spark-shell,实际上它是一个shell脚本,里面最核心的内容如下: 12345678910111213141516function main() { if $cygwin; then # Workaround for issue involving JLine and Cygwin # (see http://sourceforge.net/p/jline/bugs/40/). # If you're using the Mintty terminal emulator in Cygwin, may need to set the # "Backspace sends ^H" setting in "Keys" section of the Mintty options # (see https://github.com/sbt/sbt/is ...
数据结构系列29-二分查找
数据结构系列29 - 二分查找 - C语言实现 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596/************************************************************************** File Name: BinarySearch.c* Author: TyrantLucifer* E-mail: TyrantLucifer@gmail.com* Blog: https://tyrantlucifer.com* Created Time: Sun 14 Nov 2021 12:45:42 PM CST *********************************************** ...
数据结构系列28-顺序查找
数据结构系列28 - 顺序查找 - C语言实现 常规查找 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455/************************************************************************** File Name: SequenceSearch.c* Author: TyrantLucifer* E-mail: TyrantLucifer@gmail.com* Blog: https://tyrantlucifer.com* Created Time: Wed 03 Nov 2021 11:54:58 PM CST ************************************************************************/#include <stdio.h>#include <stdlib.h&g ...
数据结构系列27-关键路径
数据结构系列27 - 关键路径 - C语言实现 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119 ...
数据结构系列26-拓扑排序
数据结构系列26 - 拓扑排序 - C语言实现 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144#include <stdio.h>#include <stdlib.h>typedef struct Graph { char* vexs; int** arcs; int vexNum; int arcNum;}G ...
数据结构系列25-最短路径floyd算法
数据结构系列25 - 最短路径floyd算法 - C语言实现 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103#include <stdio.h>#include <stdlib.h>#define MAX 32767typedef struct Graph { char* vexs; int** arcs; int vexNum; int arcNum;}Graph;Graph* initGraph(int vexNum) { Graph* G = (Graph*)malloc(sizeof(Graph)); G -> ve ...
数据结构系列24-最短路径dijkstra算法
数据结构系列24 - 最短路径dijkstra算法 - C语言实现 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115#include <stdio.h>#include <stdlib.h>#define MAX 32767typedef struct Graph { char* vexs; int** arcs; int vexNum; int arcNum;}Graph;Graph* initGraph(int vexNum) { Graph* G = (Grap ...
数据结构系列23-最小生成树kruskal算法
数据结构系列23 - 最小生成树kruskal算法 - C语言实现 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121#include <stdio.h>#include <stdlib.h>#define MAX 32767typedef struct Graph { char* vexs; int** arcs; int vexNum; int arcNum;}Graph;typedef struct Edge { int sta ...
数据结构系列22-最小生成树prim算法
数据结构系列22 - 最小生成树prim算法 - C语言实现 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114#include <stdio.h>#include <stdlib.h>/** * 图顶点之前不通,那么邻接矩阵的值为MAX * 如果顶点是自己本身,那么值为0 */#define MAX 32767typedef struct Graph { char* vexs; int** arcs; int vexNum; int arcNum;}Graph;typedef struct ...
数据结构系列21-图的创建和遍历
数据结构系列21 - 图的创建与遍历 - C语言实现 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135#include <stdio.h>#include <stdlib.h>#define MAXSIZE 5typedef struct Graph { char* vexs; int** arcs; int vexNum; int arcNum;}Graph;ty ...