You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by peterm_second <re...@gmail.com> on 2014/12/05 15:24:14 UTC
Start hiveserver2 as a daemon
Hi Guys,
How can I launch the Hiveserver2 as a daemon.
I am launching the hiverserv2 using sshpass and I can't detach
hiveserver2 from my terminal. Is there a way to deamonise the
hiveserver2 ?
I've also tried using & but it's not working either, any thoughts ?
Regards,
Peter
Re: Start hiveserver2 as a daemon
Posted by peterm_second <re...@gmail.com>.
Hi Guys,
I found the problem I hope it helps someone else. The way to do those
sort of thigs is to suppress the command output. In effect you need to
tell the sshpass-ed command to suppress it's output if you do that you
can daemonize the remote command , in my case the hiveserver2.
Regards,
Peter
On 5.12.2014 20:42, Daniel Haviv wrote:
> Try using screen
>
> Daniel
>
> On 5 בדצמ׳ 2014, at 19:08, peterm_second <regestrer@gmail.com
> <ma...@gmail.com>> wrote:
>
>> yes,
>> I've tried nohup , & even sh -c .
>> & works but after the first call get's executed in the background I
>> get the message you can see when a hadoop job is submitted to the
>> cluster and then the terminal get's frozen. I think the problem is in
>> the ext/hiveserver2.sh:hiveserver2 function. it's says something
>> along the lines of
>> *exec $HADOOP jar $JAR $CLASS $HIVE_OPTS "$@" *
>> I am not 100% how the exec command works , but somehow it re-owns the
>> launching terminal. My problem is aggravated by the fact that I am
>> launching hive using sshpass
>>
>> Peter
>>
>> On 5.12.2014 18:55, Jörn Franke wrote:
>>>
>>> Have you tried nohup ?
>>>
>>> Le 5 déc. 2014 15:25, "peterm_second" <regestrer@gmail.com
>>> <ma...@gmail.com>> a écrit :
>>>
>>> Hi Guys,
>>> How can I launch the Hiveserver2 as a daemon.
>>> I am launching the hiverserv2 using sshpass and I can't detach
>>> hiveserver2 from my terminal. Is there a way to deamonise the
>>> hiveserver2 ?
>>>
>>> I've also tried using & but it's not working either, any thoughts ?
>>>
>>> Regards,
>>> Peter
>>>
>>
Re: Start hiveserver2 as a daemon
Posted by Daniel Haviv <da...@veracity-group.com>.
Try using screen
Daniel
> On 5 בדצמ׳ 2014, at 19:08, peterm_second <re...@gmail.com> wrote:
>
> yes,
> I've tried nohup , & even sh -c .
> & works but after the first call get's executed in the background I get the message you can see when a hadoop job is submitted to the cluster and then the terminal get's frozen. I think the problem is in the ext/hiveserver2.sh:hiveserver2 function. it's says something along the lines of
> exec $HADOOP jar $JAR $CLASS $HIVE_OPTS "$@"
> I am not 100% how the exec command works , but somehow it re-owns the launching terminal. My problem is aggravated by the fact that I am launching hive using sshpass
>
> Peter
>
>> On 5.12.2014 18:55, Jörn Franke wrote:
>> Have you tried nohup ?
>>
>> Le 5 déc. 2014 15:25, "peterm_second" <re...@gmail.com> a écrit :
>>> Hi Guys,
>>> How can I launch the Hiveserver2 as a daemon.
>>> I am launching the hiverserv2 using sshpass and I can't detach hiveserver2 from my terminal. Is there a way to deamonise the hiveserver2 ?
>>>
>>> I've also tried using & but it's not working either, any thoughts ?
>>>
>>> Regards,
>>> Peter
>
Re: Start hiveserver2 as a daemon
Posted by peterm_second <re...@gmail.com>.
yes,
I've tried nohup , & even sh -c .
& works but after the first call get's executed in the background I get
the message you can see when a hadoop job is submitted to the cluster
and then the terminal get's frozen. I think the problem is in the
ext/hiveserver2.sh:hiveserver2 function. it's says something along the
lines of
*exec $HADOOP jar $JAR $CLASS $HIVE_OPTS "$@" *
I am not 100% how the exec command works , but somehow it re-owns the
launching terminal. My problem is aggravated by the fact that I am
launching hive using sshpass
Peter
On 5.12.2014 18:55, Jörn Franke wrote:
>
> Have you tried nohup ?
>
> Le 5 déc. 2014 15:25, "peterm_second" <regestrer@gmail.com
> <ma...@gmail.com>> a écrit :
>
> Hi Guys,
> How can I launch the Hiveserver2 as a daemon.
> I am launching the hiverserv2 using sshpass and I can't detach
> hiveserver2 from my terminal. Is there a way to deamonise the
> hiveserver2 ?
>
> I've also tried using & but it's not working either, any thoughts ?
>
> Regards,
> Peter
>
Re: Start hiveserver2 as a daemon
Posted by Jörn Franke <jo...@gmail.com>.
Have you tried nohup ?
Le 5 déc. 2014 15:25, "peterm_second" <re...@gmail.com> a écrit :
> Hi Guys,
> How can I launch the Hiveserver2 as a daemon.
> I am launching the hiverserv2 using sshpass and I can't detach hiveserver2
> from my terminal. Is there a way to deamonise the hiveserver2 ?
>
> I've also tried using & but it's not working either, any thoughts ?
>
> Regards,
> Peter
>