Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

hue configuration error non cloudera installation

avatar

I've installed hue 3.9.1 on virtualbox hadoop 1.2.1.
I've followed below links for configuration.
http://gethue.com/how-to-build-hue-on-ubuntu-14-04-trusty/

http://gethue.com/how-to-configure-hue-in-your-hadoop-cluster/

 

I've not uncomment lines starts with ## as it stands for default values.

 

HDFS (file browser) working perfectly.
Do i need to install hive explicitly?

please help me how to configure properly.

 

I found installation manual table 2 dependencies.

Do i need to install these things in order run hive and other components?
http://cloudera.github.io/hue/docs-3.9.0/manual.html 

 

please see screnshots for errors.

http://screencast.com/t/FcMfRlSyR

http://screencast.com/t/tcAhaDDecxW

2 ACCEPTED SOLUTIONS

avatar
Super Guru
It seems like it does not like the 'STORED AS TextFile'

Does a simple

CREATE TABLE `sample_07` ( `code` string , `description` string ,
`total_emp` int , `salary` int )

work?

Romain

View solution in original post

avatar

Hurray guys 🙂

 


Now i've configured hive 1.0.1.
There is no longer error when i execute queries with "STORED AS TEXTFILE" in hive editor. And also successfully loaded hive sample tables.

But when hue is not running i can  access hive in terminal.

But when hue is running i can not access hive in terminal.
It shows following exceptions
 ERROR XSDB6: Another instance of Derby may have already booted the database /home/dhruv/metastore_db.

java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:derby:;databaseName=metastore_db;create=true, username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Failed to start database 'metastore_db' with class loader sun.misc.Launcher$AppClassLoader@1137792, see the next exception for details.

 

 

Is it ok with hue as it is accessing same instance?
Do i need to change any configuration so that both can work simultaneously ?
 
  

View solution in original post

8 REPLIES 8

avatar
Super Guru
Yes, you need to install HiveServer2 (and if not on the same host as Hue,
change the hive_server_host
https://github.com/cloudera/hue/blob/master/desktop/conf.dist/hue.ini#L699

About HDFS it looks good, just Hue is expecting / to be owned by the 'hdfs'
user which is also traditionally the HDFS superuser.
If 'hdfs' is not the super use just update
https://github.com/cloudera/hue/blob/master/desktop/conf.dist/hue.ini#L63
or you can ignore it for now.

Romain

avatar

Thank you.
There is no longer hdfs and hive related errors now on quick configuration page.

hive works on terminal nicely but when i try to load sample data is shows me error as below.


Could not install table: Error creating table sample_07: Bad status for request TExecuteStatementReq(confOverlay={}, sessionHandle=TSessionHandle(sessionId=THandleIdentifier(secret='\xc6\xd5\xb4\x7f\xbe\xe3L\x16\xb1C\x9e\xf3\xbe\xde\xb3K', guid='$\xaa|L\xa4:AH\x90\x14\xfd\x0f\xb7\xa9\x89\xde')), runAsync=True, statement="CREATE TABLE `sample_07` (\n `code` string ,\n `description` string ,\n `total_emp` int ,\n `salary` int )\nROW FORMAT DELIMITED\n FIELDS TERMINATED BY '\t'\nSTORED AS TextFile"): TExecuteStatementResp(status=TStatus(errorCode=None, errorMessage="java.lang.AssertionError: Unknown token: [@-1,0:0='TOK_FILEFORMAT_GENERIC',<679>,0:-1]", sqlState=None, infoMessages=["*java.lang.RuntimeException:java.lang.AssertionError: Unknown token: [@-1,0:0='TOK_FILEFORMAT_GENERIC',<679>,0:-1]:19:18", 'org.apache.hive.service.cli.session.HiveSessionProxy:invoke:HiveSessionProxy.java:83', 'org.apache.hive.service.cli.session.HiveSessionProxy:access$000:HiveSessionProxy.java:36', 'org.apache.hive.service.cli.session.HiveSessionProxy$1:run:HiveSessionProxy.java:63', 'java.security.AccessController:doPrivileged:AccessController.java:-2', 'javax.security.auth.Subject:doAs:Subject.java:415', 'org.apache.hadoop.security.UserGroupInformation:doAs:UserGroupInformation.java:1190', 'org.apache.hive.service.cli.session.HiveSessionProxy:invoke:HiveSessionProxy.java:59', 'com.sun.proxy.$Proxy15:executeStatementAsync::-1', 'org.apache.hive.service.cli.CLIService:executeStatementAsync:CLIService.java:271', 'org.apache.hive.service.cli.thrift.ThriftCLIService:ExecuteStatement:ThriftCLIService.java:415', 'org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement:getResult:TCLIService.java:1313', 

 

On terminal it shows me FAILED: SemanticException [Error 10001]: Table not found default.sample_07.

 

I've started hive server as it is not started automatically.

$HIVE_HOME/bin/hive --service hiveserver2 &

I've used hive 1.1.1.

You have tested with hive 1.1

http://cloudera.github.io/hue/docs-3.9.0/release-notes/release-notes-3.9.0.html

 

DO i need to set hive-site.xml url theere is no hive-site.xml as in terminal it works nicely ?
Do i need to configure other components like impala,oozie etc ? 

Do you want to see my pseudo-distributed.ini ?
Please help me. 

 

avatar
Super Guru
It seems like it does not like the 'STORED AS TextFile'

Does a simple

CREATE TABLE `sample_07` ( `code` string , `description` string ,
`total_emp` int , `salary` int )

work?

Romain

avatar

It gives me error "database is locked".

avatar
Rising Star

if it is a VM and you are doing practice then follow below tasks


Assumption: You are using SQLITE and not configured Hue with external database


 

fuser /var/lib/hue/desktop.db

 

It will give process id.

 

kill -9 processid

Note: database location may vary based on your configuration

avatar

Capture.PNG

 

 

 

avatar

Hi
romain

You are right. I've configured hive-site.xml & hive-env.sh. Now i can run create table quiries but without "STORED AS TEXTFILE".

This query works fine.
create table employee (eid int, name String,salary String, destination String) row format delimited fields terminated by ',';


I think some one has already opened this issue for hive 1.1.1.
https://issues.apache.org/jira/browse/HIVE-10831

 

With stored as text file clause i got this error.


hive error.PNG 

However i got same error as i told earlier when i try to load sample hive tables.

http://screencast.com/t/gzmo3sceM

Should i use hive 1.0.1 or lower instead of 1.1.1 ? 

Please tell me how can i fix this issue.

 

avatar

Hurray guys 🙂

 


Now i've configured hive 1.0.1.
There is no longer error when i execute queries with "STORED AS TEXTFILE" in hive editor. And also successfully loaded hive sample tables.

But when hue is not running i can  access hive in terminal.

But when hue is running i can not access hive in terminal.
It shows following exceptions
 ERROR XSDB6: Another instance of Derby may have already booted the database /home/dhruv/metastore_db.

java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:derby:;databaseName=metastore_db;create=true, username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Failed to start database 'metastore_db' with class loader sun.misc.Launcher$AppClassLoader@1137792, see the next exception for details.

 

 

Is it ok with hue as it is accessing same instance?
Do i need to change any configuration so that both can work simultaneously ?