Skip to content

Commit 5237fb1

Browse files
committed
Rename sortUnique to deduplicate
1 parent ae2471b commit 5237fb1

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/main/java/org/radarcns/hdfs/data/FileCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void close() throws IOException {
142142
if (!hasError.get()) {
143143
if (deduplicate) {
144144
long timeDedup = System.nanoTime();
145-
converterFactory.sortUnique(fileName, tmpPath, tmpPath, compression);
145+
converterFactory.deduplicate(fileName, tmpPath, tmpPath, compression);
146146
Timer.getInstance().add("close.deduplicate", timeDedup);
147147
}
148148

src/main/java/org/radarcns/hdfs/data/RecordConverterFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ default boolean hasHeader() {
4848
return false;
4949
}
5050

51-
default void sortUnique(String fileName, Path source, Path target,
51+
default void deduplicate(String fileName, Path source, Path target,
5252
Compression compression)
5353
throws IOException {
5454
// read all lines into memory; assume a 100-byte line length

src/test/java/org/radarcns/hdfs/data/CsvAvroConverterTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public void deduplicate(@TempDir Path dir) throws IOException {
191191
try (BufferedWriter writer = Files.newBufferedWriter(path)) {
192192
writeTestNumbers(writer);
193193
}
194-
CsvAvroConverter.getFactory().sortUnique("t", path, path, new IdentityCompression());
194+
CsvAvroConverter.getFactory().deduplicate("t", path, path, new IdentityCompression());
195195
assertEquals(Arrays.asList("a,b", "1,2", "3,4", "1,3", "a,a"), Files.readAllLines(path));
196196
}
197197

@@ -205,7 +205,7 @@ public void deduplicateGzip(@TempDir Path dir) throws IOException {
205205
Writer writer = new OutputStreamWriter(gzipOut)) {
206206
writeTestNumbers(writer);
207207
}
208-
CsvAvroConverter.getFactory().sortUnique("t", path, path, new GzipCompression());
208+
CsvAvroConverter.getFactory().deduplicate("t", path, path, new GzipCompression());
209209
try (InputStream in = Files.newInputStream(path);
210210
GZIPInputStream gzipIn = new GZIPInputStream(in);
211211
Reader inReader = new InputStreamReader(gzipIn);

src/test/java/org/radarcns/hdfs/data/JsonAvroConverterTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void deduplicate(@TempDir Path folder) throws IOException {
8585
try (BufferedWriter writer = Files.newBufferedWriter(path)) {
8686
writeTestNumbers(writer);
8787
}
88-
JsonAvroConverter.getFactory().sortUnique("t", path, path, new IdentityCompression());
88+
JsonAvroConverter.getFactory().deduplicate("t", path, path, new IdentityCompression());
8989
assertEquals(Arrays.asList("a,b", "1,2", "3,4", "1,3", "a,a"), Files.readAllLines(path));
9090
}
9191
}

0 commit comments

Comments
 (0)