Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -595,9 +595,9 @@ private void setIoException(Exception e) {
IOException exception = new IOException(EXCEPTION_MSG + e.toString(), e);
ioException.compareAndSet(null, exception);
} else {
LOG.debug("Previous request had already failed with " + ioe.toString()
+ " so subsequent request also encounters"
+ " Storage Container Exception ", e);
LOG.debug("Previous request had already failed with {} " +
"so subsequent request also encounters " +
"Storage Container Exception {}", ioe, e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,11 @@ public synchronized void performFailoverToAssignedLeader(String newLeader,
LOG.debug("Performing failover to suggested leader {}, nodeId {}",
snle.getSuggestedLeader(), newLeader);
} else {
LOG.debug("Suggested leader {} does not match with any of the " +
"proxyInfo adress {}", snle.getSuggestedLeader(),
Arrays.toString(scmProxyInfoMap.values().toArray()));
if (LOG.isDebugEnabled()) {
LOG.debug("Suggested leader {} does not match with any of the " +
"proxyInfo adress {}", snle.getSuggestedLeader(),
Arrays.toString(scmProxyInfoMap.values().toArray()));
}
}
}
assignLeaderToNode(newLeader);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,11 @@ public synchronized void performFailoverToAssignedLeader(String newLeader,
LOG.debug("Performing failover to suggested leader {}, nodeId {}",
snle.getSuggestedLeader(), newLeader);
} else {
LOG.debug("Suggested leader {} does not match with any of the " +
"proxyInfo adress {}", snle.getSuggestedLeader(),
Arrays.toString(scmProxyInfoMap.values().toArray()));
if (LOG.isDebugEnabled()) {
LOG.debug("Suggested leader {} does not match with any of the " +
"proxyInfo adress {}", snle.getSuggestedLeader(),
Arrays.toString(scmProxyInfoMap.values().toArray()));
}
}
}
assignLeaderToNode(newLeader);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void start() {
.updateStatus(new StreamObserver<UpdateResponse>() {
@Override
public void onNext(UpdateResponse updateResponse) {
LOG.debug("Receive server response: {}", updateResponse.toString());
LOG.debug("Receive server response: {}", updateResponse);
serviceGrpcClient.incrUpdateCount();
handleServerUpdate(updateResponse);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public boolean validateGeneralName(int type, String value) {
final InetAddress byAddress = InetAddress.getByAddress(
Hex.decodeHex(value.substring(1)));
if (LOG.isDebugEnabled()) {
LOG.debug("Host Name/IP Address : {}", byAddress.toString());
LOG.debug("Host Name/IP Address : {}", byAddress);
}
return true;
} catch (UnknownHostException | DecoderException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public BigInteger issueCert() throws Exception {

public Optional<Long> revokeCert(List<BigInteger> certs,
Instant revokeTime) throws IOException {
log.debug("Revoke certs: ", certs.toString());
log.debug("Revoke certs: {}", certs);
Optional<Long> crlId = scmCertStore.revokeCertificates(certs,
caCertificateHolder,
CRLReason.lookup(CRLReason.keyCompromise),
Expand All @@ -107,7 +107,7 @@ public Optional<Long> revokeCert(List<BigInteger> certs,
scmCertStore.getCrls(ImmutableList.of(crlId.get()));

if (crlInfos.isEmpty()) {
log.debug("CRL[0]: {}", crlInfos.get(0).toString());
log.debug("CRL[0]: {}", crlInfos.get(0));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this statement doesn't make sense.
if crlInfos is empty, crlInfos.get(0) would throw IndexOutOfBoundsException

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiaoyuyao any idea what this was meant for?

}
return crlId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ protected Map<Long, ContainerWithPipeline> refreshPipeline(
return containerWithPipelineMap;
} catch (IOException ioEx) {
LOG.debug("Get containerPipeline failed for {}",
containerIDs.toString(), ioEx);
containerIDs, ioEx);
throw new OMException(ioEx.getMessage(), SCM_GET_PIPELINE_EXCEPTION);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ public boolean moveToTrash(Path path) throws IOException {
Path trashRoot = this.fs.getTrashRoot(path);

String key = path.toUri().getPath();
LOG.debug("Key path to moveToTrash: "+ key);
LOG.debug("Key path to moveToTrash: {}", key);
String trashRootKey = trashRoot.toUri().getPath();
LOG.debug("TrashrootKey for moveToTrash: "+ trashRootKey);
LOG.debug("TrashrootKey for moveToTrash: {}", trashRootKey);

if (!OzoneFSUtils.isValidName(key)) {
throw new InvalidPathException("Invalid path Name " + key);
Expand Down Expand Up @@ -201,9 +201,9 @@ public void run() {
if (now >= end) {
Collection<FileStatus> trashRoots;
trashRoots = fs.getTrashRoots(true); // list all trash dirs
LOG.debug("Trash root Size: " + trashRoots.size());
LOG.debug("Trash root Size: {}", trashRoots.size());
for (FileStatus trashRoot : trashRoots) { // dump each trash
LOG.debug("Trashroot:" + trashRoot.getPath().toString());
LOG.debug("Trashroot: {}", trashRoot.getPath());
if (!trashRoot.isDirectory()) {
continue;
}
Expand Down Expand Up @@ -266,7 +266,10 @@ private void createCheckpoint(Path trashRoot, Date date) throws IOException {
while (true) {
try {
fs.rename(current, checkpoint);
LOG.debug("Created trash checkpoint: " + checkpoint.toUri().getPath());
if (LOG.isDebugEnabled()) {
LOG.debug("Created trash checkpoint: {}",
checkpoint.toUri().getPath());
}
break;
} catch (FileAlreadyExistsException e) {
if (++attempt > 1000) {
Expand All @@ -280,7 +283,8 @@ private void createCheckpoint(Path trashRoot, Date date) throws IOException {

private void deleteCheckpoint(Path trashRoot, boolean deleteImmediately)
throws IOException {
LOG.debug("TrashPolicyOzone#deleteCheckpoint for trashRoot: " + trashRoot);
LOG.debug("TrashPolicyOzone#deleteCheckpoint for trashRoot: {}",
trashRoot);

FileStatus[] dirs = null;
try {
Expand All @@ -303,7 +307,7 @@ private void deleteCheckpoint(Path trashRoot, boolean deleteImmediately)
time = getTimeFromCheckpoint(name);
} catch (ParseException e) {
om.getMetrics().incNumTrashFails();
LOG.warn("Unexpected item in trash: "+dir+". Ignoring.");
LOG.warn("Unexpected item in trash: {} . Ignoring.", dir);
continue;
}

Expand All @@ -312,7 +316,7 @@ private void deleteCheckpoint(Path trashRoot, boolean deleteImmediately)
LOG.debug("Deleted trash checkpoint:{} ", dir);
} else {
om.getMetrics().incNumTrashFails();
LOG.warn("Couldn't delete checkpoint: " + dir + " Ignoring.");
LOG.warn("Couldn't delete checkpoint: {} Ignoring.", dir);
}
}
}
Expand Down