HDFS-13435. RBF: Improve the error loggings for printing the stack trace.
(cherry picked from commit c4d3636c21
)
This commit is contained in:
parent
70830d9f9c
commit
1d776f22f9
|
@ -456,7 +456,7 @@ public class FederationMetrics implements FederationMBean {
|
||||||
dev = (float) Math.sqrt(dev / usages.length);
|
dev = (float) Math.sqrt(dev / usages.length);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.info("Cannot get the live nodes: {}", e.getMessage());
|
LOG.error("Cannot get the live nodes: {}", e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
final Map<String, Object> innerInfo = new HashMap<>();
|
final Map<String, Object> innerInfo = new HashMap<>();
|
||||||
|
|
|
@ -210,8 +210,7 @@ public class LocalResolver extends RouterResolver<String, String> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
LOG.error("Cannot get Namenodes from the State Store: {}",
|
LOG.error("Cannot get Namenodes from the State Store", ioe);
|
||||||
ioe.getMessage());
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class RouterHeartbeatService extends PeriodicService {
|
||||||
LOG.debug("Router heartbeat for router {}", routerId);
|
LOG.debug("Router heartbeat for router {}", routerId);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.error("Cannot heartbeat router {}: {}", routerId, e.getMessage());
|
LOG.error("Cannot heartbeat router {}", routerId, e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG.warn("Cannot heartbeat router {}: State Store unavailable", routerId);
|
LOG.warn("Cannot heartbeat router {}: State Store unavailable", routerId);
|
||||||
|
@ -132,7 +132,7 @@ public class RouterHeartbeatService extends PeriodicService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("Cannot get version for {}: {}", clazz, e.getMessage());
|
LOG.error("Cannot get version for {}", clazz, e);
|
||||||
}
|
}
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1067,8 +1067,8 @@ public class RouterRpcClient {
|
||||||
results.put(location, clazz.cast(result));
|
results.put(location, clazz.cast(result));
|
||||||
} catch (CancellationException ce) {
|
} catch (CancellationException ce) {
|
||||||
T loc = orderedLocations.get(i);
|
T loc = orderedLocations.get(i);
|
||||||
String msg =
|
String msg = "Invocation to \"" + loc + "\" for \""
|
||||||
"Invocation to \"" + loc + "\" for \"" + method + "\" timed out";
|
+ method.getMethodName() + "\" timed out";
|
||||||
LOG.error(msg);
|
LOG.error(msg);
|
||||||
IOException ioe = new SubClusterTimeoutException(msg);
|
IOException ioe = new SubClusterTimeoutException(msg);
|
||||||
exceptions.put(location, ioe);
|
exceptions.put(location, ioe);
|
||||||
|
|
|
@ -2293,7 +2293,7 @@ public class RouterRpcServer extends AbstractService
|
||||||
return entry.isAll();
|
return entry.isAll();
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.error("Cannot get mount point: {}", e.getMessage());
|
LOG.error("Cannot get mount point", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -2314,7 +2314,7 @@ public class RouterRpcServer extends AbstractService
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.error("Cannot get mount point: {}", e.getMessage());
|
LOG.error("Cannot get mount point", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -2343,7 +2343,7 @@ public class RouterRpcServer extends AbstractService
|
||||||
ret.put(child, entry.getDateModified());
|
ret.put(child, entry.getDateModified());
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.error("Cannot get mount point: {}", e.getMessage());
|
LOG.error("Cannot get mount point", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -183,7 +183,7 @@ public class StateStoreService extends CompositeService {
|
||||||
} catch (NotCompliantMBeanException e) {
|
} catch (NotCompliantMBeanException e) {
|
||||||
throw new RuntimeException("Bad StateStoreMBean setup", e);
|
throw new RuntimeException("Bad StateStoreMBean setup", e);
|
||||||
} catch (MetricsException e) {
|
} catch (MetricsException e) {
|
||||||
LOG.info("Failed to register State Store bean {}", e.getMessage());
|
LOG.error("Failed to register State Store bean {}", e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
super.serviceInit(this.conf);
|
super.serviceInit(this.conf);
|
||||||
|
|
|
@ -361,7 +361,7 @@ public abstract class StateStoreFileBaseImpl
|
||||||
try {
|
try {
|
||||||
writer.close();
|
writer.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.error("Cannot close the writer for {}", recordPathTemp);
|
LOG.error("Cannot close the writer for {}", recordPathTemp, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue