Skip to content

Commit

Permalink
Add new prefix for bulk load working files
Browse files Browse the repository at this point in the history
  • Loading branch information
ddanielr committed Oct 30, 2024
1 parent 926dec7 commit 235945b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/src/main/java/org/apache/accumulo/core/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public class Constants {
public static final String BULK_PREFIX = "b-";
public static final String BULK_RENAME_FILE = "renames.json";
public static final String BULK_LOAD_MAPPING = "loadmap.json";
public static final String BULK_WORKING_PREFIX = "accumulo-bulk-";

public static final String CLONE_PREFIX = "c-";
public static final byte[] CLONE_PREFIX_BYTES = CLONE_PREFIX.getBytes(UTF_8);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ public static List<FileStatus> filterInvalid(FileStatus[] files) {
continue;
}

if (FileOperations.getBulkWorkingFiles().contains(fname)) {
if (FileOperations.isBulkWorkingFile(fname)) {
log.debug("{} is an internal working file, ignoring.", fileStatus.getPath());
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ public abstract class FileOperations {
Set.of(Constants.BULK_LOAD_MAPPING, Constants.BULK_RENAME_FILE,
FileOutputCommitter.SUCCEEDED_FILE_NAME, HADOOP_JOBHISTORY_LOCATION);

public static boolean isBulkWorkingFile(String fileName) {
if (fileName.startsWith(Constants.BULK_WORKING_PREFIX)) {
return true;
}
return bulkWorkingFiles.contains(fileName);
}

public static Set<String> getValidExtensions() {
return validExtensions;
}
Expand Down

0 comments on commit 235945b

Please sign in to comment.