Back to home page

OSCL-LXR

 
 

    


0001 #!/usr/bin/env bash
0002 
0003 #
0004 # Licensed to the Apache Software Foundation (ASF) under one or more
0005 # contributor license agreements.  See the NOTICE file distributed with
0006 # this work for additional information regarding copyright ownership.
0007 # The ASF licenses this file to You under the Apache License, Version 2.0
0008 # (the "License"); you may not use this file except in compliance with
0009 # the License.  You may obtain a copy of the License at
0010 #
0011 #    http://www.apache.org/licenses/LICENSE-2.0
0012 #
0013 # Unless required by applicable law or agreed to in writing, software
0014 # distributed under the License is distributed on an "AS IS" BASIS,
0015 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0016 # See the License for the specific language governing permissions and
0017 # limitations under the License.
0018 #
0019 
0020 set -o pipefail
0021 set -e
0022 
0023 # Go to the Spark project root directory
0024 FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
0025 cd "$FWDIR"
0026 
0027 SPARK_PROFILES=${1:-"-Pmesos -Pkubernetes -Pyarn -Pspark-ganglia-lgpl -Pkinesis-asl -Phive-thriftserver -Phive"}
0028 TOOLS_CLASSPATH="$(build/sbt -DcopyDependencies=false "export tools/fullClasspath" | tail -n1)"
0029 OLD_DEPS_CLASSPATH="$(build/sbt -DcopyDependencies=false $SPARK_PROFILES "export oldDeps/fullClasspath" | tail -n1)"
0030 
0031 rm -f .generated-mima*
0032 
0033 if [[ -x "$JAVA_HOME/bin/java" ]]; then
0034   JAVA_CMD="$JAVA_HOME/bin/java"
0035 else
0036   JAVA_CMD=java
0037 fi
0038 
0039 $JAVA_CMD \
0040   -Xmx2g \
0041   -cp "$TOOLS_CLASSPATH:$OLD_DEPS_CLASSPATH" \
0042   org.apache.spark.tools.GenerateMIMAIgnore
0043 
0044 echo -e "q\n" | build/sbt -mem 4096 -DcopyDependencies=false "$@" mimaReportBinaryIssues | grep -v -e "info.*Resolving"
0045 ret_val=$?
0046 
0047 if [ $ret_val != 0 ]; then
0048   echo "NOTE: Exceptions to binary compatibility can be added in project/MimaExcludes.scala"
0049 fi
0050 
0051 rm -f .generated-mima*
0052 exit $ret_val