Permissions preventing me from inserting data into table I have just created

2012-11-26 Thread yaboulna

Hello,

I'm using Cloudera's CDH4 with Hive 0.9 and Hive Server 2. I am trying  
to load data into hive using the JDBC driver (the one distributed with  
Cloudera CDH4 org.apache.hive.jdbc.HiveDriver. I can create the  
staging table and LOAD LOCAL into it. However when I try to insert  
data into a table with Columnar SerDe Stored As RCFILE I get an error  
caused by file permissions. I don't think that the SerDE or the Stored  
as parameters have anything to do with the problem but I mentioned  
them for completeness. The problem is that hive creates a temporary  
file in its scratch folder (local) owned by hive:hive with permissions  
755, then pass it as an input to a mapper running as the user  
mapred:mapred. Now the mapper tries to create something inside the  
input folder (probably can do this elsewhere), and the following  
exception is thrown:


org.apache.hadoop.hive.ql.metadata.HiveException: java.io.IOException:  
Mkdirs failed to create  
file:/home/yaboulnaga/tmp/hive-scratch/hive_2012-11-26_10-46-44_887_2004468370569495405/_task_tmp.-ext-10002
	at  
org.apache.hadoop.hive.ql.io.HiveFileFormatUtils.getHiveRecordWriter(HiveFileFormatUtils.java:237)
	at  
org.apache.hadoop.hive.ql.exec.FileSinkOperator.createBucketFiles(FileSinkOperator.java:477)
	at  
org.apache.hadoop.hive.ql.exec.FileSinkOperator.closeOp(FileSinkOperator.java:709)

at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:557)
at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:566)
at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:566)
at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:566)
at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:566)
at org.apache.hadoop.hive.ql.exec.ExecMapper.close(ExecMapper.java:193)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:57)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:393)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:327)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
	at  
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1332)

at org.apache.hadoop.mapred.Child.main(Child.java:262)


As you might have noticed, I moved the scrach folder to a directory  
under my home dir so that I can give this directory 777 permissions.  
The idea was to use hive.files.umask.value of  to cause  
subdirectories to inherit the same open permission (not the best  
workaround, but wouldn't hurt on my local machine). Unfortunately this  
didn't work even when I added a umask  to /etc/init.d/hiveserver2.  
Can someone please tell me what's the right way to do this? I mean  
create a table and then insert values into it! The Hive QL statements  
I use are very similar to the ones in the tutorials about loading data.


Cheers!
-- Younos





Re: Permissions preventing me from inserting data into table I have just created

2012-11-26 Thread Tim Havens
make sure :/home/yaboulnaga/tmp/**hive-scratch/ is writeable by your
processes.


On Mon, Nov 26, 2012 at 10:07 AM, yabou...@uwaterloo.ca wrote:

 Hello,

 I'm using Cloudera's CDH4 with Hive 0.9 and Hive Server 2. I am trying to
 load data into hive using the JDBC driver (the one distributed with
 Cloudera CDH4 org.apache.hive.jdbc.**HiveDriver. I can create the
 staging table and LOAD LOCAL into it. However when I try to insert data
 into a table with Columnar SerDe Stored As RCFILE I get an error caused by
 file permissions. I don't think that the SerDE or the Stored as parameters
 have anything to do with the problem but I mentioned them for completeness.
 The problem is that hive creates a temporary file in its scratch folder
 (local) owned by hive:hive with permissions 755, then pass it as an input
 to a mapper running as the user mapred:mapred. Now the mapper tries to
 create something inside the input folder (probably can do this elsewhere),
 and the following exception is thrown:

 org.apache.hadoop.hive.ql.**metadata.HiveException: java.io.IOException:
 Mkdirs failed to create file:/home/yaboulnaga/tmp/**
 hive-scratch/hive_2012-11-26_**10-46-44_887_**
 2004468370569495405/_task_tmp.**-ext-10002
 at org.apache.hadoop.hive.ql.io.**HiveFileFormatUtils.**
 getHiveRecordWriter(**HiveFileFormatUtils.java:237)
 at org.apache.hadoop.hive.ql.**exec.FileSinkOperator.**
 createBucketFiles(**FileSinkOperator.java:477)
 at org.apache.hadoop.hive.ql.**exec.FileSinkOperator.closeOp(**
 FileSinkOperator.java:709)
 at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
 java:557)
 at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
 java:566)
 at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
 java:566)
 at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
 java:566)
 at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
 java:566)
 at org.apache.hadoop.hive.ql.**exec.ExecMapper.close(**
 ExecMapper.java:193)
 at org.apache.hadoop.mapred.**MapRunner.run(MapRunner.java:**57)
 at org.apache.hadoop.mapred.**MapTask.runOldMapper(MapTask.**
 java:393)
 at org.apache.hadoop.mapred.**MapTask.run(MapTask.java:327)
 at org.apache.hadoop.mapred.**Child$4.run(Child.java:268)
 at java.security.**AccessController.doPrivileged(**Native Method)
 at javax.security.auth.Subject.**doAs(Subject.java:396)
 at org.apache.hadoop.security.**UserGroupInformation.doAs(**
 UserGroupInformation.java:**1332)
 at org.apache.hadoop.mapred.**Child.main(Child.java:262)


 As you might have noticed, I moved the scrach folder to a directory under
 my home dir so that I can give this directory 777 permissions. The idea was
 to use hive.files.umask.value of  to cause subdirectories to inherit
 the same open permission (not the best workaround, but wouldn't hurt on my
 local machine). Unfortunately this didn't work even when I added a umask
  to /etc/init.d/hiveserver2. Can someone please tell me what's the
 right way to do this? I mean create a table and then insert values into it!
 The Hive QL statements I use are very similar to the ones in the tutorials
 about loading data.

 Cheers!
 -- Younos






-- 
The whole world is you. Yet you keep thinking there is something else. -
Xuefeng Yicun 822-902 A.D.

Tim R. Havens
Google Phone: 573.454.1232
ICQ: 495992798
ICBM:  37°51'34.79N   90°35'24.35W
ham radio callsign: NW0W


Re: Permissions preventing me from inserting data into table I have just created

2012-11-26 Thread yaboulna
Thanks for the reply Tim. It is writable to all (permission 777). As a  
side note, I have discovered now that the mapreduce task spawned by  
the RCFileOutputDriver is setting mapred.output.dir to a folder under  
file:// regardrless of the fs.default.name. This might be expected  
beahviour, but I just wanted to note it.


Quoting Tim Havens timhav...@gmail.com:


make sure :/home/yaboulnaga/tmp/**hive-scratch/ is writeable by your
processes.


On Mon, Nov 26, 2012 at 10:07 AM, yabou...@uwaterloo.ca wrote:


Hello,

I'm using Cloudera's CDH4 with Hive 0.9 and Hive Server 2. I am trying to
load data into hive using the JDBC driver (the one distributed with
Cloudera CDH4 org.apache.hive.jdbc.**HiveDriver. I can create the
staging table and LOAD LOCAL into it. However when I try to insert data
into a table with Columnar SerDe Stored As RCFILE I get an error caused by
file permissions. I don't think that the SerDE or the Stored as parameters
have anything to do with the problem but I mentioned them for completeness.
The problem is that hive creates a temporary file in its scratch folder
(local) owned by hive:hive with permissions 755, then pass it as an input
to a mapper running as the user mapred:mapred. Now the mapper tries to
create something inside the input folder (probably can do this elsewhere),
and the following exception is thrown:

org.apache.hadoop.hive.ql.**metadata.HiveException: java.io.IOException:
Mkdirs failed to create file:/home/yaboulnaga/tmp/**
hive-scratch/hive_2012-11-26_**10-46-44_887_**
2004468370569495405/_task_tmp.**-ext-10002
at org.apache.hadoop.hive.ql.io.**HiveFileFormatUtils.**
getHiveRecordWriter(**HiveFileFormatUtils.java:237)
at org.apache.hadoop.hive.ql.**exec.FileSinkOperator.**
createBucketFiles(**FileSinkOperator.java:477)
at org.apache.hadoop.hive.ql.**exec.FileSinkOperator.closeOp(**
FileSinkOperator.java:709)
at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
java:557)
at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
java:566)
at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
java:566)
at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
java:566)
at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
java:566)
at org.apache.hadoop.hive.ql.**exec.ExecMapper.close(**
ExecMapper.java:193)
at org.apache.hadoop.mapred.**MapRunner.run(MapRunner.java:**57)
at org.apache.hadoop.mapred.**MapTask.runOldMapper(MapTask.**
java:393)
at org.apache.hadoop.mapred.**MapTask.run(MapTask.java:327)
at org.apache.hadoop.mapred.**Child$4.run(Child.java:268)
at java.security.**AccessController.doPrivileged(**Native Method)
at javax.security.auth.Subject.**doAs(Subject.java:396)
at org.apache.hadoop.security.**UserGroupInformation.doAs(**
UserGroupInformation.java:**1332)
at org.apache.hadoop.mapred.**Child.main(Child.java:262)


As you might have noticed, I moved the scrach folder to a directory under
my home dir so that I can give this directory 777 permissions. The idea was
to use hive.files.umask.value of  to cause subdirectories to inherit
the same open permission (not the best workaround, but wouldn't hurt on my
local machine). Unfortunately this didn't work even when I added a umask
 to /etc/init.d/hiveserver2. Can someone please tell me what's the
right way to do this? I mean create a table and then insert values into it!
The Hive QL statements I use are very similar to the ones in the tutorials
about loading data.

Cheers!
-- Younos







--
The whole world is you. Yet you keep thinking there is something else. -
Xuefeng Yicun 822-902 A.D.

Tim R. Havens
Google Phone: 573.454.1232
ICQ: 495992798
ICBM:  37°51'34.79N   90°35'24.35W
ham radio callsign: NW0W





Best regards,
Younos Aboulnaga

Masters candidate
David Cheriton school of computer science
University of Waterloo
http://cs.uwaterloo.ca

E-Mail: younos.abouln...@uwaterloo.ca
Mobile: +1 (519) 497-5669




Setting auxpath in Hue/Beeswax

2012-11-26 Thread Sadananda Hegde
Hello,



I have copied jar file into /usr/lib/hive/lib folder on all the nodes. I am
able to use it on Hive CLI with the command



hive --auxpath /usr/lib/hive/lib/jarfile



Then I am able to run my Hive SQLs successfully.



But the same queries fail to  run in Hue/Beeswax. It's not finding the jar
file.



I tried setting hive.aux.jars.path property in hive-site.xml on all nodes.
I have also tried setting that property in  Beeswax Server Hive
Configuration Safety Valve of Cloudera Manager. But still not able to
resolve the issue.



How do I make it work in Hue / Beeswax? Is there a way to set the --auxpath
there?


I am running hive 0.7.1 on CDH3U5 ( hue-1.2.0.0+114.35-1)


Thanks for your help.


Regards,

Sadu Hegde
*
*


Re: Setting auxpath in Hue/Beeswax

2012-11-26 Thread Shreepadma Venugopalan
Hi Sadu,

Can you please post this on the CDH forum?

Thanks.
Shreepadma


On Mon, Nov 26, 2012 at 10:51 AM, Sadananda Hegde saduhe...@gmail.comwrote:

 Hello,



 I have copied jar file into /usr/lib/hive/lib folder on all the nodes. I
 am able to use it on Hive CLI with the command



 hive --auxpath /usr/lib/hive/lib/jarfile



 Then I am able to run my Hive SQLs successfully.



 But the same queries fail to  run in Hue/Beeswax. It's not finding the jar
 file.



 I tried setting hive.aux.jars.path property in hive-site.xml on all nodes.
 I have also tried setting that property in  Beeswax Server Hive
 Configuration Safety Valve of Cloudera Manager. But still not able to
 resolve the issue.



 How do I make it work in Hue / Beeswax? Is there a way to set the
 --auxpath there?


 I am running hive 0.7.1 on CDH3U5 ( hue-1.2.0.0+114.35-1)


 Thanks for your help.


 Regards,

 Sadu Hegde
 *
 *



Re: Setting auxpath in Hue/Beeswax

2012-11-26 Thread Edward Capriolo
You are looking for support in the wrong place. Beeswacks is not a part of
hive thus only the cloudera folks will support it.

On Mon, Nov 26, 2012 at 1:51 PM, Sadananda Hegde saduhe...@gmail.comwrote:

 Hello,



 I have copied jar file into /usr/lib/hive/lib folder on all the nodes. I
 am able to use it on Hive CLI with the command



 hive --auxpath /usr/lib/hive/lib/jarfile



 Then I am able to run my Hive SQLs successfully.



 But the same queries fail to  run in Hue/Beeswax. It's not finding the jar
 file.



 I tried setting hive.aux.jars.path property in hive-site.xml on all nodes.
 I have also tried setting that property in  Beeswax Server Hive
 Configuration Safety Valve of Cloudera Manager. But still not able to
 resolve the issue.



 How do I make it work in Hue / Beeswax? Is there a way to set the
 --auxpath there?


 I am running hive 0.7.1 on CDH3U5 ( hue-1.2.0.0+114.35-1)


 Thanks for your help.


 Regards,

 Sadu Hegde
 *
 *



RE: Setting auxpath in Hue/Beeswax

2012-11-26 Thread Connell, Chuck
I believe there are some free Cloudera discussion boards/lists. Standard 
Cloudera support is a paid service.

Chuck Connell
Nuance RD Data Team
Burlington, MA


From: Sadananda Hegde [mailto:saduhe...@gmail.com]
Sent: Monday, November 26, 2012 2:42 PM
To: user@hive.apache.org
Subject: Re: Setting auxpath in Hue/Beeswax

Thanks, Edward,  I will contact Cloudera support then.

Sadu
On Mon, Nov 26, 2012 at 1:34 PM, Edward Capriolo 
edlinuxg...@gmail.commailto:edlinuxg...@gmail.com wrote:
You are looking for support in the wrong place. Beeswacks is not a part of hive 
thus only the cloudera folks will support it.

On Mon, Nov 26, 2012 at 1:51 PM, Sadananda Hegde 
saduhe...@gmail.commailto:saduhe...@gmail.com wrote:
Hello,

I have copied jar file into /usr/lib/hive/lib folder on all the nodes. I am 
able to use it on Hive CLI with the command

hive --auxpath /usr/lib/hive/lib/jarfile

Then I am able to run my Hive SQLs successfully.

But the same queries fail to  run in Hue/Beeswax. It's not finding the jar file.

I tried setting hive.aux.jars.path property in hive-site.xml on all nodes. I 
have also tried setting that property in  Beeswax Server Hive Configuration 
Safety Valve of Cloudera Manager. But still not able to resolve the issue.

How do I make it work in Hue / Beeswax? Is there a way to set the --auxpath 
there?

I am running hive 0.7.1 on CDH3U5 ( hue-1.2.0.0+114.35-1)

Thanks for your help.

Regards,
Sadu Hegde





Re: Custom hive-site.xml is ignored, how to find out why

2012-11-26 Thread Shreepadma Venugopalan
Hi Stephen,

If you wish to setup a mysql metastore, you need to have the following in
your hive-site.xml,

property
  namejavax.jdo.option.ConnectionURL/name
  valuejdbc:mysql://MYHOST/metastore/value
/property

property
  namejavax.jdo.option.ConnectionDriverName/name
  valuecom.mysql.jdbc.Driver/value
/property

property
  namejavax.jdo.option.ConnectionUserName/name
  valuehiveuser/value
/property

property
  namejavax.jdo.option.ConnectionPassword/name
  valuepassword/value
/property

property
  namedatanucleus.autoCreateSchema/name
  valuefalse/value
/property

property
  namedatanucleus.fixedDatastore/name
  valuetrue/value
/property


Thanks.
Shreepadma


On Sat, Nov 24, 2012 at 8:41 PM, Stephen Boesch java...@gmail.com wrote:

 It appears that I were missing the *hive.metastore.uris* parameter.  That
 one was not mentioned in the (several) blogs / tutorials that I had seen.


 2012/11/24 Stephen Boesch java...@gmail.com


 It seems the customized hive-site.xml is not being read. It lives under
 $HIVE_HOME/conf  ( which happens to be /shared/hive/conf).  I have tried
 everything there is to try:  set HIVE_CONF_DIR=/shared/hive/conf , added
 --config /shared/hive/conf  and added debugging to the hive shell script
 (bash -x) to ensure that the correct directory is actually getting used

 The properties inside hive-site.xml are getting ignored: originally set
 to using mysql , but instead the default derby is getting used. Then tried
 changing  hive.metastore.local between true and false: no difference in
 behavior - just going to /tmp/$USER for creating the derby no matter what.

 I wondered whether hive-site.xml maybe has a syntax error and were
 getting ignored: so removed everything except
 configuration/configuration:  still no

 This is the totally simplified hive-site.xml: it just has enough to try
 to see if it is actually being read/applied (and it is not..):


 steve@mithril:/shared/hive/conf$ cat hive-site.xml
 ?xml version=1.0?
 ?xml-stylesheet type=text/xsl href=configuration.xsl?

 configuration

 !-- Hive Execution Parameters --
 property
   namehive.metastore.local/name
   valuefalse/value
 /property

 property
 namehive.exec.scratchdir/name
 value/tmp/hive/hive-${user.name}/value
 descriptionScratch space for Hive jobs/description
 /property

 property
   namehive.hwi.war.file/name
   value/shared/hive/lib/hive-hwi-0.9.0.war/value
   descriptionThis is the WAR file with the jsp content for Hive Web
 Interface/description
 /property

 /configuration


 After running some DDL in hive, for example, no files are created
 underneath /tmp/hive  (instead they are going to /tmp/$USER which is
 default - as if the custom hive-site.xml never existed.






Re: Custom hive-site.xml is ignored, how to find out why

2012-11-26 Thread Stephen Boesch
Hi,
  The problem may not have to do with hive-site.xml.  When I run hive
client by itself it connects successfully to mysql and creates / reads
metadataa.

The problem comes in when i run the metastore/thrift servers via:   hive
--service metastore   hive --service hiveserver.   As soon as i do that,
and try to run hive client (hive cli) then it goes back to trying to use
derby.

There must be additional settings required for the hive metastore service
beyond those in my hive-site.xml.

Btw from OP i aleady have the settings in hive-site.xml for connecting via
jdo to mysql.I don't have the data nucleus ones. Are those required?
The docs i saw did not mention them.


2012/11/26 Shreepadma Venugopalan shreepa...@cloudera.com

 Hi Stephen,

 If you wish to setup a mysql metastore, you need to have the following in
 your hive-site.xml,

 property
namejavax.jdo.option.ConnectionURL/name
valuejdbc:mysql://MYHOST/metastore/value
  /property

 property
namejavax.jdo.option.ConnectionDriverName/name
valuecom.mysql.jdbc.Driver/value
  /property

 property
namejavax.jdo.option.ConnectionUserName/name
valuehiveuser/value
  /property

 property
namejavax.jdo.option.ConnectionPassword/name
valuepassword/value
  /property

 property
namedatanucleus.autoCreateSchema/name
valuefalse/value
  /property

 property
namedatanucleus.fixedDatastore/name
valuetrue/value
  /property


 Thanks.
 Shreepadma


 On Sat, Nov 24, 2012 at 8:41 PM, Stephen Boesch java...@gmail.com wrote:

 It appears that I were missing the *hive.metastore.uris* parameter.
  That one was not mentioned in the (several) blogs / tutorials that I had
 seen.


 2012/11/24 Stephen Boesch java...@gmail.com


 It seems the customized hive-site.xml is not being read. It lives under
 $HIVE_HOME/conf  ( which happens to be /shared/hive/conf).  I have tried
 everything there is to try:  set HIVE_CONF_DIR=/shared/hive/conf , added
 --config /shared/hive/conf  and added debugging to the hive shell script
 (bash -x) to ensure that the correct directory is actually getting used

 The properties inside hive-site.xml are getting ignored: originally set
 to using mysql , but instead the default derby is getting used. Then tried
 changing  hive.metastore.local between true and false: no difference in
 behavior - just going to /tmp/$USER for creating the derby no matter what.

 I wondered whether hive-site.xml maybe has a syntax error and were
 getting ignored: so removed everything except
 configuration/configuration:  still no

 This is the totally simplified hive-site.xml: it just has enough to try
 to see if it is actually being read/applied (and it is not..):


 steve@mithril:/shared/hive/conf$ cat hive-site.xml
 ?xml version=1.0?
 ?xml-stylesheet type=text/xsl href=configuration.xsl?

 configuration

 !-- Hive Execution Parameters --
 property
   namehive.metastore.local/name
   valuefalse/value
 /property

 property
 namehive.exec.scratchdir/name
 value/tmp/hive/hive-${user.name}/value
 descriptionScratch space for Hive jobs/description
 /property

 property
   namehive.hwi.war.file/name
   value/shared/hive/lib/hive-hwi-0.9.0.war/value
   descriptionThis is the WAR file with the jsp content for Hive Web
 Interface/description
 /property

 /configuration


 After running some DDL in hive, for example, no files are created
 underneath /tmp/hive  (instead they are going to /tmp/$USER which is
 default - as if the custom hive-site.xml never existed.







JDOFatalInternalException: Error creating transactional connection factory

2012-11-26 Thread Barak Yaish
Hi,



I’ve 2 nodes cluster of hadoop 1.0.4, and I’m trying making hive 0.90.0
works with it, so far no good. I was following the instructions listed here
https://cwiki.apache.org/confluence/display/Hive/GettingStarted, but when
trying to run any command in the shell, I’m getting:



FAILED: Error in metadata: javax.jdo.JDOFatalInternalException: Error
creating transactional connection factory

NestedThrowables:

java.lang.reflect.InvocationTargetException

FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.DDLTask



I didn’t change the default hive configuration, so I guess its working with
derby as metastore, and derby jar found in lib.



Can you please suggest ways to troubleshot this issue?



Thanks.


Re: Permissions preventing me from inserting data into table I have just created

2012-11-26 Thread yaboulna
I solved the problem by using a fully qualified path for  
hive.exec.scratchdir and then the umask trick worked. It turns out  
that hive was creating a different directory (on hdfs) than the one  
mapreduce was trying to write into, and that's why the umask didn't  
work. This remains a nasty workaround, and I wish someone would say  
how to do this right!


Quoting yabou...@uwaterloo.ca:

Thanks for the reply Tim. It is writable to all (permission 777). As  
a side note, I have discovered now that the mapreduce task spawned  
by the RCFileOutputDriver is setting mapred.output.dir to a folder  
under file:// regardrless of the fs.default.name. This might be  
expected beahviour, but I just wanted to note it.


Quoting Tim Havens timhav...@gmail.com:


make sure :/home/yaboulnaga/tmp/**hive-scratch/ is writeable by your
processes.


On Mon, Nov 26, 2012 at 10:07 AM, yabou...@uwaterloo.ca wrote:


Hello,

I'm using Cloudera's CDH4 with Hive 0.9 and Hive Server 2. I am trying to
load data into hive using the JDBC driver (the one distributed with
Cloudera CDH4 org.apache.hive.jdbc.**HiveDriver. I can create the
staging table and LOAD LOCAL into it. However when I try to insert data
into a table with Columnar SerDe Stored As RCFILE I get an error caused by
file permissions. I don't think that the SerDE or the Stored as parameters
have anything to do with the problem but I mentioned them for completeness.
The problem is that hive creates a temporary file in its scratch folder
(local) owned by hive:hive with permissions 755, then pass it as an input
to a mapper running as the user mapred:mapred. Now the mapper tries to
create something inside the input folder (probably can do this elsewhere),
and the following exception is thrown:

org.apache.hadoop.hive.ql.**metadata.HiveException: java.io.IOException:
Mkdirs failed to create file:/home/yaboulnaga/tmp/**
hive-scratch/hive_2012-11-26_**10-46-44_887_**
2004468370569495405/_task_tmp.**-ext-10002
   at org.apache.hadoop.hive.ql.io.**HiveFileFormatUtils.**
getHiveRecordWriter(**HiveFileFormatUtils.java:237)
   at org.apache.hadoop.hive.ql.**exec.FileSinkOperator.**
createBucketFiles(**FileSinkOperator.java:477)
   at org.apache.hadoop.hive.ql.**exec.FileSinkOperator.closeOp(**
FileSinkOperator.java:709)
   at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
java:557)
   at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
java:566)
   at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
java:566)
   at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
java:566)
   at org.apache.hadoop.hive.ql.**exec.Operator.close(Operator.**
java:566)
   at org.apache.hadoop.hive.ql.**exec.ExecMapper.close(**
ExecMapper.java:193)
   at org.apache.hadoop.mapred.**MapRunner.run(MapRunner.java:**57)
   at org.apache.hadoop.mapred.**MapTask.runOldMapper(MapTask.**
java:393)
   at org.apache.hadoop.mapred.**MapTask.run(MapTask.java:327)
   at org.apache.hadoop.mapred.**Child$4.run(Child.java:268)
   at java.security.**AccessController.doPrivileged(**Native Method)
   at javax.security.auth.Subject.**doAs(Subject.java:396)
   at org.apache.hadoop.security.**UserGroupInformation.doAs(**
UserGroupInformation.java:**1332)
   at org.apache.hadoop.mapred.**Child.main(Child.java:262)


As you might have noticed, I moved the scrach folder to a directory under
my home dir so that I can give this directory 777 permissions. The idea was
to use hive.files.umask.value of  to cause subdirectories to inherit
the same open permission (not the best workaround, but wouldn't hurt on my
local machine). Unfortunately this didn't work even when I added a umask
 to /etc/init.d/hiveserver2. Can someone please tell me what's the
right way to do this? I mean create a table and then insert values into it!
The Hive QL statements I use are very similar to the ones in the tutorials
about loading data.

Cheers!
-- Younos







--
The whole world is you. Yet you keep thinking there is something else. -
Xuefeng Yicun 822-902 A.D.

Tim R. Havens
Google Phone: 573.454.1232
ICQ: 495992798
ICBM:  37°51'34.79N   90°35'24.35W
ham radio callsign: NW0W





Best regards,
Younos Aboulnaga

Masters candidate
David Cheriton school of computer science
University of Waterloo
http://cs.uwaterloo.ca

E-Mail: younos.abouln...@uwaterloo.ca
Mobile: +1 (519) 497-5669







Best regards,
Younos Aboulnaga

Masters candidate
David Cheriton school of computer science
University of Waterloo
http://cs.uwaterloo.ca

E-Mail: younos.abouln...@uwaterloo.ca
Mobile: +1 (519) 497-5669