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:
parent
0318331ccd
commit
5236f762dd
|
@ -3342,9 +3342,9 @@ public class HRegion implements HeapSize { // , Writable{
|
||||||
|
|
||||||
// validation failed because of some sort of IO problem.
|
// validation failed because of some sort of IO problem.
|
||||||
if (ioes.size() != 0) {
|
if (ioes.size() != 0) {
|
||||||
LOG.error("There were IO errors when checking if bulk load is ok. " +
|
IOException e = MultipleIOException.createIOException(ioes);
|
||||||
"throwing exception!");
|
LOG.error("There were one or more IO errors when checking if the bulk load is ok.", e);
|
||||||
throw MultipleIOException.createIOException(ioes);
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Pair<byte[], String> p : familyPaths) {
|
for (Pair<byte[], String> p : familyPaths) {
|
||||||
|
@ -3354,12 +3354,12 @@ public class HRegion implements HeapSize { // , Writable{
|
||||||
try {
|
try {
|
||||||
store.bulkLoadHFile(path);
|
store.bulkLoadHFile(path);
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
// a failure here causes an atomicity violation that we currently
|
// A failure here can cause an atomicity violation that we currently
|
||||||
// cannot recover from since it is likely a failed hdfs operation.
|
// cannot recover from since it is likely a failed HDFS operation.
|
||||||
|
|
||||||
// TODO Need a better story for reverting partial failures due to HDFS.
|
// 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" +
|
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;
|
throw ioe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -564,14 +564,14 @@ public class Store extends SchemaConfigured implements HeapSize {
|
||||||
void bulkLoadHFile(String srcPathStr) throws IOException {
|
void bulkLoadHFile(String srcPathStr) throws IOException {
|
||||||
Path srcPath = new Path(srcPathStr);
|
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);
|
FileSystem srcFs = srcPath.getFileSystem(conf);
|
||||||
if (!srcFs.equals(fs)) {
|
if (!srcFs.equals(fs)) {
|
||||||
LOG.info("File " + srcPath + " on different filesystem than " +
|
LOG.info("Bulk-load file " + srcPath + " is on different filesystem than " +
|
||||||
"destination store - moving to this filesystem.");
|
"the destination store. Copying file over to destination filesystem.");
|
||||||
Path tmpPath = getTmpPath();
|
Path tmpPath = getTmpPath();
|
||||||
FileUtil.copy(srcFs, srcPath, fs, tmpPath, false, conf);
|
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;
|
srcPath = tmpPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -585,7 +585,7 @@ public class Store extends SchemaConfigured implements HeapSize {
|
||||||
|
|
||||||
sf.createReader();
|
sf.createReader();
|
||||||
|
|
||||||
LOG.info("Moved hfile " + srcPath + " into store directory " +
|
LOG.info("Moved HFile " + srcPath + " into store directory " +
|
||||||
homedir + " - updating store file list.");
|
homedir + " - updating store file list.");
|
||||||
|
|
||||||
// Append the new storefile into the list
|
// Append the new storefile into the list
|
||||||
|
|
Loading…
Reference in New Issue