Skip to content

[ZEPPELIN-474] Provide InterpreterContext as ThreadLocal value#492

Closed
Leemoonsoo wants to merge 2 commits into
apache:masterfrom
Leemoonsoo:ZEPPELIN-474
Closed

[ZEPPELIN-474] Provide InterpreterContext as ThreadLocal value#492
Leemoonsoo wants to merge 2 commits into
apache:masterfrom
Leemoonsoo:ZEPPELIN-474

Conversation

@Leemoonsoo
Copy link
Copy Markdown
Member

This PR implements ZEPPELIN-474.

Let 3rd party library access InterpreterContext.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it be too big change to make InterpreterContext a singleton, and then add non-static field of the TreadLocal?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not sure if i understand your suggestion correctly, but InterpreterContext is created every time. For example, every single call, new instance of InterpreterContext is created passed into Interpreter.interpret() method. So i think it's hard to make InterpreterContext a singleton.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You are right, thank your for the explanation!

@bzz
Copy link
Copy Markdown
Member

bzz commented Nov 30, 2015

Looks good to me

@Leemoonsoo
Copy link
Copy Markdown
Member Author

I'm merging it into master

@asfgit asfgit closed this in 48ee2b1 Dec 1, 2015
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.

2 participants