Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 38FFD183CF for ; Tue, 27 Oct 2015 09:25:41 +0000 (UTC) Received: (qmail 93242 invoked by uid 500); 27 Oct 2015 09:25:28 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 93054 invoked by uid 500); 27 Oct 2015 09:25:28 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 92773 invoked by uid 99); 27 Oct 2015 09:25:28 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Oct 2015 09:25:28 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 04B302C1F58 for ; Tue, 27 Oct 2015 09:25:28 +0000 (UTC) Date: Tue, 27 Oct 2015 09:25:28 +0000 (UTC) From: "Nitiraj Singh Rathore (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-13575) Hive View query error, should use GetOperationStatus thrift api to verify if hive query is completed successfully MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-13575?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nitiraj Singh Rathore updated AMBARI-13575: ------------------------------------------- Attachment: AMBARI-13575_branch-2.1.patch > Hive View query error, should use GetOperationStatus thrift api to verify= if hive query is completed successfully > -------------------------------------------------------------------------= ---------------------------------------- > > Key: AMBARI-13575 > URL: https://issues.apache.org/jira/browse/AMBARI-13575 > Project: Ambari > Issue Type: Bug > Components: ambari-views > Affects Versions: 2.1.0, 2.1.1 > Reporter: Nitiraj Singh Rathore > Assignee: Nitiraj Singh Rathore > Fix For: 2.1.3 > > Attachments: AMBARI-13575_branch-2.1.patch > > > Some times hive query gives error. The root cause seems like hive view ca= lls GetResultSetMetadata without verifying query completion with GetOperati= onStatus. > This results in an error status from hive server.=20 > Below are the error logs. > {code} > {"trace":"org.apache.ambari.view.hive.client.HiveErrorStatusException: H1= 90 Unable to fetch results metadata. Expected state FINISHED, but found RUN= NING [ERROR_STATUS]\n\norg.apache.ambari.view.hive.client.HiveErrorStatusEx= ception: H190 Unable to fetch results metadata. Expected state FINISHED, bu= t found RUNNING [ERROR_STATUS]\n\tat org.apache.ambari.view.hive.client.Uti= ls.verifySuccess(Utils.java:29)\n\tat org.apache.ambari.view.hive.client.Cu= rsor.getSchema(Cursor.java:107)\n\tat org.apache.ambari.view.hive.resources= .jobs.ResultsPaginationController.request(ResultsPaginationController.java:= 127)\n\tat org.apache.ambari.view.hive.resources.jobs.JobService.getResults= (JobService.java:279)\n\tat sun.reflect.GeneratedMethodAccessor400.invoke(U= nknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(Delega= tingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Metho= d.java:497)\n\tat com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.i= nvoke(JavaMethodInvokerFactory.java:60)\n\tat com.sun.jersey.server.impl.mo= del.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvok= er._dispatch(AbstractResourceMethodDispatchProvider.java:205)\n\tat com.sun= .jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.disp= atch(ResourceJavaMethodDispatcher.java:75)\n\tat com.sun.jersey.server.impl= .uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)\n\tat com.sun.jer= sey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:1= 47)\n\tat com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLoc= atorRule.java:137)\n\tat com.sun.jersey.server.impl.uri.rules.RightHandPath= Rule.accept(RightHandPathRule.java:147)\n\tat com.sun.jersey.server.impl.ur= i.rules.SubLocatorRule.accept(SubLocatorRule.java:137)\n\tat com.sun.jersey= .server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)= \n\tat com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocato= rRule.java:137)\n\tat com.sun.jersey.server.impl.uri.rules.RightHandPathRul= e.accept(RightHandPathRule.java:147)\n\tat com.sun.jersey.server.impl.uri.r= ules.ResourceClassRule.accept(ResourceClassRule.java:108)\n\tat com.sun.jer= sey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:1= 47)\n\tat com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.acce= pt(RootResourceClassesRule.java:84)\n\tat com.sun.jersey.server.impl.applic= ation.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)\n\tat= com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(W= ebApplicationImpl.java:1473)\n\tat com.sun.jersey.server.impl.application.W= ebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)\n\tat com.sun= .jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplica= tionImpl.java:1409)\n\tat com.sun.jersey.spi.container.servlet.WebComponent= .service(WebComponent.java:409)\n\tat com.sun.jersey.spi.container.servlet.= ServletContainer.service(ServletContainer.java:540)\n\tat com.sun.jersey.sp= i.container.servlet.ServletContainer.service(ServletContainer.java:715)\n\t= at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)\n\tat org.e= clipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)\n\tat org= .eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.j= ava:1496)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFi= lterChain.doFilter(FilterChainProxy.java:330)\n\tat org.springframework.sec= urity.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityI= nterceptor.java:118)\n\tat org.springframework.security.web.access.intercep= t.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)\n\t= at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doF= ilter(FilterChainProxy.java:342)\n\tat org.springframework.security.web.acc= ess.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113= )\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChai= n.doFilter(FilterChainProxy.java:342)\n\tat org.springframework.security.we= b.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103= )\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChai= n.doFilter(FilterChainProxy.java:342)\n\tat org.springframework.security.we= b.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthentica= tionFilter.java:113)\n\tat org.springframework.security.web.FilterChainProx= y$VirtualFilterChain.doFilter(FilterChainProxy.java:342)\n\tat org.springfr= amework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doF= ilter(SecurityContextHolderAwareRequestFilter.java:54)\n\tat org.springfram= ework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain= Proxy.java:342)\n\tat org.springframework.security.web.savedrequest.Request= CacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)\n\tat org.spring= framework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterC= hainProxy.java:342)\n\tat org.apache.ambari.server.security.authorization.A= mbariAuthorizationFilter.doFilter(AmbariAuthorizationFilter.java:182)\n\tat= org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFil= ter(FilterChainProxy.java:342)\n\tat org.springframework.security.web.authe= ntication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.= java:150)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFi= lterChain.doFilter(FilterChainProxy.java:342)\n\tat org.springframework.sec= urity.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContext= PersistenceFilter.java:87)\n\tat org.springframework.security.web.FilterCha= inProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)\n\tat org.sp= ringframework.security.web.FilterChainProxy.doFilterInternal(FilterChainPro= xy.java:192)\n\tat org.springframework.security.web.FilterChainProxy.doFilt= er(FilterChainProxy.java:160)\n\tat org.springframework.web.filter.Delegati= ngFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)\n\tat org.spri= ngframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy= .java:167)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFil= ter(ServletHandler.java:1467)\n\tat org.apache.ambari.server.api.MethodOver= rideFilter.doFilter(MethodOverrideFilter.java:72)\n\tat org.eclipse.jetty.s= ervlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)\n\tat = org.apache.ambari.server.api.AmbariPersistFilter.doFilter(AmbariPersistFilt= er.java:47)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFi= lter(ServletHandler.java:1467)\n\tat org.eclipse.jetty.servlets.UserAgentFi= lter.doFilter(UserAgentFilter.java:82)\n\tat org.eclipse.jetty.servlets.Gzi= pFilter.doFilter(GzipFilter.java:294)\n\tat org.eclipse.jetty.servlet.Servl= etHandler$CachedChain.doFilter(ServletHandler.java:1467)\n\tat org.eclipse.= jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)\n\tat org.ec= lipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\t= at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:5= 57)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionH= andler.java:231)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHa= ndle(ContextHandler.java:1086)\n\tat org.eclipse.jetty.servlet.ServletHandl= er.doScope(ServletHandler.java:429)\n\tat org.eclipse.jetty.server.session.= SessionHandler.doScope(SessionHandler.java:193)\n\tat org.eclipse.jetty.ser= ver.handler.ContextHandler.doScope(ContextHandler.java:1020)\n\tat org.ecli= pse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat= org.apache.ambari.server.controller.AmbariHandlerList.processHandlers(Amba= riHandlerList.java:209)\n\tat org.apache.ambari.server.controller.AmbariHan= dlerList.processHandlers(AmbariHandlerList.java:198)\n\tat org.apache.ambar= i.server.controller.AmbariHandlerList.handle(AmbariHandlerList.java:132)\n\= tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.j= ava:116)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:370)\n\ta= t org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHtt= pConnection.java:494)\n\tat org.eclipse.jetty.server.AbstractHttpConnection= .headerComplete(AbstractHttpConnection.java:971)\n\tat org.eclipse.jetty.se= rver.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConne= ction.java:1033)\n\tat org.eclipse.jetty.http.HttpParser.parseNext(HttpPars= er.java:644)\n\tat org.eclipse.jetty.http.HttpParser.parseAvailable(HttpPar= ser.java:235)\n\tat org.eclipse.jetty.server.AsyncHttpConnection.handle(Asy= ncHttpConnection.java:82)\n\tat org.eclipse.jetty.io.nio.SelectChannelEndPo= int.handle(SelectChannelEndPoint.java:696)\n\tat org.eclipse.jetty.io.nio.S= electChannelEndPoint$1.run(SelectChannelEndPoint.java:53)\n\tat org.eclipse= .jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)\n\tat= org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java= :543)\n\tat java.lang.Thread.run(Thread.java:745)\n","message":"H190 Unable= to fetch results metadata. Expected state FINISHED, but found RUNNING [ERR= OR_STATUS]","status":500} > {code} > The message in hiveserver2 is : > {code} > from=3Dorg.apache.hadoop.hive.ql.exec.tez.TezJobMonitor> > 2015-09-03 16:11:59,351 INFO [HiveServer2-Background-Pool: Thread-16483]= : SessionState (SessionState.java:printInfo(951)) - Map 1: 0(+1)/37=09Reduc= er 2: 0/1=09 > 2015-09-03 16:11:59,554 INFO [HiveServer2-Background-Pool: Thread-16483]= : SessionState (SessionState.java:printInfo(951)) - Map 1: 0(+4)/37=09Reduc= er 2: 0/1=09 > 2015-09-03 16:12:00,874 WARN [HiveServer2-Handler-Pool: Thread-16415]: t= hrift.ThriftCLIService (ThriftCLIService.java:GetResultSetMetadata(662)) - = Error getting result set metadata:=20 > org.apache.hive.service.cli.HiveSQLException: Expected state FINISHED, bu= t found RUNNING > =09at org.apache.hive.service.cli.operation.Operation.assertState(Operati= on.java:161) > =09at org.apache.hive.service.cli.operation.SQLOperation.getResultSetSche= ma(SQLOperation.java:322) > =09at org.apache.hive.service.cli.operation.OperationManager.getOperation= ResultSetSchema(OperationManager.java:209) > =09at org.apache.hive.service.cli.session.HiveSessionImpl.getResultSetMet= adata(HiveSessionImpl.java:673) > =09at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source) > =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc= essorImpl.java:43) > =09at java.lang.reflect.Method.invoke(Method.java:497) > =09at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSes= sionProxy.java:78) > =09at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(Hiv= eSessionProxy.java:36) > =09at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSess= ionProxy.java:63) > =09at java.security.AccessController.doPrivileged(Native Method) > =09at javax.security.auth.Subject.doAs(Subject.java:422) > =09at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInfor= mation.java:1657) > =09at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSes= sionProxy.java:59) > =09at com.sun.proxy.$Proxy20.getResultSetMetadata(Unknown Source) > =09at org.apache.hive.service.cli.CLIService.getResultSetMetadata(CLIServ= ice.java:435) > =09at org.apache.hive.service.cli.thrift.ThriftCLIService.GetResultSetMet= adata(ThriftCLIService.java:658) > =09at org.apache.hive.service.cli.thrift.TCLIService$Processor$GetResultS= etMetadata.getResult(TCLIService.java:1533) > =09at org.apache.hive.service.cli.thrift.TCLIService$Processor$GetResultS= etMetadata.getResult(TCLIService.java:1518) > =09at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > =09at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) > =09at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpA= ddressProcessor.java:56) > =09at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThrea= dPoolServer.java:285) > =09at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto= r.java:1142) > =09at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut= or.java:617) > =09at java.lang.Thread.run(Thread.java:745) > 2015-09-03 16:12:02,037 INFO [HiveServer2-Background-Pool: Thread-16483]= : SessionState (SessionState.java:printInfo(951)) - Map 1: 0(+5)/37=09Reduc= er 2: 0/1=09 > 2015-09-03 16:12:02,659 INFO [HiveServer2-Background-Pool: Thread-16483]= : SessionState (SessionState.java:printInfo(951)) - Map 1: 0(+6)/37=09Reduc= er 2: 0/1=09 > 2015-09-03 16:12:03,283 INFO [HiveServer2-Background-Pool: Thread-16483]= : SessionState (SessionState.java:printInfo(951)) - Map 1: 0(+8)/37=09Reduc= er 2: 0/1=09 > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)