You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jm...@apache.org on 2015/02/26 22:09:02 UTC

hbase git commit: HBASE-13117 improve mob sweeper javadoc

Repository: hbase
Updated Branches:
  refs/heads/hbase-11339 fe335b683 -> 85bcec399


HBASE-13117 improve mob sweeper javadoc


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/85bcec39
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/85bcec39
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/85bcec39

Branch: refs/heads/hbase-11339
Commit: 85bcec3995c571f26e32ea035cf9d322fcbe1411
Parents: fe335b6
Author: Jonathan M Hsieh <jm...@apache.org>
Authored: Thu Feb 26 11:06:49 2015 -0800
Committer: Jonathan M Hsieh <jm...@apache.org>
Committed: Thu Feb 26 11:08:30 2015 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/mob/mapreduce/SweepJob.java     | 5 ++++-
 .../java/org/apache/hadoop/hbase/mob/mapreduce/Sweeper.java | 9 ++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/85bcec39/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/SweepJob.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/SweepJob.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/SweepJob.java
index 1c8bad7..388fa63 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/SweepJob.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/SweepJob.java
@@ -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 {

http://git-wip-us.apache.org/repos/asf/hbase/blob/85bcec39/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/Sweeper.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/Sweeper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/Sweeper.java
index 24b573e..9342a31 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/Sweeper.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/Sweeper.java
@@ -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();