HBASE-13117 improve mob sweeper javadoc

This commit is contained in:
Jonathan M Hsieh 2015-02-26 11:06:49 -08:00
parent fe335b683c
commit 85bcec3995
2 changed files with 12 additions and 2 deletions

View File

@ -141,6 +141,9 @@ public class SweepJob {
* compaction in progress.
* @param tn The current table name.
* @param family The descriptor of the current column family.
* @return 0 upon success, 3 if bailing out because another compaction is currently happening,
* or 4 the mr job was unsuccessful
*
* @throws IOException
* @throws ClassNotFoundException
* @throws InterruptedException
@ -215,7 +218,7 @@ public class SweepJob {
// Archive the unused mob files.
removeUnusedFiles(job, tn, family);
} else {
System.err.println("Job Failed");
System.err.println("Job was not successful");
return 4;
}
} finally {

View File

@ -50,6 +50,8 @@ public class Sweeper extends Configured implements Tool {
* the small mob files into bigger ones.
* @param tableName The current table name in string format.
* @param familyName The column family name.
* @return 0 if success, 2 if job aborted with an exception, 3 if unable to start due to
* other compaction,4 if mr job was unsuccessful
* @throws IOException
* @throws InterruptedException
* @throws ClassNotFoundException
@ -74,7 +76,7 @@ public class Sweeper extends Configured implements Tool {
// Run the sweeping
return job.sweep(tn, family);
} catch (Exception e) {
System.err.println("Job failed. " + e);
System.err.println("Job aborted due to exception " + e);
return 2; // job failed
} finally {
try {
@ -98,6 +100,11 @@ public class Sweeper extends Configured implements Tool {
System.err.println(" familyName The column family name");
}
/**
* Main method for the tool.
* @return 0 if success, 1 for bad args. 2 if job aborted with an exception,
* 3 if unable to start due to other compaction, 4 if mr job was unsuccessful
*/
public int run(String[] args) throws Exception {
if (args.length != 2) {
printUsage();