Last active
June 1, 2016 09:17
-
-
Save MBtech/400404173de4081d77b053b50e28870b to your computer and use it in GitHub Desktop.
This bash one liner can be used to display the number of configurations for all the branches of Storm and Flink
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #For Storm | |
| git ls-remote --heads origin | sed 's?.*refs/heads/??' | xargs -I {} sh -c 'git reset; git checkout .; git clean -fdx; git checkout origin/{} >/dev/null 2>&1; echo $(grep "[^#]" conf/defaults.yaml 2>/dev/null | wc -l ) {};' | sort -k 1 -n | |
| #For Flink | |
| git ls-remote --heads origin | sed 's?.*refs/heads/??' | xargs -I {} ../script.sh {} | sort -k 1 -n | |
| #Script | |
| #!/bin/bash | |
| git reset | |
| git checkout . | |
| git clean -fdx | |
| git checkout origin/$1 >/dev/null 2>&1 | |
| echo $(awk '/Configuration Keys/,/Default Values/' flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java 2>/dev/null | grep "public static final String" | wc -l) $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment