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

add feature to share SqlContext #65

Open
huozhanfeng opened this issue Sep 23, 2014 · 8 comments
Open

add feature to share SqlContext #65

huozhanfeng opened this issue Sep 23, 2014 · 8 comments

Comments

@huozhanfeng
Copy link

I want to preprocessing some data and create tables in a sqlContext and all question later can share this sqlContext object and process data base on the sqlContext, just as the effect of namedRdds.

I feel this is a popular demand and it can help others a lot.

Thanks.

@velvia
Copy link
Contributor

velvia commented Sep 23, 2014

Absolutely. Understand this is a feature request. It's in the plans, but
personally I probably won't have time to work on it for another month.

-Evan

On Tue, Sep 23, 2014 at 12:24 AM, Zhanfeng Huo [email protected]
wrote:

I want to preprocessing some data and create tables in a sqlContext and
all question later can share this sqlContext object and processing data
base on the sqlContext, just as the effect of namedRdds.

I feel this is a popular demand and it can help others a lot.

Thanks.


Reply to this email directly or view it on GitHub
#65.

The fruit of silence is prayer;
the fruit of prayer is faith;
the fruit of faith is love;
the fruit of love is service;
the fruit of service is peace. -- Mother Teresa

@huozhanfeng
Copy link
Author

I have implements a solution for internal use by extending the interface with spark 1.1.0. But I don't know whether it is a reasonable design for it forces into a parameter that may not be used.

@def runJob(sc: SparkContext, sqlContext: SQLContext, jobConfig: Config): Any

Another idea is realize a feature like NamedSqlContext, I feel this will be better.

@velvia
Copy link
Contributor

velvia commented Sep 24, 2014

Hi Zhanfeng,

Ni hao.
I think your solution, well, the issue is that it only works for
SQLContext. I'm aiming to make a generic solution that would work for just
about any derivative of SparkContext or related contexts. How it works
exactly I'm not sure, I'll have to think about it a little more.

The NamedRdds stuff may need to change a little bit, but maybe not, all it
really needs is a way to tie into the SparkContext underlying the
SQLContext. Or you can just rely on the table() method to discover your
tables. :)

-Evan

On Tue, Sep 23, 2014 at 4:38 AM, Zhanfeng Huo [email protected]
wrote:

I have implements a solution for internal use by extending the interface
with spark 1.1.0. But I don't know whether it is a reasonable design for it
forced into a parameter that may not be used.

@def https://github.com/def runJob(sc: SparkContext, sqlContext:
SQLContext, jobConfig: Config): Any

Another idea is realize a feature like NamedSqlContext, I fell this will
be better.


Reply to this email directly or view it on GitHub
#65 (comment)
.

The fruit of silence is prayer;
the fruit of prayer is faith;
the fruit of faith is love;
the fruit of love is service;
the fruit of service is peace. -- Mother Teresa

@huozhanfeng
Copy link
Author

That's great. I'm interested in it and I hope to make a contribution to this project to help others if time permits.

@velvia
Copy link
Contributor

velvia commented Sep 24, 2014

I'll share a design on the mailing list when the time comes closer....
sounds good?

On Tue, Sep 23, 2014 at 11:02 PM, Zhanfeng Huo [email protected]
wrote:

That's great. I'm interested in it and I hope to make a contribution to
this project to help others if time permits.


Reply to this email directly or view it on GitHub
#65 (comment)
.

The fruit of silence is prayer;
the fruit of prayer is faith;
the fruit of faith is love;
the fruit of love is service;
the fruit of service is peace. -- Mother Teresa

@huozhanfeng
Copy link
Author

That's good. I will keep attention to it.

@sranga
Copy link

sranga commented Nov 6, 2014

This feature is something that I am looking forward to as well.

@nightwolfzor
Copy link

+1 - will this also support HiveContext?

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

No branches or pull requests

4 participants