Ah, you still have to use the JavaSparkContext rather than using the
sparkSession.sparkContext ... that makes sense.

Thanks for your help.


Thanks,

Andy.

--

Andy Grove
Chief Architect
www.agildata.com


On Fri, Aug 5, 2016 at 12:03 PM, Everett Anderson <[email protected]> wrote:

> Hi,
>
> Can you say more about what goes wrong?
>
> I was migrating my code and began using this for initialization:
>
>    SparkConf sparkConf = new SparkConf().setAppName(...)
>    SparkSession sparkSession = new SparkSession.Builder().config(
> sparkConf).getOrCreate();
>    JavaSparkContext jsc = new JavaSparkContext(sparkSession.
> sparkContext());
>
> and then used SparkSession instead of the SQLContext, which seemed to work.
>
>
> On Thu, Aug 4, 2016 at 9:41 PM, Andy Grove <[email protected]>
> wrote:
>
>> From some brief experiments using Java with Spark 2.0 it looks like Java
>> developers should stick to SparkContext and SQLContext rather than using
>> the new SparkSession API?
>>
>> It would be great if someone could confirm if that is the intention or
>> not.
>>
>> Thanks,
>>
>> Andy.
>>
>> --
>>
>> Andy Grove
>> Chief Architect
>> www.agildata.com
>>
>>
>

Reply via email to