azkaban-aplcache

Details

diff --git a/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java b/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
index cca687b..d699a61 100644
--- a/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
+++ b/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
@@ -240,7 +240,7 @@ public class ExecutorManager extends EventHandler implements
             @Override
             public String call() throws Exception {
               return callExecutorForJsonString(executor.getHost(),
-                executor.getPort(), "/serverstastics", null);
+                executor.getPort(), "/serverStatistics", null);
             }
           });
         futures.add(new Pair<Executor, Future<String>>(executor,
diff --git a/azkaban-common/src/main/java/azkaban/executor/selector/CandidateComparator.java b/azkaban-common/src/main/java/azkaban/executor/selector/CandidateComparator.java
index 2f89129..f83788f 100644
--- a/azkaban-common/src/main/java/azkaban/executor/selector/CandidateComparator.java
+++ b/azkaban-common/src/main/java/azkaban/executor/selector/CandidateComparator.java
@@ -66,7 +66,7 @@ public abstract class CandidateComparator<T> implements Comparator<T> {
 
       // add or replace the Comparator.
       this.factorComparatorList.put(comparator.getFactorName(),comparator);
-      logger.info(String.format("Factor comparator added for '%s'. Weight = '%s'",
+      logger.debug(String.format("Factor comparator added for '%s'. Weight = '%s'",
           comparator.getFactorName(), comparator.getWeight()));
   }
 
@@ -104,7 +104,7 @@ public abstract class CandidateComparator<T> implements Comparator<T> {
    * @return a pair structure contains the score for both sides.
    * */
   public Pair<Integer,Integer> getComparisonScore(T object1, T object2){
-    logger.info(String.format("start comparing '%s' with '%s',  total weight = %s ",
+    logger.debug(String.format("start comparing '%s' with '%s',  total weight = %s ",
         object1 == null ? "(null)" : object1.toString(),
         object2 == null ? "(null)" : object2.toString(),
         this.getTotalWeight()));
@@ -114,16 +114,16 @@ public abstract class CandidateComparator<T> implements Comparator<T> {
 
     // short cut if object equals.
     if (object1 ==  object2){
-      logger.info("[Comparator] same object.");
+      logger.debug("[Comparator] same object.");
     } else
     // left side is null.
     if (object1 == null){
-      logger.info("[Comparator] left side is null, right side gets total weight.");
+      logger.debug("[Comparator] left side is null, right side gets total weight.");
       result2 = this.getTotalWeight();
     } else
     // right side is null.
     if (object2 == null){
-      logger.info("[Comparator] right side is null, left side gets total weight.");
+      logger.debug("[Comparator] right side is null, left side gets total weight.");
       result1 = this.getTotalWeight();
     } else
     // both side is not null,put them thru the full loop
@@ -133,20 +133,20 @@ public abstract class CandidateComparator<T> implements Comparator<T> {
         int result = comparator.compare(object1, object2);
         result1  = result1 + (result > 0 ? comparator.getWeight() : 0);
         result2  = result2 + (result < 0 ? comparator.getWeight() : 0);
-        logger.info(String.format("[Factor: %s] compare result : %s (current score %s vs %s)",
+        logger.debug(String.format("[Factor: %s] compare result : %s (current score %s vs %s)",
             comparator.getFactorName(), result, result1, result2));
       }
     }
     // in case of same score, use tie-breaker to stabilize the result.
     if (result1 == result2){
       boolean result = this.tieBreak(object1, object2);
-      logger.info("[TieBreaker] TieBreaker chose " +
+      logger.debug("[TieBreaker] TieBreaker chose " +
       (result? String.format("left side (%s)",  null== object1 ? "null": object1.toString()) :
                String.format("right side (%s)", null== object2 ? "null": object2.toString()) ));
       if (result) result1++; else result2++;
     }
 
-    logger.info(String.format("Result : %s vs %s ",result1,result2));
+    logger.debug(String.format("Result : %s vs %s ",result1,result2));
     return new Pair<Integer,Integer>(result1,result2);
   }
 
diff --git a/azkaban-common/src/main/java/azkaban/executor/selector/CandidateFilter.java b/azkaban-common/src/main/java/azkaban/executor/selector/CandidateFilter.java
index 94b8dfa..f927a2a 100644
--- a/azkaban-common/src/main/java/azkaban/executor/selector/CandidateFilter.java
+++ b/azkaban-common/src/main/java/azkaban/executor/selector/CandidateFilter.java
@@ -51,7 +51,7 @@ public abstract class CandidateFilter<T,V>  {
 
       // add or replace the filter.
       this.factorFilterList.put(filter.getFactorName(),filter);
-      logger.info(String.format("Factor filter added for '%s'.",
+      logger.debug(String.format("Factor filter added for '%s'.",
           filter.getFactorName()));
   }
 
@@ -62,7 +62,7 @@ public abstract class CandidateFilter<T,V>  {
    * @return true if the check passed, false if check failed, which means the item need to be filtered.
    * */
   public boolean filterTarget(T filteringTarget, V referencingObject){
-    logger.info(String.format("start filtering '%s' with factor filter for '%s'",
+    logger.debug(String.format("start filtering '%s' with factor filter for '%s'",
         filteringTarget == null ? "(null)" : filteringTarget.toString(),
         this.getName()));
 
@@ -70,13 +70,13 @@ public abstract class CandidateFilter<T,V>  {
     boolean result = true;
     for (FactorFilter<T,V> filter : filterList){
       result &= filter.filterTarget(filteringTarget,referencingObject);
-      logger.info(String.format("[Factor: %s] filter result : %s ",
+      logger.debug(String.format("[Factor: %s] filter result : %s ",
           filter.getFactorName(), result));
       if (!result){
         break;
       }
     }
-    logger.info(String.format("Final filtering result : %s ",result));
+    logger.debug(String.format("Final filtering result : %s ",result));
     return result;
   }
 }
diff --git a/azkaban-common/src/main/java/azkaban/executor/selector/CandidateSelector.java b/azkaban-common/src/main/java/azkaban/executor/selector/CandidateSelector.java
index 5cae9ef..8fa91d0 100644
--- a/azkaban-common/src/main/java/azkaban/executor/selector/CandidateSelector.java
+++ b/azkaban-common/src/main/java/azkaban/executor/selector/CandidateSelector.java
@@ -50,8 +50,8 @@ public class CandidateSelector<K extends Comparable<K>, V> implements Selector<K
        return null;
      }
 
-     logger.info("start candidate selection logic.");
-     logger.info(String.format("candidate count before filtering: %s", candidateList.size()));
+     logger.debug("start candidate selection logic.");
+     logger.debug(String.format("candidate count before filtering: %s", candidateList.size()));
 
      // to keep the input untouched, we will form up a new list based off the filtering result.
      Collection<K> filteredList = new ArrayList<K>();
@@ -64,22 +64,22 @@ public class CandidateSelector<K extends Comparable<K>, V> implements Selector<K
        }
      } else{
        filteredList = candidateList;
-       logger.info("skipping the candidate filtering as the filter object is not specifed.");
+       logger.debug("skipping the candidate filtering as the filter object is not specifed.");
      }
 
-     logger.info(String.format("candidate count after filtering: %s", filteredList.size()));
+     logger.debug(String.format("candidate count after filtering: %s", filteredList.size()));
      if (filteredList.size() == 0){
-       logger.info("failed to select candidate as the filtered candidate list is empty.");
+       logger.debug("failed to select candidate as the filtered candidate list is empty.");
        return null;
      }
 
      if (null == comparator){
-       logger.info("candidate comparator is not specified, default hash code comparator class will be used.");
+       logger.debug("candidate comparator is not specified, default hash code comparator class will be used.");
      }
 
      // final work - find the best candidate from the filtered list.
      K executor = Collections.max(filteredList, comparator);
-     logger.info(String.format("candidate selected %s",
+     logger.debug(String.format("candidate selected %s",
          null == executor ? "(null)" : executor.toString()));
      return executor;
   }
diff --git a/azkaban-common/src/main/java/azkaban/executor/selector/ExecutorComparator.java b/azkaban-common/src/main/java/azkaban/executor/selector/ExecutorComparator.java
index eafab67..978bcb9 100644
--- a/azkaban-common/src/main/java/azkaban/executor/selector/ExecutorComparator.java
+++ b/azkaban-common/src/main/java/azkaban/executor/selector/ExecutorComparator.java
@@ -122,14 +122,14 @@ public class ExecutorComparator extends CandidateComparator<Executor> {
     result = 0 ;
     // both doesn't expose the info
     if (null == statisticsObj1 && null == statisticsObj2){
-      logger.info(String.format("%s : neither of the executors exposed statistics info.",
+      logger.debug(String.format("%s : neither of the executors exposed statistics info.",
           caller));
       return true;
     }
 
     //right side doesn't expose the info.
     if (null == statisticsObj2 ){
-        logger.info(String.format("%s : choosing left side and the right side executor doesn't expose statistics info",
+        logger.debug(String.format("%s : choosing left side and the right side executor doesn't expose statistics info",
             caller));
         result = 1;
         return true;
@@ -137,7 +137,7 @@ public class ExecutorComparator extends CandidateComparator<Executor> {
 
     //left side doesn't expose the info.
     if (null == statisticsObj1 ){
-      logger.info(String.format("%s : choosing right side and the left side executor doesn't expose statistics info",
+      logger.debug(String.format("%s : choosing right side and the left side executor doesn't expose statistics info",
           caller));
       result = -1;
       return true;
diff --git a/azkaban-common/src/main/java/azkaban/executor/selector/ExecutorFilter.java b/azkaban-common/src/main/java/azkaban/executor/selector/ExecutorFilter.java
index 19baa10..cfaed1b 100644
--- a/azkaban-common/src/main/java/azkaban/executor/selector/ExecutorFilter.java
+++ b/azkaban-common/src/main/java/azkaban/executor/selector/ExecutorFilter.java
@@ -98,13 +98,13 @@ public final class ExecutorFilter extends CandidateFilter<Executor, ExecutableFl
     return FactorFilter.create(STATICREMAININGFLOWSIZE_FILTER_NAME, new FactorFilter.Filter<Executor, ExecutableFlow>() {
       public boolean filterTarget(Executor filteringTarget, ExecutableFlow referencingObject) {
         if (null == filteringTarget){
-          logger.info(String.format("%s : filtering out the target as it is null.", STATICREMAININGFLOWSIZE_FILTER_NAME));
+          logger.debug(String.format("%s : filtering out the target as it is null.", STATICREMAININGFLOWSIZE_FILTER_NAME));
           return false;
         }
 
         ExecutorInfo stats = filteringTarget.getExecutorInfo();
         if (null == stats) {
-          logger.info(String.format("%s : filtering out %s as it's stats is unavailable.",
+          logger.debug(String.format("%s : filtering out %s as it's stats is unavailable.",
               STATICREMAININGFLOWSIZE_FILTER_NAME,
               filteringTarget.toString()));
           return false;
@@ -126,13 +126,13 @@ public final class ExecutorFilter extends CandidateFilter<Executor, ExecutableFl
       private static final int MINIMUM_FREE_MEMORY = 6 * 1024;
       public boolean filterTarget(Executor filteringTarget, ExecutableFlow referencingObject) {
         if (null == filteringTarget){
-          logger.info(String.format("%s : filtering out the target as it is null.", MINIMUMFREEMEMORY_FILTER_NAME));
+          logger.debug(String.format("%s : filtering out the target as it is null.", MINIMUMFREEMEMORY_FILTER_NAME));
           return false;
         }
 
         ExecutorInfo stats = filteringTarget.getExecutorInfo();
         if (null == stats) {
-          logger.info(String.format("%s : filtering out %s as it's stats is unavailable.",
+          logger.debug(String.format("%s : filtering out %s as it's stats is unavailable.",
               MINIMUMFREEMEMORY_FILTER_NAME,
               filteringTarget.toString()));
           return false;
@@ -156,13 +156,13 @@ public final class ExecutorFilter extends CandidateFilter<Executor, ExecutableFl
       private static final int MAX_CPU_CURRENT_USAGE = 95;
       public boolean filterTarget(Executor filteringTarget, ExecutableFlow referencingObject) {
         if (null == filteringTarget){
-          logger.info(String.format("%s : filtering out the target as it is null.", CPUSTATUS_FILTER_NAME));
+          logger.debug(String.format("%s : filtering out the target as it is null.", CPUSTATUS_FILTER_NAME));
           return false;
         }
 
         ExecutorInfo stats = filteringTarget.getExecutorInfo();
         if (null == stats) {
-          logger.info(String.format("%s : filtering out %s as it's stats is unavailable.",
+          logger.debug(String.format("%s : filtering out %s as it's stats is unavailable.",
               MINIMUMFREEMEMORY_FILTER_NAME,
               filteringTarget.toString()));
           return false;
diff --git a/azkaban-execserver/src/main/java/azkaban/execapp/AzkabanExecutorServer.java b/azkaban-execserver/src/main/java/azkaban/execapp/AzkabanExecutorServer.java
index 8f5df1a..47fbfad 100644
--- a/azkaban-execserver/src/main/java/azkaban/execapp/AzkabanExecutorServer.java
+++ b/azkaban-execserver/src/main/java/azkaban/execapp/AzkabanExecutorServer.java
@@ -132,7 +132,7 @@ public class AzkabanExecutorServer {
     root.addServlet(new ServletHolder(new ExecutorServlet()), "/executor");
     root.addServlet(new ServletHolder(new JMXHttpServlet()), "/jmx");
     root.addServlet(new ServletHolder(new StatsServlet()), "/stats");
-    root.addServlet(new ServletHolder(new ServerStatisticsServlet()), "/serverstastics");
+    root.addServlet(new ServletHolder(new ServerStatisticsServlet()), "/serverStatistics");
 
     root.setAttribute(ServerConstants.AZKABAN_SERVLET_CONTEXT_KEY, this);
 
diff --git a/azkaban-execserver/src/main/java/azkaban/execapp/ServerStatisticsServlet.java b/azkaban-execserver/src/main/java/azkaban/execapp/ServerStatisticsServlet.java
index d5cb550..c844cbf 100644
--- a/azkaban-execserver/src/main/java/azkaban/execapp/ServerStatisticsServlet.java
+++ b/azkaban-execserver/src/main/java/azkaban/execapp/ServerStatisticsServlet.java
@@ -21,8 +21,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.util.ArrayList;
-import java.util.List;
-
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
@@ -178,13 +176,13 @@ public class ServerStatisticsServlet extends HttpServlet  {
 
 
   /**<pre>
-   * fill the result set with the Remaining temp Storage .
-   * Note : As the Top bash call doesn't yield accurate result for the system load,
+   * fill the result set with the CPU usage .
+   * Note : As the 'Top' bash call doesn't yield accurate result for the system load,
    *        the implementation has been changed to load from the "proc/loadavg" which keeps
    *        the moving average of the system load, we are pulling the average for the recent 1 min.
    *</pre>
    * @param stats reference to the result container which contains all the results, this specific method
-   *              will only work on the property "cpuUdage".
+   *              will only work on the property "cpuUsage".
    */
   protected void fillCpuUsage(ExecutorInfo stats){
     if (new File("/bin/bash").exists() && new File("/bin/cat").exists() &&  new File("/proc/loadavg").exists()) {