Skip to content

Instantly share code, notes, and snippets.

@mackrorysd
Last active January 10, 2017 22:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mackrorysd/72f2e6817156181b3d1257c0dc7719c6 to your computer and use it in GitHub Desktop.
Save mackrorysd/72f2e6817156181b3d1257c0dc7719c6 to your computer and use it in GitHub Desktop.
Generate diff to evaluate wire compatibility between Hadoop versions
#!/usr/bin/env bash
cd /tmp
OLD=branch-2.7
NEW=trunk
mkdir new
mkdir old
git clone git://git.apache.org/hadoop.git
function gather_protos() {
SOURCE=${1}
TARGET=${2}
for proto in $(cd ${SOURCE} && find . -name \*.proto | sed -e 's|^\./||'); do
#flattened=${proto//\//_} # Trips up on files that moved
flattened=$(basename ${proto})
cp ${SOURCE}/${proto} ${TARGET}/${flattened}
done
}
(cd hadoop; git checkout ${OLD})
gather_protos hadoop old
(cd hadoop; git checkout ${NEW})
gather_protos hadoop new
meld old new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment