Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-3470

Have JavaSparkContext implement Closeable/AutoCloseable

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.2
    • 1.2.0
    • Spark Core
    • None

    Description

      After discussion in SPARK-2972, it seems like a good idea to allow Java developers to use Java 7 automatic resource management with JavaSparkContext, like so:

      try (JavaSparkContext ctx = new JavaSparkContext(...)) {
         return br.readLine();
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              roji Shay Rojansky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: