Correct spelling in messages and variable names. (#12932)

This commit is contained in:
Adarsh Sanjeev 2022-08-24 11:06:31 +05:30 committed by GitHub
parent 31eda58e9a
commit 3b58a01c7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 32 additions and 32 deletions

View File

@ -79,8 +79,8 @@ public class InputEntityIteratingReader implements InputSourceReader
} }
catch (IOException e) { catch (IOException e) {
throw new RuntimeException(entity.getUri() != null ? throw new RuntimeException(entity.getUri() != null ?
"Error occured while trying to read uri: " + entity.getUri() : "Error occurred while trying to read uri: " + entity.getUri() :
"Error occured while reading input", e); "Error occurred while reading input", e);
} }
}); });
} }

View File

@ -121,7 +121,7 @@ public class InputEntityIteratingReaderTest
).iterator(), ).iterator(),
temporaryFolder.newFolder() temporaryFolder.newFolder()
); );
String expectedMessage = "Error occured while trying to read uri: testscheme://some/path"; String expectedMessage = "Error occurred while trying to read uri: testscheme://some/path";
Exception exception = Assert.assertThrows(RuntimeException.class, firehose::read); Exception exception = Assert.assertThrows(RuntimeException.class, firehose::read);
Assert.assertTrue(exception.getMessage().contains(expectedMessage)); Assert.assertTrue(exception.getMessage().contains(expectedMessage));

View File

@ -144,7 +144,7 @@ public class CommonCacheNotifier
LOG.noStackTrace().info(e, "%s: Interrupted while handling updates for cachedUserMaps.", callerName); LOG.noStackTrace().info(e, "%s: Interrupted while handling updates for cachedUserMaps.", callerName);
} }
catch (Throwable t) { catch (Throwable t) {
LOG.makeAlert(t, callerName + ":Error occured while handling updates for cachedUserMaps.").emit(); LOG.makeAlert(t, callerName + ":Error occurred while handling updates for cachedUserMaps.").emit();
} }
} }
} }

View File

@ -127,7 +127,7 @@ public class CoordinatorPollingBasicAuthenticatorCacheManager implements BasicAu
LOG.debug("Scheduled user cache poll is done"); LOG.debug("Scheduled user cache poll is done");
} }
catch (Throwable t) { catch (Throwable t) {
LOG.makeAlert(t, "Error occured while polling for cachedUserMaps.").emit(); LOG.makeAlert(t, "Error occurred while polling for cachedUserMaps.").emit();
} }
} }
); );

View File

@ -192,7 +192,7 @@ public class CoordinatorBasicAuthenticatorMetadataStorageUpdater implements Basi
LOG.debug("Scheduled db userMap poll is done"); LOG.debug("Scheduled db userMap poll is done");
} }
catch (Throwable t) { catch (Throwable t) {
LOG.makeAlert(t, "Error occured while polling for cachedUserMaps.").emit(); LOG.makeAlert(t, "Error occurred while polling for cachedUserMaps.").emit();
} }
return ScheduledExecutors.Signal.REPEAT; return ScheduledExecutors.Signal.REPEAT;
} }

View File

@ -136,7 +136,7 @@ public class CoordinatorPollingBasicAuthorizerCacheManager implements BasicAutho
LOG.debug("Scheduled userMap cache poll is done"); LOG.debug("Scheduled userMap cache poll is done");
} }
catch (Throwable t) { catch (Throwable t) {
LOG.makeAlert(t, "Error occured while polling for cachedUserMaps.").emit(); LOG.makeAlert(t, "Error occurred while polling for cachedUserMaps.").emit();
} }
} }
); );
@ -162,7 +162,7 @@ public class CoordinatorPollingBasicAuthorizerCacheManager implements BasicAutho
LOG.debug("Scheduled groupMappingMap cache poll is done"); LOG.debug("Scheduled groupMappingMap cache poll is done");
} }
catch (Throwable t) { catch (Throwable t) {
LOG.makeAlert(t, "Error occured while polling for cachedGroupMappingMaps.").emit(); LOG.makeAlert(t, "Error occurred while polling for cachedGroupMappingMaps.").emit();
} }
} }
); );

View File

@ -235,7 +235,7 @@ public class CoordinatorBasicAuthorizerMetadataStorageUpdater implements BasicAu
LOG.debug("Scheduled db poll is done"); LOG.debug("Scheduled db poll is done");
} }
catch (Throwable t) { catch (Throwable t) {
LOG.makeAlert(t, "Error occured while polling for cachedUserMaps, cachedGroupMappingMaps, cachedRoleMaps.").emit(); LOG.makeAlert(t, "Error occurred while polling for cachedUserMaps, cachedGroupMappingMaps, cachedRoleMaps.").emit();
} }
return ScheduledExecutors.Signal.REPEAT; return ScheduledExecutors.Signal.REPEAT;
} }

View File

@ -1975,7 +1975,7 @@ public class KafkaSupervisorTest extends EasyMockSupport
.andReturn(Futures.immediateFailedFuture(new RuntimeException())).times(2); .andReturn(Futures.immediateFailedFuture(new RuntimeException())).times(2);
taskQueue.shutdown( taskQueue.shutdown(
EasyMock.contains("sequenceName-0"), EasyMock.contains("sequenceName-0"),
EasyMock.eq("An exception occured while waiting for task [%s] to pause: [%s]"), EasyMock.eq("An exception occurred while waiting for task [%s] to pause: [%s]"),
EasyMock.contains("sequenceName-0"), EasyMock.contains("sequenceName-0"),
EasyMock.anyString() EasyMock.anyString()
); );

View File

@ -2258,7 +2258,7 @@ public class KinesisSupervisorTest extends EasyMockSupport
.andReturn(Futures.immediateFailedFuture(new RuntimeException())).times(2); .andReturn(Futures.immediateFailedFuture(new RuntimeException())).times(2);
taskQueue.shutdown( taskQueue.shutdown(
EasyMock.contains("sequenceName-0"), EasyMock.contains("sequenceName-0"),
EasyMock.eq("An exception occured while waiting for task [%s] to pause: [%s]"), EasyMock.eq("An exception occurred while waiting for task [%s] to pause: [%s]"),
EasyMock.contains("sequenceName-0"), EasyMock.contains("sequenceName-0"),
EasyMock.anyString() EasyMock.anyString()
); );

View File

@ -2967,7 +2967,7 @@ public abstract class SeekableStreamSupervisor<PartitionIdType, SequenceOffsetTy
killTask( killTask(
taskId, taskId,
"An exception occured while waiting for task [%s] to pause: [%s]", "An exception occurred while waiting for task [%s] to pause: [%s]",
taskId, taskId,
pauseException pauseException
); );

View File

@ -72,16 +72,16 @@ public class QueriesTest
) )
); );
boolean exceptionOccured = false; boolean exceptionOccurred = false;
try { try {
Queries.prepareAggregations(ImmutableList.of(), aggFactories, postAggs); Queries.prepareAggregations(ImmutableList.of(), aggFactories, postAggs);
} }
catch (IllegalArgumentException e) { catch (IllegalArgumentException e) {
exceptionOccured = true; exceptionOccurred = true;
} }
Assert.assertFalse(exceptionOccured); Assert.assertFalse(exceptionOccurred);
} }
@Test @Test
@ -104,16 +104,16 @@ public class QueriesTest
) )
); );
boolean exceptionOccured = false; boolean exceptionOccurred = false;
try { try {
Queries.prepareAggregations(ImmutableList.of(), aggFactories, postAggs); Queries.prepareAggregations(ImmutableList.of(), aggFactories, postAggs);
} }
catch (IllegalArgumentException e) { catch (IllegalArgumentException e) {
exceptionOccured = true; exceptionOccurred = true;
} }
Assert.assertTrue(exceptionOccured); Assert.assertTrue(exceptionOccurred);
} }
@Test @Test
@ -158,16 +158,16 @@ public class QueriesTest
) )
); );
boolean exceptionOccured = false; boolean exceptionOccurred = false;
try { try {
Queries.prepareAggregations(ImmutableList.of(), aggFactories, postAggs); Queries.prepareAggregations(ImmutableList.of(), aggFactories, postAggs);
} }
catch (IllegalArgumentException e) { catch (IllegalArgumentException e) {
exceptionOccured = true; exceptionOccurred = true;
} }
Assert.assertFalse(exceptionOccured); Assert.assertFalse(exceptionOccurred);
} }
@Test @Test
@ -212,16 +212,16 @@ public class QueriesTest
) )
); );
boolean exceptionOccured = false; boolean exceptionOccurred = false;
try { try {
Queries.prepareAggregations(ImmutableList.of(), aggFactories, postAggs); Queries.prepareAggregations(ImmutableList.of(), aggFactories, postAggs);
} }
catch (IllegalArgumentException e) { catch (IllegalArgumentException e) {
exceptionOccured = true; exceptionOccurred = true;
} }
Assert.assertTrue(exceptionOccured); Assert.assertTrue(exceptionOccurred);
} }
@Test @Test

View File

@ -108,7 +108,7 @@ public class BaseNodeRoleWatcher
listener.nodesAdded(currNodes); listener.nodesAdded(currNodes);
listener.nodeViewInitialized(); listener.nodeViewInitialized();
}, },
"Exception occured in nodesAdded([%s]) in listener [%s].", currNodes, listener "Exception occurred in nodesAdded([%s]) in listener [%s].", currNodes, listener
); );
} }
nodeListeners.add(listener); nodeListeners.add(listener);
@ -145,7 +145,7 @@ public class BaseNodeRoleWatcher
for (DruidNodeDiscovery.Listener listener : nodeListeners) { for (DruidNodeDiscovery.Listener listener : nodeListeners) {
safeSchedule( safeSchedule(
() -> listener.nodesAdded(newNode), () -> listener.nodesAdded(newNode),
"Exception occured in nodeAdded(node=[%s]) in listener [%s].", "Exception occurred in nodeAdded(node=[%s]) in listener [%s].",
druidNode.getDruidNode().getHostAndPortToUse(), druidNode.getDruidNode().getHostAndPortToUse(),
listener listener
); );
@ -200,7 +200,7 @@ public class BaseNodeRoleWatcher
for (DruidNodeDiscovery.Listener listener : nodeListeners) { for (DruidNodeDiscovery.Listener listener : nodeListeners) {
safeSchedule( safeSchedule(
() -> listener.nodesRemoved(nodeRemoved), () -> listener.nodesRemoved(nodeRemoved),
"Exception occured in nodeRemoved(node [%s] of role [%s]) in listener [%s].", "Exception occurred in nodeRemoved(node [%s] of role [%s]) in listener [%s].",
druidNode.getDruidNode().getUriToUse(), druidNode.getDruidNode().getUriToUse(),
druidNode.getNodeRole().getJsonName(), druidNode.getNodeRole().getJsonName(),
listener listener
@ -233,7 +233,7 @@ public class BaseNodeRoleWatcher
listener.nodesAdded(currNodes); listener.nodesAdded(currNodes);
listener.nodeViewInitialized(); listener.nodeViewInitialized();
}, },
"Exception occured in nodesAdded([%s]) in listener [%s].", "Exception occurred in nodesAdded([%s]) in listener [%s].",
currNodes, currNodes,
listener listener
); );
@ -282,7 +282,7 @@ public class BaseNodeRoleWatcher
listener.nodesRemoved(nodesDeleted); listener.nodesRemoved(nodesDeleted);
} }
}, },
"Exception occured in resetNodes in listener [%s].", "Exception occurred in resetNodes in listener [%s].",
listener listener
); );
} }

View File

@ -176,7 +176,7 @@ public class LookupReferencesManager implements LookupExtractorFactoryContainerP
LockSupport.parkNanos(LookupReferencesManager.this, TimeUnit.MINUTES.toNanos(1)); LockSupport.parkNanos(LookupReferencesManager.this, TimeUnit.MINUTES.toNanos(1));
} }
catch (Throwable t) { catch (Throwable t) {
LOG.makeAlert(t, "Error occured while lookup notice handling.").emit(); LOG.makeAlert(t, "Error occurred while lookup notice handling.").emit();
} }
} }
} }
@ -219,8 +219,8 @@ public class LookupReferencesManager implements LookupExtractorFactoryContainerP
notice.handle(lookupMap); notice.handle(lookupMap);
} }
catch (Exception ex) { catch (Exception ex) {
LOG.error(ex, "Exception occured while handling lookup notice [%s].", notice); LOG.error(ex, "Exception occurred while handling lookup notice [%s].", notice);
LOG.makeAlert("Exception occured while handling lookup notice, with message [%s].", ex.getMessage()).emit(); LOG.makeAlert("Exception occurred while handling lookup notice, with message [%s].", ex.getMessage()).emit();
} }
} }