Spark-on-k8s-operator: Allow sparkctl to create SparkApplication from a ScheduledSparkApplication

Created on 27 Jul 2018  路  9Comments  路  Source: GoogleCloudPlatform/spark-on-k8s-operator

This is similar to one time job support from cronjob in kubectl. (kubectl create job one-time --from=cronjob/hello).

enhancement

Most helpful comment

I have some proposal on extending sparkctl to support this functionality. The sparkctl command for this will look like the following:

sparkctl create sparkapplication one-time --from=<ScheduledSparkApplication name> 

@spjegan @dharmeshkakadia please let me know WDYT.

All 9 comments

I have some proposal on extending sparkctl to support this functionality. The sparkctl command for this will look like the following:

sparkctl create sparkapplication one-time --from=<ScheduledSparkApplication name> 

@spjegan @dharmeshkakadia please let me know WDYT.

LGTM

Just a quick question. Do we really need to say that this is one-time? Can't this be just
sparkctl create sparkapplication --from=<ScheduledSparkApplication name> as it is anyways a one-time job?

Otherwise, this looks good to me too.

Thanks,
Jegan

@spjegan one-time is not a keywork. one-time is the name of the sparkapplication that will be created from scheduledsparkapplication.

so something like
sparkctl create sparkapplication name_of_my_forced_spark_run --from=<ScheduledSparkApplication name>

I'm thinking we can even make the name optional. If a name is not given, it gets derived from the name of the ScheduledSparkApplication, e.g., <SSA-name>-one-time. WDYT?

@liyinan926 then you can't create more than one runs from a given ScheduledSparkApplication. I like specifying the name of a run also because I can give it a meaningful name like forced_catchup_run and stuff. I dont think we should generate names,

Yes, that makes sense. So I think sparkctl create sparkapplication <name_of_my_forced_spark_run> --from=<ScheduledSparkApplication name> sounds good.

@dharmeshkakadia thanks for the clarification.

This looks good to me.
sparkctl create sparkapplication <name_of_my_forced_spark_run> --from=<ScheduledSparkApplication name>.

This is quite close to the kubectl equivalent

kubectl create job job-name --from=cronjobs/my-cronjob

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andrewgdavis picture andrewgdavis  路  5Comments

liyinan926 picture liyinan926  路  7Comments

jdelgadillo picture jdelgadillo  路  8Comments

jblankfeld picture jblankfeld  路  7Comments

ketanhdoshi picture ketanhdoshi  路  6Comments