Skip to content

Commit

Permalink
Merge pull request apache#437 from sebastian-nagel/NUTCH-2693-misspel…
Browse files Browse the repository at this point in the history
…led-properties

NUTCH-2693 Misspelled configuration property names in documentation
  • Loading branch information
sebastian-nagel authored Feb 22, 2019
2 parents 8cf9e67 + 4787d40 commit e95c915
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions conf/nutch-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -849,14 +849,14 @@
<value>-1</value>
<description>The maximum number of urls in a single
fetchlist. -1 if unlimited. The urls are counted according
to the value of the parameter generator.count.mode.
to the value of the parameter generate.count.mode.
</description>
</property>

<property>
<name>generate.count.mode</name>
<value>host</value>
<description>Determines how the URLs are counted for generator.max.count.
<description>Determines how the URLs are counted for generate.max.count.
Default value is 'host' but can be 'domain'. Note that we do not count
per IP in the new version of the Generator.
</description>
Expand Down Expand Up @@ -1062,7 +1062,7 @@
<property>
<name>fetcher.throughput.threshold.retries</name>
<value>5</value>
<description>The number of times the fetcher.throughput.threshold is allowed to be exceeded.
<description>The number of times the fetcher.throughput.threshold.pages is allowed to be exceeded.
This settings prevents accidental slow downs from immediately killing the fetcher thread.
</description>
</property>
Expand Down
6 changes: 3 additions & 3 deletions src/java/org/apache/nutch/crawl/Generator.java
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,9 @@ public Path[] generate(Path dbDir, Path segments, int numLists, long topN,

/**
* Generate fetchlists in one or more segments. Whether to filter URLs or not
* is read from the crawl.generate.filter property in the configuration files.
* If the property is not found, the URLs are filtered. Same for the
* normalisation.
* is read from the &quot;generate.filter&quot; property set for the job from
* command-line. If the property is not found, the URLs are filtered. Same for
* the normalisation.
*
* @param dbDir
* Crawl database directory
Expand Down
2 changes: 1 addition & 1 deletion src/java/org/apache/nutch/net/protocols/Response.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static enum TruncatedContentReason {
NOT_TRUNCATED,
/** fetch exceeded configured http.content.limit */
LENGTH,
/** fetch exceeded configured http.fetch.duration */
/** fetch exceeded configured http.time.limit */
TIME,
/** network disconnect or timeout during fetch */
DISCONNECT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ private void writeQuoted (String value) throws IOException {

/**
* Write a value to output stream. Escape quote characters.
* Clip value after <code>indexer.csv.maxfieldlength</code> characters.
* Clip value after <code>maxfieldlength</code> characters.
*
* @param value
* String to write
Expand All @@ -419,7 +419,7 @@ private void writeEscaped (String value, int nextQuoteChar) throws IOException {

/**
* Write a value to output stream. Escape quote characters. Clip value after
* <code>indexer.csv.maxfieldlength</code> characters.
* <code>maxfieldlength</code> characters.
*/
private void writeEscaped (String value) throws IOException {
int nextQuoteChar = quoteCharacter.find(value, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,34 +236,34 @@ public okhttp3.Response intercept(Interceptor.Chain chain)
String httpProtocol = response.protocol().toString()
.toUpperCase(Locale.ROOT);
if (useHttp2 && "H2".equals(httpProtocol)) {
// back-warc compatible protocol name
// back-ward compatible protocol name
httpProtocol = "HTTP/2";
}

StringBuilder resquestverbatim = null;
StringBuilder requestverbatim = null;
StringBuilder responseverbatim = null;

if (storeHttpRequest) {
resquestverbatim = new StringBuilder();
requestverbatim = new StringBuilder();

resquestverbatim.append(request.method()).append(' ');
resquestverbatim.append(request.url().encodedPath());
requestverbatim.append(request.method()).append(' ');
requestverbatim.append(request.url().encodedPath());
String query = request.url().encodedQuery();
if (query != null) {
resquestverbatim.append('?').append(query);
requestverbatim.append('?').append(query);
}
resquestverbatim.append(' ').append(httpProtocol).append("\r\n");
requestverbatim.append(' ').append(httpProtocol).append("\r\n");

Headers headers = request.headers();

for (int i = 0, size = headers.size(); i < size; i++) {
String key = headers.name(i);
String value = headers.value(i);
resquestverbatim.append(key).append(": ").append(value)
requestverbatim.append(key).append(": ").append(value)
.append("\r\n");
}

resquestverbatim.append("\r\n");
requestverbatim.append("\r\n");
}

if (storeHttpHeaders) {
Expand Down Expand Up @@ -294,9 +294,9 @@ public okhttp3.Response intercept(Interceptor.Chain chain)
builder = builder.header(Response.IP_ADDRESS, ipAddress);
}

if (resquestverbatim != null) {
if (requestverbatim != null) {
byte[] encodedBytesRequest = Base64.getEncoder()
.encode(resquestverbatim.toString().getBytes());
.encode(requestverbatim.toString().getBytes());
builder = builder.header(Response.REQUEST,
new String(encodedBytesRequest));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void testOrphanScoringFilter() throws Exception {
+ CrawlDatum.getStatusName(datum.getStatus()),
CrawlDatum.STATUS_DB_NOTMODIFIED, datum.getStatus());

// Wait until mark.gone.after
// Wait until scoring.orphan.mark.gone.after
try {
Thread.sleep(5000);
} catch (Exception e) {
Expand All @@ -106,7 +106,7 @@ public void testOrphanScoringFilter() throws Exception {
+ CrawlDatum.getStatusName(datum.getStatus()),
CrawlDatum.STATUS_DB_GONE, datum.getStatus());

// Wait until mark.orphan.after
// Wait until scoring.orphan.mark.orphan.after
try {
Thread.sleep(5000);
} catch (Exception e) {
Expand Down
6 changes: 3 additions & 3 deletions src/test/org/apache/nutch/crawl/TestGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public int compare(URLCrawlDatum tuple1, URLCrawlDatum tuple2) {
}

/**
* Test that generator obeys the property "generate.max.per.host".
* Test that generator obeys the property "generate.max.count".
*
* @throws Exception
*/
Expand Down Expand Up @@ -195,8 +195,8 @@ public void testGenerateHostLimit() throws Exception {
}

/**
* Test that generator obeys the property "generator.max.count" and
* "generator.count.per.domain".
* Test that generator obeys the property "generate.max.count" and
* "generate.count.mode".
*
* @throws Exception
*/
Expand Down

0 comments on commit e95c915

Please sign in to comment.