Skip to content

Commit

Permalink
main class and main jar file changes
Browse files Browse the repository at this point in the history
saranyaloganathan23 committed Aug 12, 2024
1 parent db78ecf commit a2feabb
Showing 1 changed file with 44 additions and 20 deletions.
64 changes: 44 additions & 20 deletions src/jobs/submitJob.tsx
Original file line number Diff line number Diff line change
@@ -495,26 +495,50 @@ function SubmitJob({
jarFileSelected: string[] | string,
argumentSelected: string[] | string
) => {
return {
sparkJob: {
mainJarFileUri: mainClassSelected,
...(propertyObject && {
properties: propertyObject
}),
...(archieveFileSelected !== '' && {
archiveUris: archieveFileSelected
}),
...(fileSelected !== '' && {
fileUris: [fileSelected]
}),
...(jarFileSelected !== '' && {
jarFileUris: jarFileSelected
}),
...(argumentSelected !== '' && {
args: argumentSelected
})
}
};
if(mainClassSelected.includes('.jar')){
return {
sparkJob: {
mainJarFileUri: mainClassSelected,
...(propertyObject && {
properties: propertyObject
}),
...(archieveFileSelected !== '' && {
archiveUris: archieveFileSelected
}),
...(fileSelected !== '' && {
fileUris: [fileSelected]
}),
...(jarFileSelected !== '' && {
jarFileUris: jarFileSelected
}),
...(argumentSelected !== '' && {
args: argumentSelected
})
}
};
}
else{
return {
sparkJob: {
mainClass: mainClassSelected,
...(propertyObject && {
properties: propertyObject
}),
...(archieveFileSelected !== '' && {
archiveUris: archieveFileSelected
}),
...(fileSelected !== '' && {
fileUris: [fileSelected]
}),
...(jarFileSelected !== '' && {
jarFileUris: jarFileSelected
}),
...(argumentSelected !== '' && {
args: argumentSelected
})
}
};
}
};

const createSparkRPayload = (

0 comments on commit a2feabb

Please sign in to comment.