Skip to content

Commit

Permalink
Guard building of thriftserver around Scala 2.10 check
Browse files Browse the repository at this point in the history
  • Loading branch information
pwendell authored and ScrapCodes committed Nov 10, 2014
1 parent 8502c23 commit 67ec364
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions dev/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,25 @@ CURRENT_BLOCK=$BLOCK_BUILD
# We always build with Hive because the PySpark Spark SQL tests need it.
BUILD_MVN_PROFILE_ARGS="$SBT_MAVEN_PROFILES_ARGS -Phive -Phive-0.12.0"


# NOTE: echo "q" is needed because sbt on encountering a build file with failure
#+ (either resolution or compilation) prompts the user for input either q, r, etc
#+ to quit or retry. This echo is there to make it not block.
# NOTE: Do not quote $BUILD_MVN_PROFILE_ARGS or else it will be interpreted as a
#+ single argument!
# QUESTION: Why doesn't 'yes "q"' work?
# QUESTION: Why doesn't 'grep -v -e "^\[info\] Resolving"' work?
# First build with 0.12 to ensure patches do not break the hive 12 build
echo "[info] Compile with hive 0.12"
# First build with 0.12 to ensure patches do not break the hive 12 build.
echo "[info] Compile with hive 0.12 (base support)"
echo -e "q\n" \
| sbt/sbt $BUILD_MVN_PROFILE_ARGS clean hive/compile hive-thriftserver/compile \
| sbt/sbt $BUILD_MVN_PROFILE_ARGS clean hive/compile \
| grep -v -e "info.*Resolving" -e "warn.*Merging" -e "info.*Including"
if [[ $BUILD_MVN_PROFILE_ARGS != *scala-2.11* ]]; then
# JDBC server only supported for Scala 2.10
echo "[info] Compile with hive 0.12 (JDBC server)"
echo -e "q\n" \
| sbt/sbt $BUILD_MVN_PROFILE_ARGS hive-thriftserver/compile \
| grep -v -e "info.*Resolving" -e "warn.*Merging" -e "info.*Including"
fi

# Then build with default version(0.13.1) because tests are based on this version
echo "[info] Building Spark with these arguments: $SBT_MAVEN_PROFILES_ARGS -Phive"
Expand Down

0 comments on commit 67ec364

Please sign in to comment.