Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-3454] Expose JSON representation of data shown in WebU #2333

Closed
wants to merge 25 commits into from

Conversation

sarutak
Copy link
Member

@sarutak sarutak commented Sep 9, 2014

No description provided.

@sarutak sarutak changed the title Implemented renderJson for StagePage (WIP) [SPARK-3454] Expose JSON representation of data shown in WebU Sep 9, 2014
@SparkQA
Copy link

SparkQA commented Sep 9, 2014

QA tests have started for PR 2333 at commit 1cbf7d5.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 9, 2014

QA tests have finished for PR 2333 at commit 1cbf7d5.

  • This patch fails unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 11, 2014

QA tests have started for PR 2333 at commit f7958b0.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 11, 2014

QA tests have finished for PR 2333 at commit f7958b0.

  • This patch fails unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 11, 2014

QA tests have started for PR 2333 at commit 8850706.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 11, 2014

QA tests have finished for PR 2333 at commit 8850706.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 11, 2014

QA tests have started for PR 2333 at commit c108200.

  • This patch merges cleanly.

@sarutak sarutak changed the title (WIP) [SPARK-3454] Expose JSON representation of data shown in WebU [[SPARK-3454] Expose JSON representation of data shown in WebU Sep 11, 2014
@sarutak sarutak changed the title [[SPARK-3454] Expose JSON representation of data shown in WebU [SPARK-3454] Expose JSON representation of data shown in WebU Sep 11, 2014
@SparkQA
Copy link

SparkQA commented Sep 11, 2014

QA tests have started for PR 2333 at commit a349d0e.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 11, 2014

QA tests have finished for PR 2333 at commit c108200.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 11, 2014

QA tests have finished for PR 2333 at commit a349d0e.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@@ -26,6 +29,23 @@ import org.apache.spark.ui.{UIUtils, WebUIPage}
private[ui] class EnvironmentPage(parent: EnvironmentTab) extends WebUIPage("") {
private val listener = parent.listener

override def renderJson(request: HttpServletRequest): JValue = {
val jvmInfoJson =
("RUntime Informationf" -> listener.jvmInformation.foldLeft(JObject())(_ ~ _))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of typos in this line...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you show what the final JSON looks like? Since this is a map it might be good to convert this faithfully, e.g.

{
  "Spark Properties": {
    "spark.master":"local"
    "spark.app.name":"spark-shell"
    ...
  }
  ...
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the result of JSON for environment.

{
"Runtime Information" : {
  "Java Home" : "/usr/java/jdk1.7.0_65/jre",
  "Java Version" : "1.7.0_65 (Oracle Corporation)",
  "Scala Version" : "version 2.10.4"
},
"Spark Properties" : {
  "spark.serializer" : "org.apache.spark.serializer.KryoSerializer",
   ...    
  "spark.tachyonStore.folderName" : "spark-a8ac134b-187d-4d4b-b9ef-140e626ee96c"
},
"System Properties" : {
  "java.io.tmpdir" : "/tmp",
  ...
  "java.version" : "1.7.0_65",
  "sun.io.unicode.encoding" : "UnicodeLittle"
},
"Classpath Entries" : {
  "/home/sarutak/work/spark/sql/hive/target/scala-2.10/test-classes" : "System Classpath",
   ...
  "/home/sarutak/work/spark/assembly/target/scala-2.10/spark-assembly-1.1.0-SNAPSHOT-hadoop2.2.0.jar" : "System Classpath"
}

}

@SparkQA
Copy link

SparkQA commented Sep 12, 2014

QA tests have started for PR 2333 at commit 72c0644.

  • This patch merges cleanly.

@sarutak
Copy link
Member Author

sarutak commented Sep 12, 2014

@andrewor14 Thank you for reviewing this PR.
I agree with removing category from the JSON blob and have done.

@SparkQA
Copy link

SparkQA commented Sep 12, 2014

QA tests have finished for PR 2333 at commit 72c0644.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@andrewor14
Copy link
Contributor

@JoshRosen

@SparkQA
Copy link

SparkQA commented Sep 14, 2014

QA tests have started for PR 2333 at commit 7f51a4f.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 14, 2014

QA tests have finished for PR 2333 at commit 7f51a4f.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@sarutak
Copy link
Member Author

sarutak commented Sep 15, 2014

test this please.

@SparkQA
Copy link

SparkQA commented Sep 15, 2014

QA tests have started for PR 2333 at commit d41b3ca.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 15, 2014

QA tests have finished for PR 2333 at commit d41b3ca.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class JavaSparkContext(val sc: SparkContext)
    • throw new IllegalStateException("The main method in the given main class must be static")
    • class TaskCompletionListenerException(errorMessages: Seq[String]) extends Exception
    • class Dummy(object):
    • class RatingDeserializer(FramedSerializer):
    • class Encoder[T <: NativeType](columnType: NativeColumnType[T]) extends compression.Encoder[T]
    • class Encoder[T <: NativeType](columnType: NativeColumnType[T]) extends compression.Encoder[T]
    • class Encoder[T <: NativeType](columnType: NativeColumnType[T]) extends compression.Encoder[T]
    • class Encoder extends compression.Encoder[IntegerType.type]
    • class Decoder(buffer: ByteBuffer, columnType: NativeColumnType[IntegerType.type])
    • class Encoder extends compression.Encoder[LongType.type]
    • class Decoder(buffer: ByteBuffer, columnType: NativeColumnType[LongType.type])
    • class JavaStreamingContext(val ssc: StreamingContext) extends Closeable

@sarutak
Copy link
Member Author

sarutak commented Sep 16, 2014

Can anyone review this if you have time?

@sarutak
Copy link
Member Author

sarutak commented Sep 17, 2014

test this please.

@SparkQA
Copy link

SparkQA commented Sep 17, 2014

QA tests have started for PR 2333 at commit 7b4d6eb.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 17, 2014

QA tests have finished for PR 2333 at commit 7b4d6eb.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@andrewor14
Copy link
Contributor

@sarutak, I believe @JoshRosen is working on a more general framework for extracting the info displayed on the UI as JSON, so there's a chance that we won't go with the approach here. Just a heads up.

@sarutak
Copy link
Member Author

sarutak commented Sep 17, 2014

@andrewor14 Thank you for notification!
Actually, I need JSON representation for #2342 .
I'm planning to parse JSON to use D3.

@JoshRosen
Copy link
Contributor

@sarutak In the long run, I'd be interested in re-writing the UI in terms of a richer REST API that exposes data as JSON, exactly for the visualization use-case that you mentioned. This change (Javascript-based rendering, etc) is blocked by a couple of other features right now. I'm swamped with a bunch of other work, but I'll try to get a public design draft posted in the next couple of days.

@sarutak
Copy link
Member Author

sarutak commented Sep 17, 2014

Thanks @JoshRosen !
So, for now, I use self implementation for #2342 and I'll use the feature you'll try.

@JoshRosen
Copy link
Contributor

I've opened SPARK-3644 as a forum for discussing the design of a REST API; sorry for the delay.

@sarutak
Copy link
Member Author

sarutak commented Sep 24, 2014

Thank you for you work @JoshRosen !
I'll check it out.

@squito
Copy link
Contributor

squito commented Jan 26, 2015

Hi @sarutak thanks for your work on this. Josh's other PR #2696 has been merged for a while now. I'm gonna take another crack at implementing this on top of the lastest changes and getting this integrated into the history server too. Can you please close this PR (unless you are planning on updating it in the very near future)?

Hopefully that will let your other PR #2342 to get merged in -- looks really cool!

@andrewor14
Copy link
Contributor

@sarutak thanks a lot for working on this. There is another patch #4435 that provides a more elaborate implementation of the functionality here. Given that this PR has mostly gone stale at this point, would you mind closing this?

@sarutak
Copy link
Member Author

sarutak commented Feb 20, 2015

OK. I close this PR.

@sarutak sarutak closed this Feb 20, 2015
@sarutak sarutak deleted the json-exposing-feature branch May 18, 2015 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants