You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Greg Senia (JIRA)" <ji...@apache.org> on 2017/05/10 14:49:04 UTC
[jira] [Commented] (AMBARI-20981) Hive20 View Table Statistics
overflows Integer Type convert to Long
[ https://issues.apache.org/jira/browse/AMBARI-20981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16004806#comment-16004806 ]
Greg Senia commented on AMBARI-20981:
-------------------------------------
Example of sample code I wrote showing that you cannot use Integer with Hive View long is safer value to use specifically since Hadoop handles large datasets.
MaxInt: 2147483647
MaxLong: 9223372036854775807
StringVersionofNumber: 4819276224
Long Value: 4819276224
Cannot Convert Large String Value to Integer 4819276224 > MaxInt: 2147483647
java.lang.NumberFormatException: For input string: "4819276224"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:583)
at java.lang.Integer.valueOf(Integer.java:766)
at sample_test.IntLongTest.main(IntLongTest.java:15)
> Hive20 View Table Statistics overflows Integer Type convert to Long
> -------------------------------------------------------------------
>
> Key: AMBARI-20981
> URL: https://issues.apache.org/jira/browse/AMBARI-20981
> Project: Ambari
> Issue Type: Bug
> Affects Versions: 2.5.1, 2.5.2
> Environment: Ambari 2.5.0.x
> Reporter: Greg Senia
> Attachments: AMBARI-20981.patch
>
>
> When testing with our extremely large datasets the statistics data returns a failure and the following stack trace. Using Integer for Hive Table Stats unfortunately is not going to work. It needs to be a long. I've provided a patch to fix this.
> 09 May 2017 10:24:34,474 ERROR [ambari-client-thread-55044] ContainerResponse:419 - The RuntimeException could not be mapped to a response, re-throwing to the HT
> TP container
> java.lang.NumberFormatException: For input string: "12375183159"
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Integer.parseInt(Integer.java:583)
> at java.lang.Integer.valueOf(Integer.java:766)
> at org.apache.ambari.view.hive20.internal.parsers.TableMetaParserImpl.getTableStats(TableMetaParserImpl.java:115)
> at org.apache.ambari.view.hive20.internal.parsers.TableMetaParserImpl.parse(TableMetaParserImpl.java:62)
> at org.apache.ambari.view.hive20.resources.browser.DDLProxy.getTableProperties(DDLProxy.java:157)
> at org.apache.ambari.view.hive20.resources.browser.DDLService.getTableInfo(DDLService.java:278)
> at sun.reflect.GeneratedMethodAccessor253.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> 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.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:558)
> at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1507)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)