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/10/11 16:40:30 UTC

[GitHub] [iceberg] rdsr commented on a change in pull request #1582: MR: Fix NPE when InputSplit.getLocations is called on mappers

rdsr commented on a change in pull request #1582:
URL: https://github.com/apache/iceberg/pull/1582#discussion_r502938185



##########
File path: mr/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergSplit.java
##########
@@ -74,9 +74,11 @@ public long getLength() {
 
   @Override
   public String[] getLocations() {
-    if (locations == null) {
+    if (locations == null && conf != null) {

Review comment:
       I think a comment can help here saying `implementation of getLocations is only meant to be used on the client side during splits computation.  getLocations won't be accurate when called on worker nodes `




----------------------------------------------------------------
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