[jira] [Commented] (HAWQ-615) PXF getMetadata endpoint fails if set of items described by passed pattern have unsupported by Hawq Hive objects
[ https://issues.apache.org/jira/browse/HAWQ-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15252111#comment-15252111 ] ASF GitHub Bot commented on HAWQ-615: - Github user shivzone closed the pull request at: https://github.com/apache/incubator-hawq/pull/551 > PXF getMetadata endpoint fails if set of items described by passed pattern > have unsupported by Hawq Hive objects > > > Key: HAWQ-615 > URL: https://issues.apache.org/jira/browse/HAWQ-615 > Project: Apache HAWQ > Issue Type: Sub-task > Components: Hcatalog, PXF >Reporter: Oleksandr Diachenko >Assignee: Shivram Mani > Fix For: 2.0.0 > > > STR: > 1) Hive instance having at least one view object > 2) Read metadata from PXF using wildcard as a pattern: > http://localhost:51200/pxf/v14/Metadata/getMetadata?profile=hive=* > AR: > {code} > java.lang.UnsupportedOperationException: Hive views are not supported by HAWQ > > org.apache.hawq.pxf.plugins.hive.utilities.HiveUtilities.getHiveTable(HiveUtilities.java:79) > > org.apache.hawq.pxf.plugins.hive.HiveMetadataFetcher.getMetadata(HiveMetadataFetcher.java:67) > > org.apache.hawq.pxf.service.rest.MetadataResource.read(MetadataResource.java:107) > sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > java.lang.reflect.Method.invoke(Method.java:606) > > com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) > > com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) > > com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) > > com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) > > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) > javax.servlet.http.HttpServlet.service(HttpServlet.java:731) > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > {code} > ER: > Response should contain set of items which are supported. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-615) PXF getMetadata endpoint fails if set of items described by passed pattern have unsupported by Hawq Hive objects
[ https://issues.apache.org/jira/browse/HAWQ-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15242011#comment-15242011 ] ASF GitHub Bot commented on HAWQ-615: - Github user shivzone commented on the pull request: https://github.com/apache/incubator-hawq/pull/551#issuecomment-210174733 @hornn the reason we went with returning an empty response was we wanted to be consistent with the way we treat the metadata api based on the given pattern. If the pattern has wildcards in it, we will never throw an exception in any case based on table incompatibilities. If the pattern corresponds to a specific table, we will throw the appropriate exception. > PXF getMetadata endpoint fails if set of items described by passed pattern > have unsupported by Hawq Hive objects > > > Key: HAWQ-615 > URL: https://issues.apache.org/jira/browse/HAWQ-615 > Project: Apache HAWQ > Issue Type: Sub-task > Components: Hcatalog, PXF >Reporter: Oleksandr Diachenko >Assignee: Shivram Mani > Fix For: 2.0.0 > > > STR: > 1) Hive instance having at least one view object > 2) Read metadata from PXF using wildcard as a pattern: > http://localhost:51200/pxf/v14/Metadata/getMetadata?profile=hive=* > AR: > {code} > java.lang.UnsupportedOperationException: Hive views are not supported by HAWQ > > org.apache.hawq.pxf.plugins.hive.utilities.HiveUtilities.getHiveTable(HiveUtilities.java:79) > > org.apache.hawq.pxf.plugins.hive.HiveMetadataFetcher.getMetadata(HiveMetadataFetcher.java:67) > > org.apache.hawq.pxf.service.rest.MetadataResource.read(MetadataResource.java:107) > sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > java.lang.reflect.Method.invoke(Method.java:606) > > com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) > > com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) > > com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) > > com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) > > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) > javax.servlet.http.HttpServlet.service(HttpServlet.java:731) > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > {code} > ER: > Response should contain set of items which are supported. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-615) PXF getMetadata endpoint fails if set of items described by passed pattern have unsupported by Hawq Hive objects
[ https://issues.apache.org/jira/browse/HAWQ-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15225439#comment-15225439 ] ASF GitHub Bot commented on HAWQ-615: - Github user hornn commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/551#discussion_r58473430 --- Diff: pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveMetadataFetcher.java --- @@ -62,11 +74,24 @@ public HiveMetadataFetcher(InputData md) { List metadataList = new ArrayList(); +if(tblsDesc.size() > 1) { --- End diff -- What if there are 2 tables but both are not supported? in that case the function will return 0 tables. Is that an acceptable scenario? if so, perhaps add a test to cover it? Did you consider changing the condition to have at least one 'good' table - check in the end of the loop if there metadataList is not empty. If it is, throw an exception. > PXF getMetadata endpoint fails if set of items described by passed pattern > have unsupported by Hawq Hive objects > > > Key: HAWQ-615 > URL: https://issues.apache.org/jira/browse/HAWQ-615 > Project: Apache HAWQ > Issue Type: Sub-task > Components: Hcatalog, PXF >Reporter: Oleksandr Diachenko >Assignee: Shivram Mani > Fix For: 2.0.0 > > > STR: > 1) Hive instance having at least one view object > 2) Read metadata from PXF using wildcard as a pattern: > http://localhost:51200/pxf/v14/Metadata/getMetadata?profile=hive=* > AR: > {code} > java.lang.UnsupportedOperationException: Hive views are not supported by HAWQ > > org.apache.hawq.pxf.plugins.hive.utilities.HiveUtilities.getHiveTable(HiveUtilities.java:79) > > org.apache.hawq.pxf.plugins.hive.HiveMetadataFetcher.getMetadata(HiveMetadataFetcher.java:67) > > org.apache.hawq.pxf.service.rest.MetadataResource.read(MetadataResource.java:107) > sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > java.lang.reflect.Method.invoke(Method.java:606) > > com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) > > com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) > > com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) > > com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) > > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) > javax.servlet.http.HttpServlet.service(HttpServlet.java:731) > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > {code} > ER: > Response should contain set of items which are supported. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-615) PXF getMetadata endpoint fails if set of items described by passed pattern have unsupported by Hawq Hive objects
[ https://issues.apache.org/jira/browse/HAWQ-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15225271#comment-15225271 ] ASF GitHub Bot commented on HAWQ-615: - Github user shivzone commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/551#discussion_r58466610 --- Diff: pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveMetadataFetcher.java --- @@ -50,9 +50,21 @@ public HiveMetadataFetcher(InputData md) { client = HiveUtilities.initHiveClient(); } +/** + * Fetches metadata of hive tables corresponding to the given pattern + * For patterns matching more than one table, the tables are skipped. --- End diff -- will update > PXF getMetadata endpoint fails if set of items described by passed pattern > have unsupported by Hawq Hive objects > > > Key: HAWQ-615 > URL: https://issues.apache.org/jira/browse/HAWQ-615 > Project: Apache HAWQ > Issue Type: Sub-task > Components: Hcatalog, PXF >Reporter: Oleksandr Diachenko >Assignee: Shivram Mani > Fix For: 2.0.0 > > > STR: > 1) Hive instance having at least one view object > 2) Read metadata from PXF using wildcard as a pattern: > http://localhost:51200/pxf/v14/Metadata/getMetadata?profile=hive=* > AR: > {code} > java.lang.UnsupportedOperationException: Hive views are not supported by HAWQ > > org.apache.hawq.pxf.plugins.hive.utilities.HiveUtilities.getHiveTable(HiveUtilities.java:79) > > org.apache.hawq.pxf.plugins.hive.HiveMetadataFetcher.getMetadata(HiveMetadataFetcher.java:67) > > org.apache.hawq.pxf.service.rest.MetadataResource.read(MetadataResource.java:107) > sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > java.lang.reflect.Method.invoke(Method.java:606) > > com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) > > com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) > > com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) > > com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) > > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) > javax.servlet.http.HttpServlet.service(HttpServlet.java:731) > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > {code} > ER: > Response should contain set of items which are supported. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-615) PXF getMetadata endpoint fails if set of items described by passed pattern have unsupported by Hawq Hive objects
[ https://issues.apache.org/jira/browse/HAWQ-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15225225#comment-15225225 ] ASF GitHub Bot commented on HAWQ-615: - Github user sansanichfb commented on the pull request: https://github.com/apache/incubator-hawq/pull/551#issuecomment-205532919 LGTM other than small cosmetic comments. > PXF getMetadata endpoint fails if set of items described by passed pattern > have unsupported by Hawq Hive objects > > > Key: HAWQ-615 > URL: https://issues.apache.org/jira/browse/HAWQ-615 > Project: Apache HAWQ > Issue Type: Sub-task > Components: Hcatalog, PXF >Reporter: Oleksandr Diachenko >Assignee: Shivram Mani > Fix For: 2.0.0 > > > STR: > 1) Hive instance having at least one view object > 2) Read metadata from PXF using wildcard as a pattern: > http://localhost:51200/pxf/v14/Metadata/getMetadata?profile=hive=* > AR: > {code} > java.lang.UnsupportedOperationException: Hive views are not supported by HAWQ > > org.apache.hawq.pxf.plugins.hive.utilities.HiveUtilities.getHiveTable(HiveUtilities.java:79) > > org.apache.hawq.pxf.plugins.hive.HiveMetadataFetcher.getMetadata(HiveMetadataFetcher.java:67) > > org.apache.hawq.pxf.service.rest.MetadataResource.read(MetadataResource.java:107) > sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > java.lang.reflect.Method.invoke(Method.java:606) > > com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) > > com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) > > com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) > > com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) > > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) > javax.servlet.http.HttpServlet.service(HttpServlet.java:731) > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > {code} > ER: > Response should contain set of items which are supported. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-615) PXF getMetadata endpoint fails if set of items described by passed pattern have unsupported by Hawq Hive objects
[ https://issues.apache.org/jira/browse/HAWQ-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15225222#comment-15225222 ] ASF GitHub Bot commented on HAWQ-615: - Github user sansanichfb commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/551#discussion_r58462813 --- Diff: pxf/pxf-hive/src/test/java/org/apache/hawq/pxf/plugins/hive/HiveMetadataFetcherTest.java --- @@ -154,6 +155,115 @@ public void getTableMetadata() throws Exception { assertEquals("int4", field.getType()); } +@Test +public void getTableMetadataWithMultipleTables() throws Exception { +prepareConstruction(); + +fetcher = new HiveMetadataFetcher(inputData); + +String tablepattern = "*"; +String dbpattern = "*"; +String dbname = "default"; +String tablenamebase = "regulartable"; +String pattern = dbpattern + "." + tablepattern; + +List dbNames = new ArrayList(Arrays.asList(dbname)); +List tableNames = new ArrayList(); + +// Prepare for tables +List fields = new ArrayList(); +fields.add(new FieldSchema("field1", "string", null)); +fields.add(new FieldSchema("field2", "int", null)); +StorageDescriptor sd = new StorageDescriptor(); +sd.setCols(fields); + +// Mock hive tables returned from hive client +for(int index=1;index<=2;index++) { --- End diff -- Add comment why starting from 1 not from 0? > PXF getMetadata endpoint fails if set of items described by passed pattern > have unsupported by Hawq Hive objects > > > Key: HAWQ-615 > URL: https://issues.apache.org/jira/browse/HAWQ-615 > Project: Apache HAWQ > Issue Type: Sub-task > Components: Hcatalog, PXF >Reporter: Oleksandr Diachenko >Assignee: Shivram Mani > Fix For: 2.0.0 > > > STR: > 1) Hive instance having at least one view object > 2) Read metadata from PXF using wildcard as a pattern: > http://localhost:51200/pxf/v14/Metadata/getMetadata?profile=hive=* > AR: > {code} > java.lang.UnsupportedOperationException: Hive views are not supported by HAWQ > > org.apache.hawq.pxf.plugins.hive.utilities.HiveUtilities.getHiveTable(HiveUtilities.java:79) > > org.apache.hawq.pxf.plugins.hive.HiveMetadataFetcher.getMetadata(HiveMetadataFetcher.java:67) > > org.apache.hawq.pxf.service.rest.MetadataResource.read(MetadataResource.java:107) > sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > java.lang.reflect.Method.invoke(Method.java:606) > > com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) > > com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) > > com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) > > com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) > > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) > javax.servlet.http.HttpServlet.service(HttpServlet.java:731) > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > {code} > ER: > Response should contain set of items which are supported. -- This message was sent by Atlassian JIRA
[jira] [Commented] (HAWQ-615) PXF getMetadata endpoint fails if set of items described by passed pattern have unsupported by Hawq Hive objects
[ https://issues.apache.org/jira/browse/HAWQ-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15225220#comment-15225220 ] ASF GitHub Bot commented on HAWQ-615: - Github user sansanichfb commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/551#discussion_r58462587 --- Diff: pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveMetadataFetcher.java --- @@ -50,9 +50,21 @@ public HiveMetadataFetcher(InputData md) { client = HiveUtilities.initHiveClient(); } +/** + * Fetches metadata of hive tables corresponding to the given pattern + * For patterns matching more than one table, the tables are skipped. --- End diff -- Maybe For patterns matching more than one table, the unsupported tables are skipped.? > PXF getMetadata endpoint fails if set of items described by passed pattern > have unsupported by Hawq Hive objects > > > Key: HAWQ-615 > URL: https://issues.apache.org/jira/browse/HAWQ-615 > Project: Apache HAWQ > Issue Type: Sub-task > Components: Hcatalog, PXF >Reporter: Oleksandr Diachenko >Assignee: Shivram Mani > Fix For: 2.0.0 > > > STR: > 1) Hive instance having at least one view object > 2) Read metadata from PXF using wildcard as a pattern: > http://localhost:51200/pxf/v14/Metadata/getMetadata?profile=hive=* > AR: > {code} > java.lang.UnsupportedOperationException: Hive views are not supported by HAWQ > > org.apache.hawq.pxf.plugins.hive.utilities.HiveUtilities.getHiveTable(HiveUtilities.java:79) > > org.apache.hawq.pxf.plugins.hive.HiveMetadataFetcher.getMetadata(HiveMetadataFetcher.java:67) > > org.apache.hawq.pxf.service.rest.MetadataResource.read(MetadataResource.java:107) > sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > java.lang.reflect.Method.invoke(Method.java:606) > > com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) > > com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) > > com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) > > com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) > > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) > javax.servlet.http.HttpServlet.service(HttpServlet.java:731) > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > {code} > ER: > Response should contain set of items which are supported. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-615) PXF getMetadata endpoint fails if set of items described by passed pattern have unsupported by Hawq Hive objects
[ https://issues.apache.org/jira/browse/HAWQ-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15225207#comment-15225207 ] ASF GitHub Bot commented on HAWQ-615: - GitHub user shivzone opened a pull request: https://github.com/apache/incubator-hawq/pull/551 HAWQ-615. Handle incomptible tables with getMetadata PXF API Incompatible tables will be ignored when getMetadata is invoked with a pattern that matches > 1 table You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-hawq HAWQ-615 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-hawq/pull/551.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #551 commit 676396fa0c40bb600aadda6f1dc7e8763a0bdde8 Author: Shivram ManiDate: 2016-04-04T22:41:08Z HAWQ-615. Handle incomptible tables with getMetadata PXF API > PXF getMetadata endpoint fails if set of items described by passed pattern > have unsupported by Hawq Hive objects > > > Key: HAWQ-615 > URL: https://issues.apache.org/jira/browse/HAWQ-615 > Project: Apache HAWQ > Issue Type: Sub-task > Components: Hcatalog, PXF >Reporter: Oleksandr Diachenko >Assignee: Oleksandr Diachenko > Fix For: 2.0.0 > > > STR: > 1) Hive instance having at least one view object > 2) Read metadata from PXF using wildcard as a pattern: > http://localhost:51200/pxf/v14/Metadata/getMetadata?profile=hive=* > AR: > {code} > java.lang.UnsupportedOperationException: Hive views are not supported by HAWQ > > org.apache.hawq.pxf.plugins.hive.utilities.HiveUtilities.getHiveTable(HiveUtilities.java:79) > > org.apache.hawq.pxf.plugins.hive.HiveMetadataFetcher.getMetadata(HiveMetadataFetcher.java:67) > > org.apache.hawq.pxf.service.rest.MetadataResource.read(MetadataResource.java:107) > sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > java.lang.reflect.Method.invoke(Method.java:606) > > com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) > > com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) > > com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) > > com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) > > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) > javax.servlet.http.HttpServlet.service(HttpServlet.java:731) > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > {code} > ER: > Response should contain set of items which are supported. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-615) PXF getMetadata endpoint fails if set of items described by passed pattern have unsupported by Hawq Hive objects
[ https://issues.apache.org/jira/browse/HAWQ-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15222469#comment-15222469 ] Goden Yao commented on HAWQ-615: A preferable behavior is: (IMHO) 1) if query for a single table that contains complex types we don't support yet, gracefully error out with messages like "the table contains complex types which is not supported" 2) if query with a pattern, we should return the tables that only contain types we support and also a list of table names we don't support. > PXF getMetadata endpoint fails if set of items described by passed pattern > have unsupported by Hawq Hive objects > > > Key: HAWQ-615 > URL: https://issues.apache.org/jira/browse/HAWQ-615 > Project: Apache HAWQ > Issue Type: Sub-task > Components: Hcatalog, PXF >Reporter: Oleksandr Diachenko >Assignee: Oleksandr Diachenko > Fix For: 2.0.0 > > > STR: > 1) Hive instance having at least one view object > 2) Read metadata from PXF using wildcard as a pattern: > http://localhost:51200/pxf/v14/Metadata/getMetadata?profile=hive=* > AR: > {code} > java.lang.UnsupportedOperationException: Hive views are not supported by HAWQ > > org.apache.hawq.pxf.plugins.hive.utilities.HiveUtilities.getHiveTable(HiveUtilities.java:79) > > org.apache.hawq.pxf.plugins.hive.HiveMetadataFetcher.getMetadata(HiveMetadataFetcher.java:67) > > org.apache.hawq.pxf.service.rest.MetadataResource.read(MetadataResource.java:107) > sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > java.lang.reflect.Method.invoke(Method.java:606) > > com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) > > com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) > > com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) > > com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) > > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > > com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) > > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) > javax.servlet.http.HttpServlet.service(HttpServlet.java:731) > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > {code} > ER: > Response should contain set of items which are supported. -- This message was sent by Atlassian JIRA (v6.3.4#6332)