HBASE-18212 reduce log level for unbuffer warning.
In Standalone mode with local filesystem HBase logs Warning message:Failed to invoke 'unbuffer' method in class org.apache.hadoop.fs.FSDataInputStream Signed-off-by: Umesh Agashe <uagashe@cloudera.com> Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
parent
6012bcdd1d
commit
0f5a250ac2
|
@ -42,6 +42,7 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
public class FSDataInputStreamWrapper implements Closeable {
|
public class FSDataInputStreamWrapper implements Closeable {
|
||||||
private static final Log LOG = LogFactory.getLog(FSDataInputStreamWrapper.class);
|
private static final Log LOG = LogFactory.getLog(FSDataInputStreamWrapper.class);
|
||||||
|
private static final boolean isLogTraceEnabled = LOG.isTraceEnabled();
|
||||||
|
|
||||||
private final HFileSystem hfs;
|
private final HFileSystem hfs;
|
||||||
private final Path path;
|
private final Path path;
|
||||||
|
@ -274,10 +275,11 @@ public class FSDataInputStreamWrapper implements Closeable {
|
||||||
try {
|
try {
|
||||||
this.unbuffer = streamClass.getDeclaredMethod("unbuffer");
|
this.unbuffer = streamClass.getDeclaredMethod("unbuffer");
|
||||||
} catch (NoSuchMethodException | SecurityException e) {
|
} catch (NoSuchMethodException | SecurityException e) {
|
||||||
LOG.warn("Failed to find 'unbuffer' method in class " + streamClass
|
if (isLogTraceEnabled) {
|
||||||
|
LOG.trace("Failed to find 'unbuffer' method in class " + streamClass
|
||||||
+ " . So there may be a TCP socket connection "
|
+ " . So there may be a TCP socket connection "
|
||||||
+ "left open in CLOSE_WAIT state.",
|
+ "left open in CLOSE_WAIT state.", e);
|
||||||
e);
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.instanceOfCanUnbuffer = true;
|
this.instanceOfCanUnbuffer = true;
|
||||||
|
@ -289,12 +291,14 @@ public class FSDataInputStreamWrapper implements Closeable {
|
||||||
try {
|
try {
|
||||||
this.unbuffer.invoke(wrappedStream);
|
this.unbuffer.invoke(wrappedStream);
|
||||||
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
|
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
|
||||||
LOG.warn("Failed to invoke 'unbuffer' method in class " + streamClass
|
if (isLogTraceEnabled) {
|
||||||
+ " . So there may be a TCP socket connection left open in CLOSE_WAIT state.",
|
LOG.trace("Failed to invoke 'unbuffer' method in class " + streamClass
|
||||||
e);
|
+ " . So there may be a TCP socket connection left open in CLOSE_WAIT state.", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG.warn("Failed to find 'unbuffer' method in class " + streamClass
|
if (isLogTraceEnabled) {
|
||||||
|
LOG.trace("Failed to find 'unbuffer' method in class " + streamClass
|
||||||
+ " . So there may be a TCP socket connection "
|
+ " . So there may be a TCP socket connection "
|
||||||
+ "left open in CLOSE_WAIT state. For more details check "
|
+ "left open in CLOSE_WAIT state. For more details check "
|
||||||
+ "https://issues.apache.org/jira/browse/HBASE-9393");
|
+ "https://issues.apache.org/jira/browse/HBASE-9393");
|
||||||
|
@ -302,3 +306,4 @@ public class FSDataInputStreamWrapper implements Closeable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue