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:
xincunSong 2020-05-29 21:28:57 +08:00 committed by GitHub
parent bf869def43
commit da2e03bb3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -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;