-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for writes in FullAcid and InsertOnly tables. (#30)
[SPAR-3779]:[oss]: Insert into/overwrite support for orc full acid tables [SPAR-3917] Fix OSS bugs Approved-by: Rajkumar Iyer <[email protected]> (cherry picked from commit dec9109) [SPAR-3841][oss] Insert Into/Overwrite support for Insert Only tables [SPAR-3780][oss] Update/Delete support for FullAcid non bucketed tables Co-authored-by: prakharjain09 <[email protected]> Approved-by: Amogh Margoor (cherry picked from commit 797a741) [SPAR-4039][oss] Restructure code for new anti-join based reader (cherry picked from commit 07475effdd4ebe1cc170e88d889bbc68b6d48cbe) [SPAR-3780][oss][bugfix] Fix delete to use conditional filter properly. (cherry picked from commit 9f9bc84) [SPAR-4039][oss] Restructure code for new anti-join based reader II (cherry picked from commit 2b7d2ad) [SPAR-3790][oss] Code changes to fixing locking and snapshot semantics for read and write. (cherry picked from commit 00209f9)
- Loading branch information
Showing
54 changed files
with
3,780 additions
and
1,443 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
name="spark-hiveacid-test-container" | ||
|
||
docker exec -it $name bin/bash -c "\ | ||
. ~/.bashrc; \ | ||
export HADOOP_HOME=/hadoop; \ | ||
hive/bin/beeline -u jdbc:hive2://0.0.0.0:10001/default root root" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/bash | ||
if [ -z ${2} ] | ||
then | ||
echo "Specify the spark-acid jar location" | ||
echo "spark-shell ~/codeline/TOT ~/codeline/TOT/acid-ds/target/scala-2.11/spark-acid-qds-assembly-0.4.3.jar" | ||
exit | ||
fi | ||
if [ -z ${1} ] | ||
then | ||
echo "Specify and spark code base directory" | ||
echo "spark-shell ~/codeline/TOT ~/codeline/TOT/acid-ds/target/scala-2.11/spark-acid-qds-assembly-0.4.3.jar" | ||
exit | ||
fi | ||
|
||
shellenv() { | ||
export QENV_LOCAL_CODELINE="${1}" | ||
export QENV_LOCAL_CONF="${QENV_LOCAL}/conf" | ||
export HADOOP_SRC="${QENV_LOCAL_CODELINE}/hadoop2" | ||
export SPARK_SRC="${QENV_LOCAL_CODELINE}/spark" | ||
export HUSTLER_SRC="${QENV_LOCAL_CODELINE}/hustler" | ||
export HIVE_SRC="${QENV_LOCAL_CODELINE}/hive" | ||
export ZEPPELIN_SRC="${QENV_LOCAL_CODELINE}/zeppelin" | ||
} | ||
|
||
hsnapshot() { | ||
HADOOP_SNAPSHOT=`ls ${HADOOP_SRC}/hadoop-dist/target/hadoop* | grep SNAPSHOT: | cut -d':' -f1` | ||
} | ||
|
||
hivesnapshot() { | ||
loc=`ls ${HIVE_SRC}/packaging/target/apache-hive* |grep bin |grep -v ':'` | ||
HIVE_SNAPSHOT=${HIVE_SRC}/packaging/target/${loc}/${loc}/ | ||
} | ||
|
||
run_spark_shelllocal() { | ||
|
||
# Setup writest into spark-env file. Run spark-shell after it. | ||
echo "Update Spark Conf based on Hadoop Build Version --> ${SPARK_SRC}/conf/spark-env.sh" | ||
hsnapshot | ||
hivesnapshot | ||
|
||
str="export SPARK_YARN_USER_ENV=CLASSPATH=${QENV_LOCAL_CONF}/" | ||
echo ${str} > ${SPARK_SRC}/conf/spark-env.sh | ||
|
||
if [ -n "${HADOOP_SNAPSHOT}" ] | ||
then | ||
|
||
str="export SPARK_DIST_CLASSPATH=${QENV_LOCAL_CONF}/:${HADOOP_SNAPSHOT}/share/hadoop/common/lib/*:${HADOOP_SNAPSHOT}/share/hadoop/common/*:${HADOOP_SNAPSHOT}/share/hadoop/hdfs:${HADOOP_SNAPSHOT}/share/hadoop/hdfs/lib/*:${HADOOP_SNAPSHOT}/share/hadoop/hdfs/*:${HADOOP_SNAPSHOT}/share/hadoop/yarn/lib/*:${HADOOP_SNAPSHOT}/share/hadoop/yarn/*:${HADOOP_SNAPSHOT}/share/hadoop/mapreduce/*:/share/hadoop/tools:${HADOOP_SNAPSHOT}/share/hadoop/tools/lib/*:${HADOOP_SNAPSHOT}/share/hadoop/tools/*:/share/hadoop/qubole:${HADOOP_SNAPSHOT}/share/hadoop/qubole/*" | ||
echo ${str} >> ${SPARK_SRC}/conf/spark-env.sh | ||
fi | ||
|
||
if [ -n "${HIVE_SNAPSHOT}" ] | ||
then | ||
str="export SPARK_DIST_CLASSPATH=\${SPARK_DIST_CLASSPATH}:${HIVE_SNAPSHOT}/lib/*" | ||
echo ${str} >> ${SPARK_SRC}/conf/spark-env.sh | ||
fi | ||
|
||
str="export HADOOP_CONF_DIR=${QENV_LOCAL_CONF}/" | ||
echo ${str} >> ${SPARK_SRC}/conf/spark-env.sh | ||
|
||
$SPARK_SRC/bin/spark-shell $@ | ||
} | ||
|
||
|
||
shellenv ${1} | ||
shift | ||
run_spark_shelllocal --jars $@ --conf spark.sql.extensions=com.qubole.spark.datasources.hiveacid.HiveAcidAutoConvertExtension --conf spark.hadoop.hive.metastore.uris=thrift://localhost:10000 --conf spark.sql.catalogImplementation=hive |
This file contains 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
This file contains 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
Oops, something went wrong.