justinborromeo commented on a change in pull request #7035: Improve error 
message for revoked locks
URL: https://github.com/apache/incubator-druid/pull/7035#discussion_r254888650
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/indexing/overlord/SegmentPublishResult.java
 ##########
 @@ -42,20 +43,29 @@
 {
   private final Set<DataSegment> segments;
   private final boolean success;
+  @Nullable
+  private final String errorMsg;
 
-  public static SegmentPublishResult fail()
+  public static SegmentPublishResult ok(Set<DataSegment> segments)
   {
-    return new SegmentPublishResult(ImmutableSet.of(), false);
+    return new SegmentPublishResult(segments, true, null);
+  }
+
+  public static SegmentPublishResult fail(String errorMsg)
+  {
+    return new SegmentPublishResult(ImmutableSet.of(), false, errorMsg);
   }
 
   @JsonCreator
-  public SegmentPublishResult(
+  private SegmentPublishResult(
 
 Review comment:
   Is there any value in having a serde test for this class?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to