HBASE-6350 Some logging improvements for RegionServer bulk loading (Harsh J)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1358989 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2012-07-09 09:14:27 +00:00
parent 0318331ccd
commit 5236f762dd
2 changed files with 11 additions and 11 deletions

View File

@ -3342,9 +3342,9 @@ public class HRegion implements HeapSize { // , Writable{
// validation failed because of some sort of IO problem.
if (ioes.size() != 0) {
LOG.error("There were IO errors when checking if bulk load is ok. " +
"throwing exception!");
throw MultipleIOException.createIOException(ioes);
IOException e = MultipleIOException.createIOException(ioes);
LOG.error("There were one or more IO errors when checking if the bulk load is ok.", e);
throw e;
}
for (Pair<byte[], String> p : familyPaths) {
@ -3354,12 +3354,12 @@ public class HRegion implements HeapSize { // , Writable{
try {
store.bulkLoadHFile(path);
} catch (IOException ioe) {
// a failure here causes an atomicity violation that we currently
// cannot recover from since it is likely a failed hdfs operation.
// A failure here can cause an atomicity violation that we currently
// cannot recover from since it is likely a failed HDFS operation.
// TODO Need a better story for reverting partial failures due to HDFS.
LOG.error("There was a partial failure due to IO when attempting to" +
" load " + Bytes.toString(p.getFirst()) + " : "+ p.getSecond());
" load " + Bytes.toString(p.getFirst()) + " : "+ p.getSecond(), ioe);
throw ioe;
}
}

View File

@ -564,14 +564,14 @@ public class Store extends SchemaConfigured implements HeapSize {
void bulkLoadHFile(String srcPathStr) throws IOException {
Path srcPath = new Path(srcPathStr);
// Move the file if it's on another filesystem
// Copy the file if it's on another filesystem
FileSystem srcFs = srcPath.getFileSystem(conf);
if (!srcFs.equals(fs)) {
LOG.info("File " + srcPath + " on different filesystem than " +
"destination store - moving to this filesystem.");
LOG.info("Bulk-load file " + srcPath + " is on different filesystem than " +
"the destination store. Copying file over to destination filesystem.");
Path tmpPath = getTmpPath();
FileUtil.copy(srcFs, srcPath, fs, tmpPath, false, conf);
LOG.info("Copied to temporary path on dst filesystem: " + tmpPath);
LOG.info("Copied " + srcPath + " to temporary path on destination filesystem: " + tmpPath);
srcPath = tmpPath;
}
@ -585,7 +585,7 @@ public class Store extends SchemaConfigured implements HeapSize {
sf.createReader();
LOG.info("Moved hfile " + srcPath + " into store directory " +
LOG.info("Moved HFile " + srcPath + " into store directory " +
homedir + " - updating store file list.");
// Append the new storefile into the list