I have shown two senarios below:

// setup spark context

val user = readLine("username: ")
val pass = System.console.readPassword("password: ") <- null pointer
exception here

and....

// setup spark context

val user = readLine("username: ")
val console = System.console <- null pointer exception here
val pass = console.readPassword("password: ")


thanks,

Jem


On Fri, Jul 3, 2015 at 11:04 AM Akhil Das <ak...@sigmoidanalytics.com>
wrote:

> Can you paste the code? Something is missing
>
> Thanks
> Best Regards
>
> On Fri, Jul 3, 2015 at 3:14 PM, Jem Tucker <jem.tuc...@gmail.com> wrote:
>
>> In the driver when running spark-submit with --master yarn-client
>>
>> On Fri, Jul 3, 2015 at 10:23 AM Akhil Das <ak...@sigmoidanalytics.com>
>> wrote:
>>
>>> Where does it returns null? Within the driver or in the executor? I just
>>> tried System.console.readPassword in spark-shell and it worked.
>>>
>>> Thanks
>>> Best Regards
>>>
>>> On Fri, Jul 3, 2015 at 2:32 PM, Jem Tucker <jem.tuc...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> We have an application that requires a username/password to be entered
>>>> from the command line. To screen a password in java you need to use
>>>> System.console.readPassword however when running with spark System.console
>>>> returns null?? Any ideas on how to get the console from spark?
>>>>
>>>> Thanks,
>>>>
>>>> Jem
>>>>
>>>
>>>
>

Reply via email to