Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void undo(long tid, Manager env) {
public static void exportTable(VolumeManager fs, ServerContext context, String tableName,
TableId tableID, String exportDir) throws Exception {

int count = 0;
// int count = 0;
Set<String> volumeSet = new TreeSet<>();

fs.mkdirs(new Path(exportDir));
Expand Down Expand Up @@ -194,14 +194,7 @@ public static void exportTable(VolumeManager fs, ServerContext context, String t
// make a set of unique volumes from the map
for (String fileString : uniqueFiles.values()) {
String[] fileSegmentArray = fileString.split("/");
for (String fileSegment : fileSegmentArray) {
++count;
if (count == 3) {
volumeSet.add(fileSegment);
break;
}
}
count = 0;
volumeSet.add(fileSegmentArray[2]);
}

// for each unique volume: get every matching entry in the map and send to createDistcpFile
Expand All @@ -225,7 +218,7 @@ public static void exportTable(VolumeManager fs, ServerContext context, String t
private static void createDistcpFile(VolumeManager fs, String exportDir, Path exportMetaFilePath,
Set<String> uniqueFiles, String volumeName) throws IOException {
if (volumeName.contains(":")) {
volumeName = volumeName.substring(0, volumeName.indexOf(":"));
volumeName = volumeName.replace(":", "-");
}

BufferedWriter distcpOut = new BufferedWriter(new OutputStreamWriter(
Expand Down