Hi, Thanks for your reply.
If you see the log message Error: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to fetch table mytable. java.security.AccessControlException: Permission denied: user=spark, access=READ, inode="/data/mytable":tdcprdr:tdcprdr:drwxr-x--x Spark is trying to read as spark user , using which we started thrift server. Since spark user does not have actual read access we get the error. However the beeline is used by end user not spark user and throws error. Thanks, Jagat Singh On Wed, Sep 30, 2015 at 11:24 AM, Mohammed Guller <[email protected]> wrote: > Does each user needs to start own thrift server to use it? > > > > No. One of the benefits of the Spark Thrift Server is that it allows > multiple users to share a single SparkContext. > > > > Most likely, you have file permissions issue. > > > > Mohammed > > > > *From:* Jagat Singh [mailto:[email protected]] > *Sent:* Tuesday, September 29, 2015 5:30 PM > *To:* SparkUser > *Subject:* Spark thrift service and Hive impersonation. > > > > Hi, > > > > I have started the Spark thrift service using spark user. > > > > Does each user needs to start own thrift server to use it? > > > > Using beeline i am able to connect to server and execute show tables; > > > > However when we try to execute some real query it runs as spark user and > HDFS permissions does not allow them to be read. > > > > The query fails with error > > > > 0: jdbc:hive2://localhost:10000> select count(*) from mytable; > > Error: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to fetch > table mytable. java.security.AccessControlException: Permission denied: > user=spark, access=READ, inode="/data/mytable":tdcprdr:tdcprdr:drwxr-x--x > > at > org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkFsPermission(FSPermissionChecker.java:271) > > > > > > And in thrift server we get log. > > > > > > In the hive-site.xml we have impersonation enabled. > > > > <property> > > <name>hive.server2.enable.doAs</name> > > <value>true</value> > > </property> > > > > <property> > > <name>hive.server2.enable.impersonation</name> > > <value>true</value> > > </property> > > > > Is there any other configuration to be done for it to work like normal > hive thrift server. > > > > Thanks >
