rdblue commented on a change in pull request #2664:
URL: https://github.com/apache/iceberg/pull/2664#discussion_r648773010



##########
File path: spark3/src/main/java/org/apache/iceberg/spark/SparkCatalog.java
##########
@@ -380,7 +381,12 @@ public boolean dropNamespace(String[] namespace) throws 
NoSuchNamespaceException
   @Override
   public final void initialize(String name, CaseInsensitiveStringMap options) {
     this.cacheEnabled = 
Boolean.parseBoolean(options.getOrDefault("cache-enabled", "true"));
-    Catalog catalog = buildIcebergCatalog(name, options);
+
+    Map<String, String> map = new HashMap<>(options.asCaseSensitiveMap());
+    map.put("spark.app.id", 
SparkSession.active().sparkContext().applicationId());
+    map.put("spark.user", SparkSession.active().sparkContext().sparkUser());

Review comment:
       I think we should use generic property names here so that we could do 
the same thing from Flink or other similar catalog wrapper classes to add 
common context. Instead of `spark.user` we should maybe use just `user` (if it 
isn't set) and instead of `spark.app.id` use `app-id`.




-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to