You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/07/29 17:50:38 UTC

[GitHub] [iceberg] massdosage opened a new pull request #1267: Single jar for input formats

massdosage opened a new pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267


   Currently in order to use the Hive InputFormat one needs to add >5 jar files to the classpath, this obviously isn't a great end user experience. I think we should provide *one* fat/uber jar that can be added.
   
   This PR shows a first attempt at this but also illustrates that the HiveInputFormat in master doesn't appear to be working correctly when executed from a Hive 2.3.x client. I'd like to get that working end to end by using this PR to illustrate the problems and hopefully proving that it all works once we've resolved them.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-681987610


   I have implemented this based on the `spark-runtime` module as discussed in the last community sync. It produces a fat jar about 33MB in size (similar to the Spark one). I have tested it on Hive in distributed mode and it appears to work. 
   
   @rdsr @guilload @rdblue I'd appreciate your reviews.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r478538941



##########
File path: mr-runtime/LICENSE
##########
@@ -0,0 +1,581 @@
+

Review comment:
       This is a good start, but we will need to modify them.
   
   LICENSE and NOTICE content is specific to what is actually in the Jar, so we will need to remove the license information for any library that isn't in the Hive runtime and add any new ones that weren't in Spark. It just requires going through the Jar file and making sure all the libraries are accounted for.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-684937951


   Looks great. Thanks @massdosage!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r481041430



##########
File path: mr-runtime/LICENSE
##########
@@ -0,0 +1,581 @@
+

Review comment:
       I'll give this a go, shouldn't be too hard.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdsr commented on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
rdsr commented on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-666208956


   > I run MR in local mode whereas this seems to be running in distributed mode with YARN. I'll have to dig deeper but my guess is that `table` is null because in that case the calls to `getSplits` and then `getRecordReader` happens in two different processes.
   > @rdsr, what do you think of this approach? One downside is the increase in size of the serialized splits.
   
   Hi @guilload, @massdosage . I was trying out an alternative way of passing the required parameters. It seems instead of setting the `TABLE_PATH`, `SCHEMA` etc in `InputFormat#getsplits` method, which is not being propagate to record readers on worker nodes, I tried setting the required parameters in `org.apache.hadoop.hive.ql.metadata.HiveStorageHandler#configureInputJobProperties`.  From that method's javadoc
     
   > /**
   >    * This method is called to allow the StorageHandlers the chance
   >    * to populate the JobContext.getConfiguration() with properties that
   >    * maybe be needed by the handler's bundled artifacts (ie InputFormat, SerDe, etc).
   
    it looks like that it maybe the right method to do what we are trying to achieve. Below are my modifications.
   
   https://github.com/apache/iceberg/compare/master...rdsr:alternative_conf?expand=1
   
   I've yet to try this out on a real cluster to see if this works in a distributed YARN mode though. I plan to do this tomorrow.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r481249476



##########
File path: settings.gradle
##########
@@ -24,6 +24,7 @@ include 'core'
 include 'data'
 include 'flink'
 include 'mr'
+include 'mr-runtime'

Review comment:
       Agreed, @cmathiesen is looking into projection pushdown as well as some documentation for the basic Hive read support.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r481235100



##########
File path: settings.gradle
##########
@@ -24,6 +24,7 @@ include 'core'
 include 'data'
 include 'flink'
 include 'mr'
+include 'mr-runtime'

Review comment:
       Cool, I'll get that up in the next day or two. Thanks for merging this one.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdsr commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
rdsr commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r462551062



##########
File path: build.gradle
##########
@@ -404,6 +408,29 @@ project(':iceberg-mr') {
       exclude group: 'org.apache.calcite.avatica'
     }
   }
+
+  shadowJar {
+    configurations = [project.configurations.compile]
+
+    zip64 true
+
+    // include the LICENSE and NOTICE files for the shaded Jar
+    from(projectDir) {
+      include 'LICENSE'
+      include 'NOTICE'
+    }
+
+    dependencies {
+      include(dependency('com.github.ben-manes.caffeine:caffeine:'))

Review comment:
       why not add dependencies using the `compile` configuration. ? Adding it this way, I think only adds that specific dependency. Also I'm not sure just using a group id is a good idea here as it may include unnecessary jars.
   
   Maybe we can do something similar to what other runtime modules are doing

##########
File path: build.gradle
##########
@@ -404,6 +408,29 @@ project(':iceberg-mr') {
       exclude group: 'org.apache.calcite.avatica'
     }
   }
+
+  shadowJar {
+    configurations = [project.configurations.compile]
+
+    zip64 true
+
+    // include the LICENSE and NOTICE files for the shaded Jar
+    from(projectDir) {
+      include 'LICENSE'
+      include 'NOTICE'
+    }
+
+    dependencies {
+      include(dependency('com.github.ben-manes.caffeine:caffeine:'))

Review comment:
       why not add dependencies using the `compile` configuration. ? Adding it this way, I think only adds that specific dependency and not their transitive artifacts. Also I'm not sure just using a group id is a good idea here as it may include unnecessary jars.
   
   Maybe we can do something similar to what other runtime modules are doing




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-667980717


   OK, looks like #1243 works in distributed mode in Hive so that's good. I'll wait until that PR is merged, then I'll update this one and just focus on the packaging changes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-665760682


   @guilload I've taken the `iceberg-mr-all.jar` that the above produces and added it to a Hive client's classpath by doing the following:
   ```
   hive> add jar /home/hadoop/iceberg/0.9.0-SNAPSHOT/iceberg-mr-all.jar;
   Added [/home/hadoop/iceberg/0.9.0-SNAPSHOT/iceberg-mr-all.jar] to class path
   ```
   I've then created a Hive table on top of an existing Iceberg table by doing the following:
   ```
   CREATE EXTERNAL TABLE default.iceberg_table_a STORED BY 'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler' LOCATION 'hdfs://host:port/hiveberg/table_a';
   ```
   I can successfully perform a `SELECT *` from this but if I add an `ORDER BY` clause to force a Map Reduce job to execute it fails with the following error:
   ```
   Error: java.io.IOException: java.lang.NullPointerException: Table cannot be null
           at org.apache.hadoop.hive.io.HiveIOExceptionHandlerChain.handleRecordReaderCreationException(HiveIOExceptionHandlerChain.java:97)
           at org.apache.hadoop.hive.io.HiveIOExceptionHandlerUtil.handleRecordReaderCreationException(HiveIOExceptionHandlerUtil.java:57)
           at org.apache.hadoop.hive.ql.io.HiveInputFormat.getRecordReader(HiveInputFormat.java:379)
           at org.apache.hadoop.hive.ql.io.CombineHiveInputFormat.getRecordReader(CombineHiveInputFormat.java:678)
           at org.apache.hadoop.mapred.MapTask$TrackedRecordReader.<init>(MapTask.java:170)
           at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:433)
           at org.apache.hadoop.mapred.MapTask.run(MapTask.java:344)
           at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:175)
           at java.security.AccessController.doPrivileged(Native Method)
           at javax.security.auth.Subject.doAs(Subject.java:422)
           at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1844)
           at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:169)
   Caused by: java.lang.NullPointerException: Table cannot be null
           at org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:897)
           at org.apache.iceberg.mr.hive.HiveIcebergInputFormat.forwardConfigSettings(HiveIcebergInputFormat.java:76)
           at org.apache.iceberg.mr.hive.HiveIcebergInputFormat.getRecordReader(HiveIcebergInputFormat.java:63)
           at org.apache.hadoop.hive.ql.io.HiveInputFormat.getRecordReader(HiveInputFormat.java:376)
           ... 9 more
   ```
   I haven't had time to look into it in depth but I know we had this working in Hiveberg so there is something in the new InputFormat that is failing. I tried removing the null checks and adding "if not null" checks in the code below them but the NPE then just moves further down in the code:
   ```
   Caused by: java.lang.NullPointerException
           at java.util.Objects.requireNonNull(Objects.java:203)
           at com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2296)
           at com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:111)
           at com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:54)
           at org.apache.iceberg.SchemaParser.fromJson(SchemaParser.java:247)
           at org.apache.iceberg.mr.mapreduce.IcebergInputFormat$IcebergRecordReader.initialize(IcebergInputFormat.java:181)
           at org.apache.iceberg.mr.mapred.MapredIcebergInputFormat$MapredIcebergRecordReader.<init>(MapredIcebergInputFormat.java:92)
           at org.apache.iceberg.mr.mapred.MapredIcebergInputFormat.getRecordReader(MapredIcebergInputFormat.java:78)
           at org.apache.iceberg.mr.hive.HiveIcebergInputFormat.getRecordReader(HiveIcebergInputFormat.java:64)
           at org.apache.hadoop.hive.ql.io.HiveInputFormat.getRecordReader(HiveInputFormat.java:376)
           ... 26 more
   ```
   You said you had this working via a Hive client, what have I done differently that I'm running into all these exceptions?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r481236257



##########
File path: settings.gradle
##########
@@ -24,6 +24,7 @@ include 'core'
 include 'data'
 include 'flink'
 include 'mr'
+include 'mr-runtime'

Review comment:
       No problem! I think with this one and filter pushdown in, we're about ready for a release with Hive read support! Would be good to get projection pushdown in, but I'm not sure how difficult that will be.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage edited a comment on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage edited a comment on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-666338236


   @rdsr @guilload I tried both your approaches separately by taking just the Java code changes into this branch which does the repackaging and can confirm that both work using mapreduce and tez on a distributed cluster. So that's good news! I think we can move forward with either one, let me know which and I could merge them into this branch and then sort out the contents of the uber jar and then hopefully we have something that works.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r481106525



##########
File path: hive-runtime/LICENSE
##########
@@ -0,0 +1,463 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+--------------------------------------------------------------------------------
+
+This binary artifact contains Apache Avro.

Review comment:
       I compared the contents of the uber jar and the `LICENSE` and `NOTICE` files from the `spark-runtime` project and it looks like `hive-runtime` contains a _subset_ of  what is in`spark-runtime` so doesn't require anything additional. I removed everything from these two files that isn't actually in the jar file so this should now be correct.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r478463077



##########
File path: mr-runtime/LICENSE
##########
@@ -0,0 +1,581 @@
+

Review comment:
       I copied this and `NOTICE` from `iceberg-spark-runtime` do I need to modify them in any way? Can we use the files from the project root instead?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-666338236


   @rdsr @guilload I tried both your approaches separetely by taking just the Java code changes into this branch which does the repackaging and can confirm that both work using mapreduce and tez on a distributed cluster. So that's good news! I think we can move forward with either one, let me know which and I could merge them into this branch and then sort out the contents of the uber jar and then hopefully we have something that works.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdsr edited a comment on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
rdsr edited a comment on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-665870006


   > I run MR in local mode whereas this seems to be running in distributed mode with YARN. I'll have to dig deeper but my guess is that `table` is null because in that case the calls to `getSplits` and then `getRecordReader` happens in two different processes.
   > 
   > You mind trying this [branch](https://github.com/guilload/iceberg/tree/guilload--carry-table-schema-and-projection-within-iceberg-split)? I've added a `schema` and a `projection` attribute to `IcebergSplit`, this way we can remove the "forwarding" logic in the input format. @rdsr, what do you think of this approach? One downside is the increase in size of the serialized splits.
   
   Yea, I think that might be the reason


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] guilload commented on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
guilload commented on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-665845026


   I run MR in local mode whereas this seems to be running in distributed mode with YARN. I'll have to dig deeper but my guess is that `table` is null because in that case the calls to `getSplits` and then `getRecordReader` happens in two different processes.
   
   You mind trying this [branch](https://github.com/guilload/iceberg/tree/guilload--carry-table-schema-and-projection-within-iceberg-split)? I've added a `schema` and a `projection` attribute to `IcebergSplit`, this way we can remove the "forwarding" logic in the input format. @rdsr, what do you think of this approach? One downside is the increase in size of the serialized splits.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue merged pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
rdblue merged pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-684826894


   @rdblue @rdsr I believe your previous comments have now been addressed, could you please take another look?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r462416867



##########
File path: build.gradle
##########
@@ -404,6 +408,29 @@ project(':iceberg-mr') {
       exclude group: 'org.apache.calcite.avatica'
     }
   }
+
+  shadowJar {
+    configurations = [project.configurations.compile]
+
+    zip64 true
+
+    // include the LICENSE and NOTICE files for the shaded Jar
+    from(projectDir) {
+      include 'LICENSE'
+      include 'NOTICE'
+    }
+
+    dependencies {

Review comment:
       More probably need to be added but the below appears to be the bare minimum needed in order to execute the table DDL and perform a simple query of a Parquet Iceberg table from Hive.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r479568342



##########
File path: mr-runtime/LICENSE
##########
@@ -0,0 +1,581 @@
+

Review comment:
       If you want, we can get the module out with a follow-up item to go over the LICENSE and NOTICE files. I know that's a difficult task for anyone who hasn't done it before. I normally go through the runtime modules just before a release and update them.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-667163743


   > 
   > 
   > @massdosage, @rdsr and I chatted "offline" and decided to integrate his changes in #1243.
   
   OK, I'll try out the branch from #1243 along with the packaging changes in this branch to see how that works on Hive in distributed mode. I'll report back here, will probably only be on Monday though.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r478463898



##########
File path: settings.gradle
##########
@@ -24,6 +24,7 @@ include 'core'
 include 'data'
 include 'flink'
 include 'mr'
+include 'mr-runtime'

Review comment:
       This name matches the module its based on, another option would be `hive-runtime`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r462922676



##########
File path: build.gradle
##########
@@ -404,6 +408,29 @@ project(':iceberg-mr') {
       exclude group: 'org.apache.calcite.avatica'
     }
   }
+
+  shadowJar {
+    configurations = [project.configurations.compile]
+
+    zip64 true
+
+    // include the LICENSE and NOTICE files for the shaded Jar
+    from(projectDir) {
+      include 'LICENSE'
+      include 'NOTICE'
+    }
+
+    dependencies {
+      include(dependency('com.github.ben-manes.caffeine:caffeine:'))

Review comment:
       Yeah, as I said in the comment, I've just done this to see what the bare minimum needed to get it working on a cluster is. Once we have it actually working properly in Hive I can fix this up. I can try not specifying any dependencies and inherit all the compile time ones and relocate the problematic ones but my concern is that we're going to then end up having a huge number of clashes with other jars on Hive's classpath which is why I wanted to narrow this down to as few as possible. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-678349777


   #1243 has now been merged so work can continue here. In the community sync we agreed to move the production of this jar out to a new subproject (tentatively entitled `iceberg-mr-runtime`) and model it on `iceberg-spark-runtime` (i.e. include more dependencies to produce a bigger jar and relocate where necessary to avoid execution engine classpath clashes). I'll hopefully have time to do this next week.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdsr commented on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
rdsr commented on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-665870006


   > I run MR in local mode whereas this seems to be running in distributed mode with YARN. I'll have to dig deeper but my guess is that `table` is null because in that case the calls to `getSplits` and then `getRecordReader` happens in two different processes.
   > 
   > You mind trying this [branch](https://github.com/guilload/iceberg/tree/guilload--carry-table-schema-and-projection-within-iceberg-split)? I've added a `schema` and a `projection` attribute to `IcebergSplit`, this way we can remove the "forwarding" logic in the input format. @rdsr, what do you think of this approach? One downside is the increase in size of the serialized splits.
   
   Yea, I think that is the reason


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] massdosage commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
massdosage commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r481042018



##########
File path: settings.gradle
##########
@@ -24,6 +24,7 @@ include 'core'
 include 'data'
 include 'flink'
 include 'mr'
+include 'mr-runtime'

Review comment:
       Sure, I'll rename this now. As for the iceberg-hive-metastore rename, I'm happy to do that too, should that be in a separate PR or as part of this one?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] guilload commented on pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
guilload commented on pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#issuecomment-666709546


   @massdosage, @rdsr and I chatted "offline" and decided to integrate his changes in #1243.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r481226378



##########
File path: settings.gradle
##########
@@ -24,6 +24,7 @@ include 'core'
 include 'data'
 include 'flink'
 include 'mr'
+include 'mr-runtime'

Review comment:
       That would be great, thank you! I think a separate PR.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #1267: Single jar for input formats

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #1267:
URL: https://github.com/apache/iceberg/pull/1267#discussion_r478540343



##########
File path: settings.gradle
##########
@@ -24,6 +24,7 @@ include 'core'
 include 'data'
 include 'flink'
 include 'mr'
+include 'mr-runtime'

Review comment:
       I think we should use `iceberg-hive-runtime`. Eventually, we will probably rename iceberg-mr to iceberg-hive. We also need to rename iceberg-hive to iceberg-hive-metastore.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org