git clone https://github.com/mikeyhu/scaladiagrams
cd scaladiagrams
./build
sudo apt-get install -y graphviz
sudo yum install -y graphviz
./scaladiagrams -s **path/core/src/main/scala/org/apache/spark/rdd > test.dot
dot test.dot -Tpng > test.png
dot test.dot -Tsvg > test.svg
./scaladiagrams -s **path/core/src/main/scala/org/apache/spark/rdd |dot -Tpng > ~/test.png
./scaladiagrams -s **path/core/src/main/scala/org/apache/spark/rdd |dot -Tsvg > ~/test.svg
dot文件第2行可以加入
rankdir=RL;