LuciferYang commented on code in PR #34829:
URL: https://github.com/apache/spark/pull/34829#discussion_r983317042


##########
core/src/main/scala/org/apache/spark/deploy/history/EventLogFileWriters.scala:
##########
@@ -229,6 +232,15 @@ class SingleEventLogFileWriter(
     writeLine(eventJson, flushLogger)
   }
 
+  override def writeToXAttr(attrName: String, attrValue: String): Unit = {
+    try {
+      fileSystem.setXAttr(new Path(inProgressPath), attrName, 
attrValue.getBytes())
+    } catch {
+      case _: IOException =>

Review Comment:
   hmm, I think additional catch `UnsupportedOperationException` should be 
added. Not all `FileSystem` supports this api, the default  implementation is 
to throw `UnsupportedOperationException`.
   
   
https://github.com/apache/hadoop/blob/e22f5e75aeff23d6c8dc1b67cb6f4fd4a4c416dc/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/
  .java#L3225-L3229



##########
core/src/main/scala/org/apache/spark/deploy/history/EventLogFileWriters.scala:
##########
@@ -229,6 +232,15 @@ class SingleEventLogFileWriter(
     writeLine(eventJson, flushLogger)
   }
 
+  override def writeToXAttr(attrName: String, attrValue: String): Unit = {
+    try {
+      fileSystem.setXAttr(new Path(inProgressPath), attrName, 
attrValue.getBytes())
+    } catch {
+      case _: IOException =>

Review Comment:
   hmm ... I think additional catch `UnsupportedOperationException` should be 
added. Not all `FileSystem` supports this api, the default  implementation is 
to throw `UnsupportedOperationException`.
   
   
https://github.com/apache/hadoop/blob/e22f5e75aeff23d6c8dc1b67cb6f4fd4a4c416dc/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/
  .java#L3225-L3229



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

To unsubscribe, e-mail: [email protected]

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