[no subject]

2018-04-25 Thread wang wei
Hi,all
 Did hive support execute history command like shell(use number like !10)?

And I find beeline not support this:

! 


Executes a shell command from the Hive shell.

All of command with ! prefix will be SQLLine CLI command,I think it's a very 
useful command.


Re: error when beeline connecting to hiveserver2

2018-04-25 Thread 侯宗田
Hi, Antal

Thank you, I have followed some web guide and set hive2 transport mode to http, 
then the port number become 10001. I changed it back and set the proxy username 
in hdfs and it worked.

Regards,
Hou
> 在 2018年4月25日,下午6:23,Antal Sinkovits  写道:
> 
> Hi,
> 
> First of all, I would check if the HiveServer2 is running, and listens on the 
> given port.
> 
> E.g:
> lsof -i -P |grep java
> 
> You should see something like:
> java  33169 asinkovits  349u  IPv6 0x  0t0  TCP 
> *:1 (LISTEN)
> java  33169 asinkovits  350u  IPv6 0x  0t0  TCP 
> *:10002 (LISTEN)
> 
> If it does, try
> beeline -u jdbc:hive2://localhost:1
> 
> Regards,
> Antal
> 
> 
> On Tue, Apr 24, 2018 at 10:19 AM, 侯宗田  > wrote:
> Thank you very much for your reply, I have changed the port number and set 
> the thrift.bind.host to localhost. But I still get the error, do you have 
> some ideas about this?
> 
> beeline> !connect jdbc:hive2://localhost:1 <> anonymous anonymous
> Connecting to jdbc:hive2://localhost:1 <>
> /04/24 16:13:59 [main]: WARN jdbc.HiveConnection: Failed to connect to 
> localhost:1
> Could not open connection to the HS2 server. Please check the server URI and 
> if the URI is correct, then ask the administrator to check the server status.
> Error: Could not open client transport with JDBC Uri: 
> jdbc:hive2://localhost:1: <> java.net.ConnectException: Connection 
> refused (Connection refused) (state=08S01,code=0)
> 
>> 在 2018年4月24日,上午1:55,Johannes Alberti > > 写道:
>> 
>> You should connect by default to 1, the webui port is not the port 
>> beeline connects with. Regards, Johannes
>> 
>> Sent from my iPhone
>> 
>> On Apr 23, 2018, at 6:38 AM, 侯宗田 > > wrote:
>> 
>>> Hi,
>>> 
>>> I have started hiveserver2 and try to connect it with beeline using the 
>>> following command:
>>> >!connect jdbc:hive2://localhost:10002/default <>
>>> 
>>> But get the following error
>>> 
>>> WARN jdbc.HiveConnection: Failed to connect to localhost:10002
>>> Unknown HS2 problem when communicating with Thrift server.
>>> Error: Could not open client transport with JDBC Uri: 
>>> jdbc:hive2://localhost:10002/default: <> Invalid status 72 
>>> (state=08S01,code=0)
>>> beeline>
>>> 
>>> I have set the webUI port to 10002 and mode as http, do I still lost 
>>> something? 
>>> Does anyone know what is the problem and how to solve it?
> 
> 



Re: error when beeline connecting to hiveserver2

2018-04-25 Thread Antal Sinkovits
Hi,


First of all, I would check if the HiveServer2 is running, and listens on
the given port.


E.g:

lsof -i -P |grep java


You should see something like:

java  33169 asinkovits  349u  IPv6 0x  0t0  TCP
*:1 (LISTEN)

java  33169 asinkovits  350u  IPv6 0x  0t0  TCP
*:10002 (LISTEN)

If it does, try

beeline -u jdbc:hive2://localhost:1

Regards,
Antal


On Tue, Apr 24, 2018 at 10:19 AM, 侯宗田  wrote:

> Thank you very much for your reply, I have changed the port number and set
> the thrift.bind.host to localhost. But I still get the error, do you have
> some ideas about this?
>
> beeline> !connect jdbc:hive2://localhost:1 anonymous anonymous
> Connecting to jdbc:hive2://localhost:1
> /04/24 16:13:59 [main]: WARN jdbc.HiveConnection: Failed to connect to
> localhost:1
> Could not open connection to the HS2 server. Please check the server URI
> and if the URI is correct, then ask the administrator to check the server
> status.
> Error: Could not open client transport with JDBC Uri: jdbc:
> hive2://localhost:1: java.net.ConnectException: Connection refused
> (Connection refused) (state=08S01,code=0)
>
> 在 2018年4月24日,上午1:55,Johannes Alberti  写道:
>
> You should connect by default to 1, the webui port is not the port
> beeline connects with. Regards, Johannes
>
> Sent from my iPhone
>
> On Apr 23, 2018, at 6:38 AM, 侯宗田  wrote:
>
> Hi,
>
> I have started hiveserver2 and try to connect it with beeline using the
> following command:
> >!connect jdbc:hive2://localhost:10002/default
>
> But get the following error
>
> WARN jdbc.HiveConnection: Failed to connect to localhost:10002
> Unknown HS2 problem when communicating with Thrift server.
> Error: Could not open client transport with JDBC Uri: jdbc:
> hive2://localhost:10002/default: Invalid status 72 (state=08S01,code=0)
> beeline>
>
> I have set the webUI port to 10002 and mode as http, do I still lost
> something?
> Does anyone know what is the problem and how to solve it?
>
>
>