Re: error when beeline connecting to hiveserver2

2018-04-23 Thread 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?


error when beeline connecting to hiveserver2

2018-04-23 Thread 侯宗田
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?

org.apache.hadoop.hive.ql.metadata.HiveMetaStoreClientFactory

2018-04-23 Thread Elliot West
Hello,

I'm looking for an abstraction to use for integrating with different
(non-Thrift) metadata catalog implementations. I know that AWS Glue manages
this and so have explored in EMR (Hive 2.3.2) a little. I see that it uses
the "org.apache.hadoop.hive.ql.metadata.HiveMetaStoreClientFactory"
interface to do this. However, I cannot find this class anywhere in vanilla
Apache Hive.

Is this an Amazon specific construct (if so then why is it namespaced to
org.apache.hadoop.hive?) or are my code searching abilities failing me.
Does this class exist in Apache Hive, and if so, where? (A link in GitHub
would be appreciated).

Cheers,

Elliot.


Re: Does Hive support Hbase-synced partitioned tables?

2018-04-23 Thread Oleksiy S
Thanks for answer Furcy.

On Sun, Apr 22, 2018 at 8:59 PM, Furcy Pin  wrote:

> Hi Oleksiy,
>
> I must say that I don't know if partitioned HBase-backed tables are
> supported in Hive, but I don't understand why you would need it. What are
> you trying to do exactly? I suspect that you could do it by using composite
> keys (Department, doc_id).
>
>
> Also, I would advise against using multiple column families for the
> example you are describing. I don't think it would lead to better
> performances.
>
> Hope this helps,
>
> Furcy
>
>
> On Sun, 22 Apr 2018, 14:06 Oleksiy S, 
> wrote:
>
>> Any updates?
>>
>> On Fri, Apr 20, 2018 at 10:54 AM, Oleksiy S <
>> osayankin.superu...@gmail.com> wrote:
>>
>>> Hi all.
>>>
>>> I can create following table
>>>
>>> create table hbase_partitioned(doc_id STRING, EmployeeID Int, FirstName
>>> String, Designation  String, Salary Int) PARTITIONED BY (Department String)
>>> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH
>>> SERDEPROPERTIES ("hbase.columns.mapping" = ":key,boolsCF:EmployeeID,
>>> intsCF:FirstName,intsCF:Designation,intsCF:Salary") TBLPROPERTIES("
>>> hbase.table.name" = "hbase_partitioned");
>>>
>>>
>>> But when I want to insert data, I have an exception. Is it expected
>>> behavior?
>>>
>>> INSERT INTO TABLE hbase_partitioned PARTITION(department='A') values
>>> ('1', 1, 'John Connor', 'New York', 2300),
>>> ('2', 2, 'Max Plank', 'Las Vegas', 1300),
>>> ('3', 3, 'Arni Shwarz', 'Los Angelos', 7700),
>>> ('4', 4, 'Sarah Connor', 'Oakland', 9700);
>>>
>>>
>>>
>>> WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in
>>> the future versions. Consider using a different execution engine (i.e.
>>> spark, tez) or using Hive 1.X releases.
>>> Query ID = mapr_20180420074356_b13d8652-1ff6-4fe1-975c-7318db6037de
>>> Total jobs = 3
>>> Launching Job 1 out of 3
>>> Number of reduce tasks is set to 0 since there's no reduce operator
>>> java.io.IOException: org.apache.hadoop.hive.ql.metadata.HiveException:
>>> java.lang.IllegalArgumentException: Must specify table name
>>> at org.apache.hadoop.hive.ql.exec.FileSinkOperator.checkOutputSpecs(
>>> FileSinkOperator.java:1136)
>>> at org.apache.hadoop.hive.ql.io.HiveOutputFormatImpl.checkOutputSpecs(
>>> HiveOutputFormatImpl.java:67)
>>> at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(
>>> JobSubmitter.java:271)
>>> at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(
>>> JobSubmitter.java:142)
>>> at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1290)
>>> at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1287)
>>> at java.security.AccessController.doPrivileged(Native Method)
>>> at javax.security.auth.Subject.doAs(Subject.java:422)
>>> at org.apache.hadoop.security.UserGroupInformation.doAs(
>>> UserGroupInformation.java:1595)
>>> at org.apache.hadoop.mapreduce.Job.submit(Job.java:1287)
>>> at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:575)
>>> at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:570)
>>> at java.security.AccessController.doPrivileged(Native Method)
>>> at javax.security.auth.Subject.doAs(Subject.java:422)
>>> at org.apache.hadoop.security.UserGroupInformation.doAs(
>>> UserGroupInformation.java:1595)
>>> at org.apache.hadoop.mapred.JobClient.submitJobInternal(
>>> JobClient.java:570)
>>> at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:561)
>>> at org.apache.hadoop.hive.ql.exec.mr.ExecDriver.execute(
>>> ExecDriver.java:434)
>>> at org.apache.hadoop.hive.ql.exec.mr.MapRedTask.execute(
>>> MapRedTask.java:138)
>>> at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:197)
>>> at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(
>>> TaskRunner.java:100)
>>> at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2074)
>>> at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1745)
>>> at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1454)
>>> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1172)
>>> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1162)
>>> at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(
>>> CliDriver.java:238)
>>> at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:186)
>>> at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:405)
>>> at org.apache.hadoop.hive.cli.CliDriver.executeDriver(
>>> CliDriver.java:791)
>>> at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:729)
>>> at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:652)
>>> at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:647)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke(
>>> NativeMethodAccessorImpl.java:62)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>> DelegatingMethodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:498)
>>> at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
>>> at