HADOOP-14271. Correct spelling of 'occurred' and variants. Contributed by Yeliang Cang
This commit is contained in:
parent
5faa949b78
commit
6eba79232f
|
@ -28,7 +28,7 @@ import org.apache.hadoop.classification.InterfaceStability;
|
|||
* to explicitly report progress to the Hadoop framework. This is especially
|
||||
* important for operations which take significant amount of time since,
|
||||
* in-lieu of the reported progress, the framework has to assume that an error
|
||||
* has occured and time-out the operation.</p>
|
||||
* has occurred and time-out the operation.</p>
|
||||
*/
|
||||
@InterfaceAudience.Public
|
||||
@InterfaceStability.Stable
|
||||
|
|
|
@ -30,7 +30,7 @@ public class UTF8ByteArrayUtils {
|
|||
* @param start starting offset
|
||||
* @param end ending position
|
||||
* @param b the byte to find
|
||||
* @return position that first byte occures otherwise -1
|
||||
* @return position that first byte occurs, otherwise -1
|
||||
*/
|
||||
public static int findByte(byte [] utf, int start, int end, byte b) {
|
||||
for(int i=start; i<end; i++) {
|
||||
|
@ -47,7 +47,7 @@ public class UTF8ByteArrayUtils {
|
|||
* @param start starting offset
|
||||
* @param end ending position
|
||||
* @param b the bytes to find
|
||||
* @return position that first byte occures otherwise -1
|
||||
* @return position that first byte occurs, otherwise -1
|
||||
*/
|
||||
public static int findBytes(byte [] utf, int start, int end, byte[] b) {
|
||||
int matchEnd = end - b.length;
|
||||
|
|
|
@ -8298,7 +8298,7 @@ FilePath FilePath::RemoveExtension(const char* extension) const {
|
|||
return *this;
|
||||
}
|
||||
|
||||
// Returns a pointer to the last occurence of a valid path separator in
|
||||
// Returns a pointer to the last occurrence of a valid path separator in
|
||||
// the FilePath. On Windows, for example, both '/' and '\' are valid path
|
||||
// separators. Returns NULL if no path separator was found.
|
||||
const char* FilePath::FindLastPathSeparator() const {
|
||||
|
|
|
@ -4457,7 +4457,7 @@ class GTEST_API_ FilePath {
|
|||
|
||||
void Normalize();
|
||||
|
||||
// Returns a pointer to the last occurence of a valid path separator in
|
||||
// Returns a pointer to the last occurrence of a valid path separator in
|
||||
// the FilePath. On Windows, for example, both '/' and '\' are valid path
|
||||
// separators. Returns NULL if no path separator was found.
|
||||
const char* FindLastPathSeparator() const;
|
||||
|
|
|
@ -225,7 +225,7 @@ public abstract class MultithreadedTestUtil {
|
|||
|
||||
/**
|
||||
* User method for any code to test repeating behavior of (as threads).
|
||||
* @throws Exception throw an exception if a failure has occured.
|
||||
* @throws Exception throw an exception if a failure has occurred.
|
||||
*/
|
||||
public abstract void doAnAction() throws Exception;
|
||||
}
|
||||
|
|
|
@ -777,7 +777,7 @@ public class DFSInputStream extends FSInputStream
|
|||
}
|
||||
} finally {
|
||||
// Check if need to report block replicas corruption either read
|
||||
// was successful or ChecksumException occured.
|
||||
// was successful or ChecksumException occurred.
|
||||
reportCheckSumFailure(corruptedBlocks,
|
||||
currentLocatedBlock.getLocations().length, false);
|
||||
}
|
||||
|
|
|
@ -394,7 +394,7 @@ public class DFSStripedInputStream extends DFSInputStream {
|
|||
return result;
|
||||
} finally {
|
||||
// Check if need to report block replicas corruption either read
|
||||
// was successful or ChecksumException occured.
|
||||
// was successful or ChecksumException occurred.
|
||||
reportCheckSumFailure(corruptedBlocks,
|
||||
currentLocatedBlock.getLocations().length, true);
|
||||
}
|
||||
|
|
|
@ -333,7 +333,7 @@ public class FSOperations {
|
|||
*
|
||||
* @return void.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public Void execute(FileSystem fs) throws IOException {
|
||||
|
@ -377,7 +377,7 @@ public class FSOperations {
|
|||
*
|
||||
* @return void.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public Void execute(FileSystem fs) throws IOException {
|
||||
|
@ -418,7 +418,7 @@ public class FSOperations {
|
|||
* wait for it to complete before proceeding with further file
|
||||
* updates.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public JSONObject execute(FileSystem fs) throws IOException {
|
||||
|
@ -452,7 +452,7 @@ public class FSOperations {
|
|||
*
|
||||
* @return a Map object (JSON friendly) with the content-summary.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public Map execute(FileSystem fs) throws IOException {
|
||||
|
@ -501,7 +501,7 @@ public class FSOperations {
|
|||
*
|
||||
* @return The URI of the created file.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public Void execute(FileSystem fs) throws IOException {
|
||||
|
@ -549,7 +549,7 @@ public class FSOperations {
|
|||
* @return <code>true</code> if the delete operation was successful,
|
||||
* <code>false</code> otherwise.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public JSONObject execute(FileSystem fs) throws IOException {
|
||||
|
@ -583,7 +583,7 @@ public class FSOperations {
|
|||
*
|
||||
* @return a Map object (JSON friendly) with the file checksum.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public Map execute(FileSystem fs) throws IOException {
|
||||
|
@ -640,7 +640,7 @@ public class FSOperations {
|
|||
*
|
||||
* @return a JSON object with the user home directory.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -765,7 +765,7 @@ public class FSOperations {
|
|||
* @return <code>true</code> if the mkdirs operation was successful,
|
||||
* <code>false</code> otherwise.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public JSONObject execute(FileSystem fs) throws IOException {
|
||||
|
@ -799,7 +799,7 @@ public class FSOperations {
|
|||
*
|
||||
* @return The inputstream of the file.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public InputStream execute(FileSystem fs) throws IOException {
|
||||
|
@ -837,7 +837,7 @@ public class FSOperations {
|
|||
* @return <code>true</code> if the rename operation was successful,
|
||||
* <code>false</code> otherwise.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public JSONObject execute(FileSystem fs) throws IOException {
|
||||
|
@ -876,7 +876,7 @@ public class FSOperations {
|
|||
*
|
||||
* @return void.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public Void execute(FileSystem fs) throws IOException {
|
||||
|
@ -913,7 +913,7 @@ public class FSOperations {
|
|||
*
|
||||
* @return void.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public Void execute(FileSystem fs) throws IOException {
|
||||
|
@ -1186,7 +1186,7 @@ public class FSOperations {
|
|||
* @return <code>true</code> if the replication value was set,
|
||||
* <code>false</code> otherwise.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -1228,7 +1228,7 @@ public class FSOperations {
|
|||
*
|
||||
* @return void.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public Void execute(FileSystem fs) throws IOException {
|
||||
|
@ -1314,7 +1314,7 @@ public class FSOperations {
|
|||
*
|
||||
* @return Map a map object (JSON friendly) with the xattr names.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public Map execute(FileSystem fs) throws IOException {
|
||||
|
@ -1353,7 +1353,7 @@ public class FSOperations {
|
|||
*
|
||||
* @return Map a map object (JSON friendly) with the xattrs.
|
||||
*
|
||||
* @throws IOException thrown if an IO error occured.
|
||||
* @throws IOException thrown if an IO error occurred.
|
||||
*/
|
||||
@Override
|
||||
public Map execute(FileSystem fs) throws IOException {
|
||||
|
|
|
@ -822,7 +822,7 @@ class BlockPoolSlice {
|
|||
} catch (Exception e) {
|
||||
// Any exception we need to revert back to read from disk
|
||||
// Log the error and return false
|
||||
LOG.info("Exception occured while reading the replicas cache file: "
|
||||
LOG.info("Exception occurred while reading the replicas cache file: "
|
||||
+ replicaFile.getPath(), e );
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1323,7 +1323,7 @@ public class FsVolumeImpl implements FsVolumeSpi {
|
|||
fileNames = fileIoProvider.listDirectory(
|
||||
this, dir, BlockDirFilter.INSTANCE);
|
||||
} catch (IOException ioe) {
|
||||
LOG.warn("Exception occured while compiling report: ", ioe);
|
||||
LOG.warn("Exception occurred while compiling report: ", ioe);
|
||||
// Volume error check moved to FileIoProvider.
|
||||
// Ignore this directory and proceed.
|
||||
return report;
|
||||
|
|
|
@ -276,7 +276,7 @@ public class JobControl implements Runnable {
|
|||
}
|
||||
|
||||
synchronized private void failAllJobs(Throwable t) {
|
||||
String message = "Unexpected System Error Occured: "+
|
||||
String message = "Unexpected System Error Occurred: "+
|
||||
StringUtils.stringifyException(t);
|
||||
Iterator<ControlledJob> it = jobsInProgress.iterator();
|
||||
while(it.hasNext()) {
|
||||
|
|
|
@ -346,7 +346,7 @@ public class BlockBlobAppendStream extends OutputStream {
|
|||
|
||||
try {
|
||||
if (!ioThreadPool.awaitTermination(10, TimeUnit.MINUTES)) {
|
||||
LOG.error("Time out occured while waiting for IO request to finish in append"
|
||||
LOG.error("Time out occurred while waiting for IO request to finish in append"
|
||||
+ " for blob : {}", key);
|
||||
NativeAzureFileSystemHelper.logAllLiveStackTraces();
|
||||
throw new IOException("Timed out waiting for IO requests to finish");
|
||||
|
|
|
@ -26,11 +26,11 @@ import org.apache.hadoop.util.LineReader;
|
|||
public class StreamKeyValUtil {
|
||||
|
||||
/**
|
||||
* Find the first occured tab in a UTF-8 encoded string
|
||||
* Find the first occurred tab in a UTF-8 encoded string
|
||||
* @param utf a byte array containing a UTF-8 encoded string
|
||||
* @param start starting offset
|
||||
* @param length no. of bytes
|
||||
* @return position that first tab occures otherwise -1
|
||||
* @return position that first tab occurres otherwise -1
|
||||
*/
|
||||
public static int findTab(byte [] utf, int start, int length) {
|
||||
for(int i=start; i<(start+length); i++) {
|
||||
|
@ -41,9 +41,9 @@ public class StreamKeyValUtil {
|
|||
return -1;
|
||||
}
|
||||
/**
|
||||
* Find the first occured tab in a UTF-8 encoded string
|
||||
* Find the first occurred tab in a UTF-8 encoded string
|
||||
* @param utf a byte array containing a UTF-8 encoded string
|
||||
* @return position that first tab occures otherwise -1
|
||||
* @return position that first tab occurres otherwise -1
|
||||
*/
|
||||
public static int findTab(byte [] utf) {
|
||||
return org.apache.hadoop.util.UTF8ByteArrayUtils.findNthByte(utf, 0,
|
||||
|
|
|
@ -544,17 +544,17 @@ public class TestDistributedShell {
|
|||
Assert.assertEquals(
|
||||
"Container created event needs to be published atleast once",
|
||||
1,
|
||||
getNumOfStringOccurences(containerEntityFile,
|
||||
getNumOfStringOccurrences(containerEntityFile,
|
||||
ContainerMetricsConstants.CREATED_EVENT_TYPE));
|
||||
|
||||
// to avoid race condition of testcase, atleast check 4 times with sleep
|
||||
// of 500ms
|
||||
long numOfContainerFinishedOccurences = 0;
|
||||
long numOfContainerFinishedOccurrences = 0;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
numOfContainerFinishedOccurences =
|
||||
getNumOfStringOccurences(containerEntityFile,
|
||||
numOfContainerFinishedOccurrences =
|
||||
getNumOfStringOccurrences(containerEntityFile,
|
||||
ContainerMetricsConstants.FINISHED_EVENT_TYPE);
|
||||
if (numOfContainerFinishedOccurences > 0) {
|
||||
if (numOfContainerFinishedOccurrences > 0) {
|
||||
break;
|
||||
} else {
|
||||
Thread.sleep(500L);
|
||||
|
@ -563,7 +563,7 @@ public class TestDistributedShell {
|
|||
Assert.assertEquals(
|
||||
"Container finished event needs to be published atleast once",
|
||||
1,
|
||||
numOfContainerFinishedOccurences);
|
||||
numOfContainerFinishedOccurrences);
|
||||
|
||||
// Verify RM posting Application life cycle Events are getting published
|
||||
String appMetricsTimestampFileName =
|
||||
|
@ -576,17 +576,17 @@ public class TestDistributedShell {
|
|||
Assert.assertEquals(
|
||||
"Application created event should be published atleast once",
|
||||
1,
|
||||
getNumOfStringOccurences(appEntityFile,
|
||||
getNumOfStringOccurrences(appEntityFile,
|
||||
ApplicationMetricsConstants.CREATED_EVENT_TYPE));
|
||||
|
||||
// to avoid race condition of testcase, atleast check 4 times with sleep
|
||||
// of 500ms
|
||||
long numOfStringOccurences = 0;
|
||||
long numOfStringOccurrences = 0;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
numOfStringOccurences =
|
||||
getNumOfStringOccurences(appEntityFile,
|
||||
numOfStringOccurrences =
|
||||
getNumOfStringOccurrences(appEntityFile,
|
||||
ApplicationMetricsConstants.FINISHED_EVENT_TYPE);
|
||||
if (numOfStringOccurences > 0) {
|
||||
if (numOfStringOccurrences > 0) {
|
||||
break;
|
||||
} else {
|
||||
Thread.sleep(500L);
|
||||
|
@ -595,7 +595,7 @@ public class TestDistributedShell {
|
|||
Assert.assertEquals(
|
||||
"Application finished event should be published atleast once",
|
||||
1,
|
||||
numOfStringOccurences);
|
||||
numOfStringOccurrences);
|
||||
|
||||
// Verify RM posting AppAttempt life cycle Events are getting published
|
||||
String appAttemptMetricsTimestampFileName =
|
||||
|
@ -609,13 +609,13 @@ public class TestDistributedShell {
|
|||
Assert.assertEquals(
|
||||
"AppAttempt register event should be published atleast once",
|
||||
1,
|
||||
getNumOfStringOccurences(appAttemptEntityFile,
|
||||
getNumOfStringOccurrences(appAttemptEntityFile,
|
||||
AppAttemptMetricsConstants.REGISTERED_EVENT_TYPE));
|
||||
|
||||
Assert.assertEquals(
|
||||
"AppAttempt finished event should be published atleast once",
|
||||
1,
|
||||
getNumOfStringOccurences(appAttemptEntityFile,
|
||||
getNumOfStringOccurrences(appAttemptEntityFile,
|
||||
AppAttemptMetricsConstants.FINISHED_EVENT_TYPE));
|
||||
} finally {
|
||||
FileUtils.deleteDirectory(tmpRootFolder.getParentFile());
|
||||
|
@ -636,7 +636,7 @@ public class TestDistributedShell {
|
|||
return entityFile;
|
||||
}
|
||||
|
||||
private long getNumOfStringOccurences(File entityFile, String searchString)
|
||||
private long getNumOfStringOccurrences(File entityFile, String searchString)
|
||||
throws IOException {
|
||||
BufferedReader reader = null;
|
||||
String strLine;
|
||||
|
|
|
@ -641,8 +641,8 @@ public class TestContainerLaunch extends BaseContainerManagerTest {
|
|||
ContainerLaunch launch = new ContainerLaunch(context, conf, dispatcher,
|
||||
exec, app, container, dirsHandler, containerManager);
|
||||
launch.call();
|
||||
Assert.assertTrue("ContainerExitEvent should have occured",
|
||||
eventHandler.isContainerExitEventOccured());
|
||||
Assert.assertTrue("ContainerExitEvent should have occurred",
|
||||
eventHandler.isContainerExitEventOccurred());
|
||||
}
|
||||
|
||||
private static class ContainerExitHandler implements EventHandler<Event> {
|
||||
|
@ -652,15 +652,15 @@ public class TestContainerLaunch extends BaseContainerManagerTest {
|
|||
this.testForMultiFile = testForMultiFile;
|
||||
}
|
||||
|
||||
boolean containerExitEventOccured = false;
|
||||
boolean containerExitEventOccurred = false;
|
||||
|
||||
public boolean isContainerExitEventOccured() {
|
||||
return containerExitEventOccured;
|
||||
public boolean isContainerExitEventOccurred() {
|
||||
return containerExitEventOccurred;
|
||||
}
|
||||
|
||||
public void handle(Event event) {
|
||||
if (event instanceof ContainerExitEvent) {
|
||||
containerExitEventOccured = true;
|
||||
containerExitEventOccurred = true;
|
||||
ContainerExitEvent exitEvent = (ContainerExitEvent) event;
|
||||
Assert.assertEquals(ContainerEventType.CONTAINER_EXITED_WITH_FAILURE,
|
||||
exitEvent.getType());
|
||||
|
|
|
@ -343,43 +343,43 @@ public class TestParentQueue {
|
|||
csConf.setCapacity(Q_B, 70.5F);
|
||||
|
||||
Map<String, CSQueue> queues = new HashMap<String, CSQueue>();
|
||||
boolean exceptionOccured = false;
|
||||
boolean exceptionOccurred = false;
|
||||
try {
|
||||
CapacitySchedulerQueueManager.parseQueue(csContext, csConf, null,
|
||||
CapacitySchedulerConfiguration.ROOT, queues, queues,
|
||||
TestUtils.spyHook);
|
||||
} catch (IllegalArgumentException ie) {
|
||||
exceptionOccured = true;
|
||||
exceptionOccurred = true;
|
||||
}
|
||||
if (!exceptionOccured) {
|
||||
if (!exceptionOccurred) {
|
||||
Assert.fail("Capacity is more then 100% so should be failed.");
|
||||
}
|
||||
csConf.setCapacity(Q_A, 30);
|
||||
csConf.setCapacity(Q_B, 70);
|
||||
exceptionOccured = false;
|
||||
exceptionOccurred = false;
|
||||
queues.clear();
|
||||
try {
|
||||
CapacitySchedulerQueueManager.parseQueue(csContext, csConf, null,
|
||||
CapacitySchedulerConfiguration.ROOT, queues, queues,
|
||||
TestUtils.spyHook);
|
||||
} catch (IllegalArgumentException ie) {
|
||||
exceptionOccured = true;
|
||||
exceptionOccurred = true;
|
||||
}
|
||||
if (exceptionOccured) {
|
||||
if (exceptionOccurred) {
|
||||
Assert.fail("Capacity is 100% so should not be failed.");
|
||||
}
|
||||
csConf.setCapacity(Q_A, 30);
|
||||
csConf.setCapacity(Q_B, 70.005F);
|
||||
exceptionOccured = false;
|
||||
exceptionOccurred = false;
|
||||
queues.clear();
|
||||
try {
|
||||
CapacitySchedulerQueueManager.parseQueue(csContext, csConf, null,
|
||||
CapacitySchedulerConfiguration.ROOT, queues, queues,
|
||||
TestUtils.spyHook);
|
||||
} catch (IllegalArgumentException ie) {
|
||||
exceptionOccured = true;
|
||||
exceptionOccurred = true;
|
||||
}
|
||||
if (exceptionOccured) {
|
||||
if (exceptionOccurred) {
|
||||
Assert
|
||||
.fail("Capacity is under PRECISION which is .05% so should not be failed.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue