1

SnappyData documentation give an example on how to submit a jar to a cluster:

https://snappydatainc.github.io/snappydata/howto/run_spark_job_inside_cluster/

But what if I need to submit the jar with the same class CreatePartitionedRowTable multiple times, but with different paramter, say different suffix to append to the names of the tables created, How do I do that?

UPDATE:

To be more precise, say I want to submit the jar with different parameters when I submit the jar, something like this

bin/snappy-job.sh submit
    --app-name CreatePartitionedRowTable
    --class org.apache.spark.examples.snappydata.CreatePartitionedRowTable
    --app-jar examples/jars/quickstart.jar
    --lead localhost:8090
    --CustomeParam suffix

the additional

--CustomeParam suffix

will be passed in to the job, and the code can pick up this parameter suffix, and appending the suffix to the table names to be created, so that I don't have to modify my code every time that I want to submit the jar with a different suffix.

Update 2:

I just went through the examples and found an example usage: https://github.com/SnappyDataInc/snappydata/blob/master/examples/src/main/scala/org/apache/spark/examples/snappydata/CreateColumnTable.scala

so basically run like this:

 *   bin/snappy-job.sh submit
 *   --app-name CreateColumnTable
 *   --class org.apache.spark.examples.snappydata.CreateColumnTable
 *   --app-jar examples/jars/quickstart.jar
 *   --lead [leadHost:port]
 *   --conf data_resource_folder=../../quickstart/src/main/resources

and use config to get the customized parameter.

user3230153
  • 123
  • 3
  • 11

1 Answers1

1

Each time you submit your app jar with snappy-job.sh it will create a new Job and run it. It could be the same jar with different content. Do you see any exception or the modified class (CreatePartitionedRowTable) is not getting picked ?

jagsr
  • 535
  • 2
  • 6
  • Thanks for the reply, I understand that submitting the jar multiple times will result in new jobs, please see my update in the question – user3230153 Oct 11 '17 at 19:43