Skip to content

Commit

Permalink
Correct spelling mistakes.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardBetts authored and ato committed Nov 4, 2018
1 parent e08d3ad commit aa705be
Show file tree
Hide file tree
Showing 46 changed files with 75 additions and 75 deletions.
2 changes: 1 addition & 1 deletion commons/src/main/java/org/archive/bdb/BdbModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ public void doCheckpoint(final Checkpoint checkpointInProgress) throws IOExcepti
dbc.database.sync();
}

// Do a force checkpoint. Thats what a sync does (i.e. doSync).
// Do a force checkpoint. That's what a sync does (i.e. doSync).
CheckpointConfig chkptConfig = new CheckpointConfig();
chkptConfig.setForce(true);

Expand Down
2 changes: 1 addition & 1 deletion commons/src/main/java/org/archive/io/Warc2Arc.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ protected void transform(final WARCReader reader, final ARCWriter writer)
int offset = r.getHeader().getContentBegin();
// This mimetype is not exactly what you'd expect to find in
// an ARC though technically its 'correct'. To get right one,
// need to parse the HTTP Headers. Thats messy. Not doing for
// need to parse the HTTP Headers. That's messy. Not doing for
// now.
String mimetype = r.getHeader().getMimetype();
// Clean out ISO time string '-', 'T', ':', and 'Z' characters.
Expand Down
4 changes: 2 additions & 2 deletions commons/src/main/java/org/archive/spring/Sheet.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void setMap(Map<String, Object> m) {
}

/**
* Ensure any properties targetted by this Sheet know to
* Ensure any properties targeted by this Sheet know to
* check the right property paths for overrides at lookup time,
* and that the override values are compatible types for their
* destination properties.
Expand Down Expand Up @@ -130,7 +130,7 @@ public void prime() {
try {
hkp = (HasKeyedProperties) bean;
} catch (ClassCastException cce) {
// targetted bean has no overridable properties
// targeted bean has no overridable properties
throw new TypeMismatchException(bean,HasKeyedProperties.class,cce);
}
// install knowledge of this path
Expand Down
4 changes: 2 additions & 2 deletions commons/src/main/java/org/archive/util/Histotable.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class Histotable<K> extends TreeMap<K,Long> {
private static final long serialVersionUID = 310306238032568623L;

/**
* Record one more occurence of the given object key.
* Record one more occurrence of the given object key.
*
* @param key Object key.
*/
Expand All @@ -52,7 +52,7 @@ public void tally(K key) {
}

/**
* Record <i>count</i> more occurence(s) of the given object key.
* Record <i>count</i> more occurrence(s) of the given object key.
*
* @param key Object key.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void setIdentityCache(ObjectIdentityCache<?> cache) {
}

//
// AutoKryo suppport
// AutoKryo support
//
public static void autoregisterTo(AutoKryo kryo) {
kryo.register(IdentityCacheableWrapper.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected void makeSpace() {
}

private void grow() {
// Catastrophic event. Log its occurance.
// Catastrophic event. Log its occurrence.
logger.info("Doubling fingerprinting slots to "
+ (1 << this.capacityPowerOfTwo));
long[] oldValues = values;
Expand Down
2 changes: 1 addition & 1 deletion commons/src/main/java/org/archive/util/ms/package.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ <h3>The Piece Table</h3>
were not "fast-saved".

<p>The reader returned by
{@link org.achive.util.ms.Doc#getText(SeekInputStream)} consults the piece
{@link org.archive.util.ms.Doc#getText(SeekInputStream)} consults the piece
table to determine where in the WordDocument subfile the next piece of text
is located. It also uses the piece table to determine how bytes should be
converted to Unicode characters.
Expand Down
2 changes: 1 addition & 1 deletion commons/src/test/java/org/archive/io/ArchiveTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ private void dumpArchive(ArchiveReader reader) throws IOException {

/**
* wayback-like replay of ARC record at offset
* @param arcReader an ARCReader intance
* @param arcReader an ARCReader instance
* @throws IOException
*/
private void replayRecord(ARCReader arcReader) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ public void beginCrawlStop() {
}

/**
* Stop the crawl temporarly.
* Stop the crawl temporarily.
*/
public synchronized void requestCrawlPause() {
if (state == State.PAUSING || state == State.PAUSED) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ public List<File> getImportedConfigs(File xml) {
}

/**
* Return all known ConfigPaths, as an aid to viewing or editting.
* Return all known ConfigPaths, as an aid to viewing or editing.
*
* @return all ConfigPaths known to the ApplicationContext, in a
* map by name, or an empty map if no ApplicationContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public enum CrawlStatus {

/** Inital value. May not be ready to run/incomplete. */
/** Initial value. May not be ready to run/incomplete. */
CREATED("Created"),

/** Job has been successfully submitted to a CrawlJobHandler. */
Expand All @@ -28,7 +28,7 @@ public enum CrawlStatus {


/**
* Job finished normally when the specifed amount of data (MB) had been
* Job finished normally when the specified amount of data (MB) had been
* downloaded
*/
FINISHED_DATA_LIMIT("Finished - Maximum amount of data limit hit"),
Expand All @@ -43,12 +43,12 @@ public enum CrawlStatus {
FINISHED_WRITE_LIMIT("Finished - Maximum bytes written"),

/**
* Job is going to be temporarly stopped after active threads are finished.
* Job is going to be temporarily stopped after active threads are finished.
*/
WAITING_FOR_PAUSE("Pausing - Waiting for threads to finish"),


/** Job was temporarly stopped. State is kept so it can be resumed */
/** Job was temporarily stopped. State is kept so it can be resumed */
PAUSED("Paused"),


Expand Down
12 changes: 6 additions & 6 deletions engine/src/main/java/org/archive/crawler/framework/Frontier.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
public interface Frontier extends Lifecycle, Reporter {

/**
* Get the next URI that should be processed. If no URI becomes availible
* Get the next URI that should be processed. If no URI becomes available
* during the time specified null will be returned.
*
* @return the next URI that should be processed.
Expand All @@ -104,10 +104,10 @@ public interface Frontier extends Lifecycle, Reporter {
/**
* Returns true if the frontier contains no more URIs to crawl.
*
* <p>That is to say that there are no more URIs either currently availible
* <p>That is to say that there are no more URIs either currently available
* (ready to be emitted), URIs belonging to deferred hosts or pending URIs
* in the Frontier. Thus this method may return false even if there is no
* currently availible URI.
* currently available URI.
*
* @return true if the frontier contains no more URIs to crawl.
*/
Expand Down Expand Up @@ -235,7 +235,7 @@ public interface Frontier extends Lifecycle, Reporter {
* the processing chain. Can include failure to acquire prerequisites, to
* establish a connection with the host and any number of other problems.
* Does not count those that will be retried, only those that have
* permenantly failed.
* permanently failed.
*
* @return Number of URIs that failed to process.
*/
Expand Down Expand Up @@ -336,7 +336,7 @@ public long importRecoverFormat(File source, boolean applyScope,
* that are stored in cache (usually this means in memory
* rather then on disk, but that is an implementation
* detail) will be considered. Others will be entierly
* ignored, as if they dont exist. This is usefull for quick
* ignored, as if they don't exist. This is useful for quick
* peeks at the top of the URI list.
* @return A URIFrontierMarker that is set for the 'start' of the frontier's
* URI list.
Expand Down Expand Up @@ -370,7 +370,7 @@ public long importRecoverFormat(File source, boolean applyScope,
* invoking it.
*
* @param marker
* A marker specifing from what position in the Frontier the
* A marker specifying from what position in the Frontier the
* list should begin.
* @param numberOfMatches
* how many URIs to add at most to the list before returning it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ private void seriousError(Error err) {
currentCuri.setFetchStatus(S_SERIOUS_ERROR);
context = currentCuri.shortReportLine() + " in " + currentProcessorName;
}
String message = "Serious error occured trying " +
String message = "Serious error occurred trying " +
"to process '" + context + "'\n" + extraInfo;
logger.log(Level.SEVERE, message.toString(), err);
setPriority(DEFAULT_PRIORITY);
Expand All @@ -307,7 +307,7 @@ private void recoverableProblem(Throwable e) {
currentCuri.getAnnotations().add("err="+e.getClass().getName());
currentCuri.getData().put(A_RUNTIME_EXCEPTION, e);
String message = "Problem " + e +
" occured when trying to process '"
" occurred when trying to process '"
+ currentCuri.toString()
+ "' at step " + previousStep
+ " in " + currentProcessorName +"\n";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public int costOf(CrawlURI curi) {
Matcher m = TextUtils.getMatcher(CALENDARISH, curi.toString());
if (m.find()) {
cost++;
// TODO: consider if multiple occurences should cost more
// TODO: consider if multiple occurrences should cost more
}
TextUtils.recycleMatcher(m);
return cost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,9 @@ public void delete(CrawlURI item) throws DatabaseException {
/**
* Method used by BdbFrontier during checkpointing.
* <p>The backing bdbje database has been marked deferred write so we save
* on writes to disk. Means no guarantees disk will have whats in memory
* on writes to disk. Means no guarantees disk will have what's in memory
* unless a sync is called (Calling sync on the bdbje Environment is not
* sufficent).
* sufficient).
* <p>Package access only because only Frontiers of this package would ever
* need access.
* @see <a href="http://www.sleepycat.com/jedocs/GettingStartedGuide/DB.html">Deferred Write Databases</a>
Expand Down
6 changes: 3 additions & 3 deletions engine/src/main/java/org/archive/crawler/package.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h3>framework</h3>
<ol>
<li> <em>Core classes</em> - these can often be configured but not
replaced.
<li> <em>Pluggable classes</em> - these must implment a given interface
<li> <em>Pluggable classes</em> - these must implement a given interface
or extend a specific class but 3rd parties can introduce their own
implementations.
</ol>
Expand Down Expand Up @@ -86,7 +86,7 @@ <h3>Processor</h3>
When a URI is crawled, a {@link org.archive.crawler.framework.ToeThread
ToeThread} will execute a series of <tt>processors</tt> on it.
<p>
The processors are split into 5 distinct chains that are exectued in sequence:
The processors are split into 5 distinct chains that are executed in sequence:

<ol>
<li>Pre-fetch processing chain
Expand Down Expand Up @@ -129,7 +129,7 @@ <h3>Scope</h3>
implementations can be made of these to define any arbitrary scope.
It should be noted though that usually any type of limitations to the scope
of a crawl can be more easily achived using one of the existing scopes and
modifing it with appropriate filters.
modifying it with appropriate filters.
<p>
{@link org.archive.crawler.framework.CrawlScope CrawlScope} - Base class for
scopes.<br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* disk space and pause the crawl if free space on monitored
* filesystems falls below certain thresholds.
*
* @deprecated Is highly system dependant.
* @deprecated Is highly system dependent.
* Use {@link org.archive.crawler.monitor.DiskSpaceMonitor} instead.
*/
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

/**
* Processor to preload URI with as much precalculated policy-based
* info as possible before it reaches frontier criticial sections.
* info as possible before it reaches frontier critical sections.
*
* Frontiers also maintain a direct reference to this class, in case
* they need to perform remedial preparation for URIs that do not
Expand Down Expand Up @@ -195,7 +195,7 @@ protected int getSchedulingDirective(CrawlURI curi) {
if (getPreferenceDepthHops() == 0) {
return HIGH;
// this implies seed redirects are treated as path
// length 1, which I belive is standard.
// length 1, which I believe is standard.
// curi.getPathFromSeed() can never be null here, because
// we're processing a link extracted from curi
} else if (getPreferenceDepthHops() > 0 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public boolean isIpExpired(CrawlURI curi) {
*
* <p>
* One day, do optimization and avoid running the bulk of the code below.
* Argument for running the code everytime is that overrides and refinements
* Argument for running the code every time is that overrides and refinements
* may change what comes back from credential store.
*
* @param curi CrawlURI we're checking for any required preconditions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class Preselector extends Scoper {
* Recheck if uri is in scope. This is meaningful if the scope is altered
* during a crawl. URIs are checked against the scope when they are added to
* queues. Setting this value to true forces the URI to be checked against
* the scope when it is comming out of the queue, possibly after the scope
* the scope when it is coming out of the queue, possibly after the scope
* is altered.
*/
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public void setCrawlController(CrawlController controller) {
protected long crawlStartTime;
/** wall-clock time the crawl ended */
protected long crawlEndTime = -1; // Until crawl ends, this value is -1.
/** wall-clock time of last pause, while pause in progres */
/** wall-clock time of last pause, while pause in progress */
protected long crawlPauseStarted = 0;
/** duration tally of all time spent in paused state */
protected long crawlTotalPausedTime = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

/**
* Representation wrapping a FileRepresentation, displaying its contents
* in a TextArea for editting.
* in a TextArea for editing.
*
* @author gojomo
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public Representation getRepresentation(Status status, Request request, Response
"<a href='javascript:history.back();void(0);'>back</a>.\n");
}
else{
pw.append("<h1>An error occured</h1>\n");
pw.append("<h1>An error occurred</h1>\n");
pw.append(
"You may be able to recover and try something " +
"else by going " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* Enhanced version of Restlet Directory, which allows the local
* filesystem directory to be determined dynamically based on the
* request details. Also, via use of an EnhDirectoryResource, adds
* other capabilities (editting, etc.).
* other capabilities (editing, etc.).
*
* @author gojomo
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public synchronized void close() {
}
if (env != null) {
try {
// This sync flushes whats in RAM. Its expensive operation.
// This sync flushes what's in RAM. Its expensive operation.
// Without, data can be lost. Not for transactional operation.
env.sync();
} catch (DatabaseException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static String getClassCheckpointFilename(final Class<?> c,
* Utility function to serialize an object to a file in current checkpoint
* dir. Facilities
* to store related files alongside the serialized object in a directory
* named with a <code>.auxillary</code> suffix.
* named with a <code>.auxiliary</code> suffix.
*
* @param o Object to serialize.
* @param dir Directory to serialize into.
Expand Down
6 changes: 3 additions & 3 deletions engine/src/main/java/org/archive/crawler/util/LogReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ public static String[] tail(RandomAccessFile raf, int n) {
pos = lastPos - BUFFERSIZE;
}
raf.seek(pos);
// If less then BUFFERSIZE avaliable read the remaining bytes
// If less then BUFFERSIZE available read the remaining bytes
if ((lastPos - pos) < BUFFERSIZE) {
int remainer = (int) (lastPos - pos);
buffer = new byte[remainer];
Expand All @@ -818,11 +818,11 @@ public static String[] tail(RandomAccessFile raf, int n) {
}
}
}
// reset last postion
// reset last position
lastPos = pos;
} while ((numOfLines <= n) && (pos != 0));

// print last n line starting from last postion
// print last n line starting from last position
for (pos = lastPos; pos < endPos; pos += buffer.length) {
raf.seek(pos);
if ((endPos - pos) < BUFFERSIZE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public class RecoveryLogMapper {
* recoverLogFileName, will throw throw SeedUrlNotFoundException. Use
* {@link #RecoveryLogMapper(String)} if you want to just log such cases and
* keep going. (Those should not happen if the recover log is written
* correctly, but we see them in pratice.)
* correctly, but we see them in practice.)
*
* @param recoverLogFileName
* @throws java.io.FileNotFoundException
Expand Down
Loading

0 comments on commit aa705be

Please sign in to comment.