Skip to content

Commit 190d498

Browse files
Spotless: format Java sources
1 parent 2867ed1 commit 190d498

6 files changed

Lines changed: 31 additions & 12 deletions

File tree

src/main/java/org/commoncrawl/webgraph/HostToDomainGraph.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,12 @@ public class HostToDomainGraph {
8888
if ((numInputLinesNodes % 500000) != 0 || numInputLinesNodes == 0) {
8989
return;
9090
}
91-
LOG.info("Processed {} node input lines, mapped to {} domains, domain queue usage: {} (max. {})",
92-
numInputLinesNodes, (currentId + 1), domainQueue.size(), maxQueueUsed);
91+
LOG.info(
92+
"Processed {} node input lines, mapped to {} domains, domain queue usage: {} (max. {})",
93+
numInputLinesNodes,
94+
(currentId + 1),
95+
domainQueue.size(),
96+
maxQueueUsed);
9397
};
9498

9599
private Consumer<? super String> reporterInputEdges = (String line) -> {
@@ -441,7 +445,10 @@ public void convert(Function<String, String> func, Stream<String> in, PrintStrea
441445
in.map(func).filter(Objects::nonNull).forEach(out::println);
442446
}
443447

444-
public void convert(Function<String, String> func, Stream<String> in, PrintStream out,
448+
public void convert(
449+
Function<String, String> func,
450+
Stream<String> in,
451+
PrintStream out,
445452
Consumer<? super String> reporter) {
446453
convert(func, in.peek(reporter), out);
447454
}

src/main/java/org/commoncrawl/webgraph/explore/Graph.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,11 @@ public void subgraphMetrics(long[] nodes) {
522522
LOG.info("\toutlinks = {} (links from the subgraph to outer nodes)", clusterOutlinks);
523523
LOG.info("\ttotal inlinks = {} (all inlinks)", totalInlinks);
524524
LOG.info("\ttotal outlinks = {} (all outlinks)", totalOutlinks);
525-
LOG.info("\tnodes linked = {} (outer nodes linked from subgraph)",
525+
LOG.info(
526+
"\tnodes linked = {} (outer nodes linked from subgraph)",
526527
sharedSuccessors(nodes, 1, nodes.length).length);
527-
LOG.info("\tnodes linking = {} (outer nodes linking to subgraph)",
528+
LOG.info(
529+
"\tnodes linking = {} (outer nodes linking to subgraph)",
528530
sharedPredecessors(nodes, 1, nodes.length).length);
529531
}
530532
}

src/main/java/org/commoncrawl/webgraph/explore/GraphExplorer.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,11 @@ public void printVertices(int[] vertexIDs) {
304304
*/
305305
public static Stream<Entry<String, Long>> frequencies(Stream<String> strings) {
306306
final Comparator<Entry<String, Long>> comp = Comparator.comparingLong((Entry<String, Long> e) -> e.getValue())
307-
.reversed().thenComparing(Comparator.comparing((Entry<String, Long> e) -> e.getKey()));
308-
return strings.collect(Collectors.groupingBy(Function.identity(), Collectors.counting())).entrySet().stream()
307+
.reversed()
308+
.thenComparing(Comparator.comparing((Entry<String, Long> e) -> e.getKey()));
309+
return strings.collect(Collectors.groupingBy(Function.identity(), Collectors.counting()))
310+
.entrySet()
311+
.stream()
309312
.sorted(comp);
310313
}
311314
}

src/test/java/org/commoncrawl/webgraph/TestCountingMergedIntIterator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ void testSimple() {
5757
assertTrue(iter.getCount() > 0);
5858
totalCount += iter.getCount();
5959
assertFalse(iter.hasNext());
60-
assertEquals(totalCountExpected, totalCount,
60+
assertEquals(
61+
totalCountExpected,
62+
totalCount,
6163
"expected total count for input " + Arrays.deepToString(tArrays) + " is " + totalCountExpected);
6264
}
6365

src/test/java/org/commoncrawl/webgraph/TestHostToDomainGraph.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ void testConvertNodesHyphenatedDomainsSubDomainOnly() {
230230
testSorted(hostGraphHyphenatedDomainsSubDomainOnly);
231231
testSorted(domainGraphHyphenatedDomains);
232232
converter.doCount(true);
233-
assertArrayEquals(domainGraphHyphenatedDomainsSubDomainOnly,
233+
assertArrayEquals(
234+
domainGraphHyphenatedDomainsSubDomainOnly,
234235
convert(converter, hostGraphHyphenatedDomainsSubDomainOnly));
235236
}
236237

@@ -250,7 +251,8 @@ void testConvertNodesHyphenatedDomainsIncludingMultiPartSuffixes() {
250251
testSorted(domainGraphHyphenatedDomainsInclMultiPartSuffixes);
251252
converter.doCount(true);
252253
converter.multiPartSuffixesAsDomains(true);
253-
assertArrayEquals(domainGraphHyphenatedDomainsInclMultiPartSuffixes,
254+
assertArrayEquals(
255+
domainGraphHyphenatedDomainsInclMultiPartSuffixes,
254256
convert(converter, hostGraphHyphenatedDomains));
255257
}
256258

src/test/java/org/commoncrawl/webgraph/TestJoinSortRanks.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ void testLoadingDoubleArray() {
4141
try {
4242
LOG.info("Storing double array of length {} in file {}", arrSize, file.getAbsolutePath());
4343
BinIO.storeDoubles(arr, file);
44-
LOG.info("Successfully stored double array of length {} in file {}, resulting file size: {} bytes", arrSize,
45-
file.getAbsolutePath(), file.length());
44+
LOG.info(
45+
"Successfully stored double array of length {} in file {}, resulting file size: {} bytes",
46+
arrSize,
47+
file.getAbsolutePath(),
48+
file.length());
4649
assertEquals(intOverflow, file.length());
4750
LOG.info("Trying to clean up Java heap space...");
4851
arr = null;

0 commit comments

Comments
 (0)