HBASE-24470 : Add store file info when log meessages in HStore. (#1804)
Signed-off-by: binlijin <binlijin@gmail.com> Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
parent
bf869def43
commit
da2e03bb3b
|
@ -608,7 +608,7 @@ public class HStore implements Store, HeapSize, StoreConfigInformation,
|
||||||
file.closeStoreFile(evictOnClose);
|
file.closeStoreFile(evictOnClose);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.warn("Could not close store file", e);
|
LOG.warn("Could not close store file {}", file, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ioe;
|
throw ioe;
|
||||||
|
@ -2815,13 +2815,15 @@ public class HStore implements Store, HeapSize, StoreConfigInformation,
|
||||||
file.initReader();
|
file.initReader();
|
||||||
length = file.getReader().length();
|
length = file.getReader().length();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.trace("Failed to open reader when trying to compute store file size, ignoring", e);
|
LOG.trace("Failed to open reader when trying to compute store file size for {}, ignoring",
|
||||||
|
file, e);
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
file.closeStoreFile(
|
file.closeStoreFile(
|
||||||
file.getCacheConf() != null ? file.getCacheConf().shouldEvictOnClose() : true);
|
file.getCacheConf() != null ? file.getCacheConf().shouldEvictOnClose() : true);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.trace("Failed to close reader after computing store file size, ignoring", e);
|
LOG.trace("Failed to close reader after computing store file size for {}, ignoring",
|
||||||
|
file, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return length;
|
return length;
|
||||||
|
|
Loading…
Reference in New Issue