get parameters of spark-submit

2015-12-21 Thread Bonsen
1.I code my scala class and pack.(not input the hdfs files' paths,just use
the paths from "spark-submit"'s parameters)
2.Then,If I input like this:
${SPARK_HOME/bin}/spark-submit \
--master  \
 \
hdfs:// \
hdfs:// \

what should I do to get the two hdfs files' paths in my scala class's
code(before pack the jar file)?




--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/get-parameters-of-spark-submit-tp25749.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org



Re: get parameters of spark-submit

2015-12-21 Thread Jeff Zhang
don't understand your question. These parameter are passed to your program
as args of the main function.

On Mon, Dec 21, 2015 at 9:09 PM, Bonsen <hengbohe...@126.com> wrote:

> 1.I code my scala class and pack.(not input the hdfs files' paths,just use
> the paths from "spark-submit"'s parameters)
> 2.Then,If I input like this:
> ${SPARK_HOME/bin}/spark-submit \
> --master  \
>  \
> hdfs:// \
> hdfs:// \
>
> what should I do to get the two hdfs files' paths in my scala class's
> code(before pack the jar file)?
>
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/get-parameters-of-spark-submit-tp25749.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
> For additional commands, e-mail: user-h...@spark.apache.org
>
>


-- 
Best Regards

Jeff Zhang