Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

view pig error use

Solved Go to solution

view pig error use

Super Collaborator

Hi.

After create pig view and try type a script i have this error:

	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.apache.ambari.server.controller.AmbariHandlerList.processHandlers(AmbariHandlerList.java:216)
	at org.apache.ambari.server.controller.AmbariHandlerList.processHandlers(AmbariHandlerList.java:205)
	at org.apache.ambari.server.controller.AmbariHandlerList.handle(AmbariHandlerList.java:152)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:370)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.ambari.view.PersistenceException: The class org.apache.ambari.view.pig.persistence.SmokeTestEntityis not registered as an entity.
	at org.apache.ambari.server.view.persistence.DataStoreImpl.getIdFieldName(DataStoreImpl.java:593)
	at org.apache.ambari.server.view.persistence.DataStoreImpl.persistEntity(DataStoreImpl.java:394)
	at org.apache.ambari.server.view.persistence.DataStoreImpl.store(DataStoreImpl.java:144)
	... 96 more
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: view pig error use

New Contributor

I added a comment to Lester's response above yesterday... it looks like you can't see it unless you click a link to show more details. At any rate, to answer your question, in this scenario pig scripts are working fine in the grunt shell. It appears something may have gotten corrupted in the Ambari view, as recreating it with the same settings (that were set up following the Ambari Views documentation) did give a view that is now working fine. This issue is resolved for me.

It may be worth noting, just for interest sake, that this is the first time this Pig view has worked on this cluster. Originally when it was set up with Ambari 2.1.0 there was an error that, upon researching, looked like it was related to a bug that had been fixed in Ambari 2.2.0. After upgrading Ambari I got the error above. Now that it has been recreated it is working fine.

6 REPLIES 6

Re: view pig error use

I'm not 100% sure of the sequence of events that got you to this point. If they are easily reproducible, please share the steps here and others may be able to look at it for you. Good luck.

Re: view pig error use

New Contributor

I am getting pretty much the same error message. In my scenario, I recently upgraded from Ambari 2.1 to 2.2.2. I was getting other errors in the Hive and Pig views that I found articles suggesting they were fixed in Ambari 2.2 or later.

The Hive view is working fine now, but the Pig view returns this error in the Ambari-server.log when you click on the Pig view.

Here's a screenshot of the Pig View:

6378-pig-view-error.jpg

Below is as much of the stack trace as I could fit.

       Service 'storage' check failed:
org.apache.ambari.view.PersistenceException: Caught exception trying to store view entity org.apache.ambari.view.pig.persistence.SmokeTestEntity@65794478

org.apache.ambari.view.PersistenceException: Caught exception trying to store view entity org.apache.ambari.view.pig.persistence.SmokeTestEntity@65794478
 at org.apache.ambari.server.view.persistence.DataStoreImpl.throwPersistenceException(DataStoreImpl.java:648)
 at org.apache.ambari.server.view.persistence.DataStoreImpl.store(DataStoreImpl.java:148)
 at org.apache.ambari.view.pig.persistence.DataStoreStorage.store(DataStoreStorage.java:55)
 at org.apache.ambari.view.pig.persistence.DataStoreStorage.storageSmokeTest(DataStoreStorage.java:135)
 at org.apache.ambari.view.pig.services.HelpService.storageStatus(HelpService.java:115)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
 at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
 at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
 at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
 at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
 at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540)
 at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
 at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
 at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
 at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
 at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
 at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
 at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

...


Caused by: org.apache.ambari.view.PersistenceException: The class org.apache.ambari.view.pig.persistence.SmokeTestEntityis not registered as an entity.
 at org.apache.ambari.server.view.persistence.DataStoreImpl.getIdFieldName(DataStoreImpl.java:593)
 at org.apache.ambari.server.view.persistence.DataStoreImpl.persistEntity(DataStoreImpl.java:394)
 at org.apache.ambari.server.view.persistence.DataStoreImpl.store(DataStoreImpl.java:144)
 ... 96 more

Re: view pig error use

Thx for the additional details. Doesn't look like I'm any help with this one. :-( If nobody else chimes in and if you've tried to remove and re-add with same results, maybe it is time for opening up a formal support case. Again, hopefully this jogs someone else's memory/experience and helps out here. Good luck!

Re: view pig error use

New Contributor

I didn't know a possible solution might be to remove and re-add the Pig view. I tried this, creating a new view with the same settings as the old view, and that worked! Maybe there's some sort of bug with the Ambari upgrade that corrupted the Pig view somehow? At any rate, the new version of the Pig view works fine and does not produce the error message listed above.

Re: view pig error use

Mentor

Can you try running Pig service check? It seems it fails on running service check via pig view. once it passes, run pig script in grunt as well and then try creating another view. after all those checks make sure to review the documentation for setting up pig view http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.2.0/bk_ambari_views_guide/content/ch_using_pig_v...

Highlighted

Re: view pig error use

New Contributor

I added a comment to Lester's response above yesterday... it looks like you can't see it unless you click a link to show more details. At any rate, to answer your question, in this scenario pig scripts are working fine in the grunt shell. It appears something may have gotten corrupted in the Ambari view, as recreating it with the same settings (that were set up following the Ambari Views documentation) did give a view that is now working fine. This issue is resolved for me.

It may be worth noting, just for interest sake, that this is the first time this Pig view has worked on this cluster. Originally when it was set up with Ambari 2.1.0 there was an error that, upon researching, looked like it was related to a bug that had been fixed in Ambari 2.2.0. After upgrading Ambari I got the error above. Now that it has been recreated it is working fine.

Don't have an account?
Coming from Hortonworks? Activate your account here