Skip to content

Commit

Permalink
add desc for prepareResourceFile()
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngone51 committed Jul 27, 2019
1 parent e9ec52e commit 8408e73
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -338,6 +338,14 @@ private[spark] object ResourceUtils extends Logging {
Files.write(jsonFile.toPath, compact(render(allocationJson)).getBytes())
}

/**
* Save the allocated resources of driver(cluster only) or executor into a JSON formatted
* resources file. Used in Standalone only.
* @param componentName spark.driver / spark.executor
* @param resources allocated resources for driver(cluster only) or executor
* @param dir the target directory used to place the resources file
* @return resources file
*/
def prepareResourceFile(
componentName: String,
resources: Map[String, ResourceInformation],
Expand Down

0 comments on commit 8408e73

Please sign in to comment.