Start HiveServer2 with Kerberos meet FATAL error

2016-10-17 Thread Micro dong
I'm trying to configure HiveServer2(hive-1.2.1)  With Kerberos。Here is my
Hive's configuration file。
 **
*hive.server2.authentication*
*KERBEROS*
*  *
*  *
*hive.server2.authentication.kerberos.principal*
*hive2/_h...@hadoop.com *
*  *
*  *
*hive.server2.authentication.kerberos.keytab*
*/home/work/software/hive/conf/hive.keytab*
*  *

the keytab file is in its location, its owner is work. But when I try to
start the HiveServer2, I see this message on the log:

*2016-10-18 10:20:24,867 FATAL [Thread-9]: thrift.ThriftCLIService
(ThriftBinaryCLIService.java:run(101)) - Error starting HiveServer2: could
not start ThriftBinaryCLIService*
*javax.security.auth.login.LoginException: Kerberos principal should have 3
parts: work**  at *
*org.apache.hive.service.auth.HiveAuthFactory.getAuthTransFactory(HiveAuthFactory.java:147)*
*atorg.apache.hive.service.cli.thrift.ThriftBinaryCLIService.run(ThriftBinaryCLIService.java:58)*
*at java.lang.Thread.run(Thread.java:722)*

Here *work* is my unix login name. Any help would be highly appreciated.

-- 
Best regards


Update operation on hive table using Join

2016-10-17 Thread Priyanka Raghuvanshi
Hi,

Is there any way to  update a Hive table with join.
Following is the query :

SQL query

UPDATE _STCC_CurrentLocationMaPData
set [Address]=replace(CL.cOut_Event_Description,,),
[Latitude]=CL.fOut_latitude ,
[Longitude]=CL.fOut_longitude ,
[Speed] =CL.fOut_Speed,
[dTimeStamp] =MV.dTimeStamp,
[Reg_No]=CL.cOut_registration,
[GPSState] = CL.bGPS
FROM  #MaxValues MV
INNER JOIN CartrackDetailsInfo CL on MV.dTimeStamp=CL.dTimeStamp AND 
MV.AcqAccountNumber=CL.AcqAccountNumber
INNER JOIN  _STCC_CurrentLocationMaPData CLR on 
MV.AcqAccountNumber=CLR.AccountNo
where CLR.AccountNo=MV.AcqAccountNumber


HQL query
UPDATE current_location set 
address=regexp_replace(cl.cout_event_description,,),latitude=cl.latitude,longitude=cl.longitude
 ,speed =cl.speed,dtimestamp =mv.dtimestamp,reg_no=cl.registration,gpsstate = 
cl.bgps
FROM  default.maxvalues mv
INNER JOIN cartrackdetailsinfo cl on mv.dtimestamp=cl.dtimestamp 
ANDmv.acqaccountnumber=cl.acqaccountnumber
INNER JOIN current_location clr on mv.acqaccountnumber=clr.deal_number
where clr.deal_number=mv.acqaccountnumber;
Output
FAILED: ParseException line 1:221 missing EOF at 'FROM' near 'bgps