-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhive_profile.sh
46 lines (40 loc) · 1.38 KB
/
hive_profile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
alias hiveMakePackageCl='mvn clean package -DskipTests -Pdist'
alias hiveMakePackage='mvn package -DskipTests -Pdist'
alias hiveMakeCl='mvn clean install -DskipTests'
alias hiveMake='mvn install -DskipTests'
alias sshPG='ssh -i ~/Downloads/openstack-keypair.pem.txt [email protected]'
alias sshHIVE='ssh -i ~/Downloads/openstack-keypair.pem.txt [email protected]'
hiveBuildAndMovePackage() {
if [ "$1" == "clean" ]
then
hiveMakePackageCl
else
hiveMakePackage
fi
branchName=$(git branch | grep ^* | awk '{print $2}')
srcPath=~/workspace/hive_jars/$branchName
mkdir -p $srcPath
cp -rf packaging $srcPath/
}
hiveStartHiveCli() {
branchName=$(git branch | grep ^* | awk '{print $2}')
if [ "$1" == "debug" ]
then
~/workspace/hive_jars/$branchName/packaging/target/apache-hive-3.1.0-SNAPSHOT-bin/apache-hive-3.1.0-SNAPSHOT-bin/bin/hive --debug
else
~/workspace/hive_jars/$branchName/packaging/target/apache-hive-3.1.0-SNAPSHOT-bin/apache-hive-3.1.0-SNAPSHOT-bin/bin/hive
fi
}
hiveOverrideTestsAll() {
if [ "$2" == "" ]
then
numFiles=10
else
numFiles="$2"
fi
echo "numFiles:$numFiles"
echo "cli driver: $3"
egrep "$3" $1 | perl -pe 's@.*testCliDriver_@@g' | awk '{print $1 ".q"}' | xargs -n $numFiles | perl -pe 's@ @,@g' | xargs -I{} mvn test -Dtest=$3 -Dtest.output.overwrite=true -Dqfile={}
}
alias makeCleanP='hiveBuildAndMovePackage clean'
alias makeP='hiveBuildAndMovePackage'