You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ja...@apache.org on 2016/11/16 16:03:25 UTC
[1/2] incubator-carbondata git commit: fix bug CARBONDATA-83 sql
support CLI options
Repository: incubator-carbondata
Updated Branches:
refs/heads/master 0265b825c -> a26b92f32
fix bug CARBONDATA-83
sql support CLI options
fix issue sql options not support
Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/e954d61a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/e954d61a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/e954d61a
Branch: refs/heads/master
Commit: e954d61af00671e5378c3e9ecf4ca8e31411e640
Parents: 0265b82
Author: xbkaishui <xb...@126.com>
Authored: Sun Nov 13 23:23:10 2016 +0800
Committer: jackylk <ja...@huawei.com>
Committed: Wed Nov 16 23:50:19 2016 +0800
----------------------------------------------------------------------
bin/carbon-spark-sql | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/e954d61a/bin/carbon-spark-sql
----------------------------------------------------------------------
diff --git a/bin/carbon-spark-sql b/bin/carbon-spark-sql
index 43d6f1a..56aaebc 100755
--- a/bin/carbon-spark-sql
+++ b/bin/carbon-spark-sql
@@ -65,10 +65,7 @@ function usage {
pattern+="\|--help"
pattern+="\|======="
- "$FWDIR"/bin/spark-submit --help 2>&1 | grep -v Usage 1>&2
- echo
- echo "CLI options:"
- "$FWDIR"/bin/spark-class "$CLASS" --help 2>&1 | grep -v "$pattern" 1>&2
+ "$FWDIR"/bin/spark-sql --help 2>&1 | grep -v Usage 1>&2
exit "$2"
}
export -f usage
@@ -77,4 +74,16 @@ if [[ "$@" = *--help ]] || [[ "$@" = *-h ]]; then
usage "" 0
fi
-exec "$FWDIR"/bin/spark-submit "$@" --class "$CLASS" "$JAR"
+#split options and cli_options, final submit example is spark-submit options --class xxx xxx.jar cli_options
+options=""
+cmd
+while true ; do
+ case "$1" in
+ -d|--define|-f|-i|--hiveconf|--hivevar|--database|-e|-S|--silent) cmd="$1"; break;;
+ -v|--verbose) options="$options $1" ; shift ;;
+ -*) options="$options $1 $2" ; shift 2 ;;
+ *) break ;;
+ esac
+done
+
+exec "$FWDIR"/bin/spark-submit $options --class "$CLASS" "$JAR" "$@"
[2/2] incubator-carbondata git commit: [CARBONDATA-83] Fixing support
carbon-spark-sql CLI options This closes #314
Posted by ja...@apache.org.
[CARBONDATA-83] Fixing support carbon-spark-sql CLI options This closes #314
Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/a26b92f3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/a26b92f3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/a26b92f3
Branch: refs/heads/master
Commit: a26b92f32af39625667bba400dad8ef94712e148
Parents: 0265b82 e954d61
Author: jackylk <ja...@huawei.com>
Authored: Thu Nov 17 00:03:09 2016 +0800
Committer: jackylk <ja...@huawei.com>
Committed: Thu Nov 17 00:03:09 2016 +0800
----------------------------------------------------------------------
bin/carbon-spark-sql | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------