jon-wei commented on a change in pull request #12137:
URL: https://github.com/apache/druid/pull/12137#discussion_r820031738



##########
File path: docs/configuration/index.md
##########
@@ -1026,7 +1026,7 @@ The below is a list of the supported configurations for 
auto compaction.
 
 |Property|Description|Default|Required|
 |--------|-----------|-------|--------|
-|`dropExisting`|If `true`, then the generated compaction task drops (mark 
unused) all existing segments fully contained by the umbrella interval of the 
compacted segments when the task publishes new segments. If compaction fails, 
Druid does not drop or mark unused any segments. WARNING: this functionality is 
still in beta and can result in temporary data unavailability for data within 
the compacted `interval`. Note that changing this config does not cause 
intervals to be compacted again.|false|no|
+|`dropExisting`|If `true` the compaction task replaces all existing segments 
fully contained by the umbrella interval of the compacted segments when the 
task publishes new segments and tombstones. If compaction fails, Druid does 
publish any segments or tombstones. WARNING: this functionality is still in 
beta. Note that changing this config does not cause intervals to be compacted 
again.|false|no|

Review comment:
       ```suggestion
   |`dropExisting`|If `true` the compaction task replaces all existing segments 
fully contained by the umbrella interval of the compacted segments when the 
task publishes new segments and tombstones. If compaction fails, Druid does not 
publish any segments or tombstones. WARNING: this functionality is still in 
beta. Note that changing this config does not cause intervals to be compacted 
again.|false|no|
   ```

##########
File path: 
core/src/main/java/org/apache/druid/segment/loading/TombstoneLoadSpec.java
##########
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.segment.loading;
+
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.io.Files;
+import org.apache.druid.initialization.TombstoneDataStorageModule;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+@JsonTypeName(TombstoneDataStorageModule.SCHEME)
+public class TombstoneLoadSpec implements LoadSpec
+{
+  @Override
+  public LoadSpecResult loadSegment(File destDir) throws 
SegmentLoadingException
+  {
+    try {
+      return new LoadSpecResult(witeFactoryFile(destDir));
+    }
+    catch (IOException e) {
+      throw new SegmentLoadingException(
+          "Failed to create factory.json for tombstone in dir [%s]",
+          destDir.getAbsolutePath()
+      );
+
+    }
+  }
+
+  @VisibleForTesting
+  public static int witeFactoryFile(File destDir) throws IOException

Review comment:
       ```suggestion
     public static int writeFactoryFile(File destDir) throws IOException
   ```




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