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 2021/04/19 22:27:28 UTC

[GitHub] [iceberg] RussellSpitzer commented on a change in pull request #2362: Spark: Pass Table object to executors

RussellSpitzer commented on a change in pull request #2362:
URL: https://github.com/apache/iceberg/pull/2362#discussion_r616217832



##########
File path: spark/src/main/java/org/apache/iceberg/actions/RewriteDataFilesAction.java
##########
@@ -59,10 +59,8 @@ protected FileIO fileIO() {
   @Override
   protected List<DataFile> rewriteDataForTasks(List<CombinedScanTask> combinedScanTasks) {
     JavaRDD<CombinedScanTask> taskRDD = sparkContext.parallelize(combinedScanTasks, combinedScanTasks.size());
-    Broadcast<FileIO> io = sparkContext.broadcast(fileIO());
-    Broadcast<EncryptionManager> encryption = sparkContext.broadcast(encryptionManager());
-    RowDataRewriter rowDataRewriter =
-        new RowDataRewriter(table(), spec(), caseSensitive(), io, encryption);
+    Broadcast<Table> tableBroadcast = sparkContext.broadcast(SerializableTable.copyOf(table()));
+    RowDataRewriter rowDataRewriter = new RowDataRewriter(tableBroadcast, spec(), caseSensitive());

Review comment:
       @flyrain  This is what I was mentioning today, so in the future you may be able to just extract the properties from the tableBroadcast




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