azkaban-developers

Merge pull request #388 from logiclord/master Update default

1/24/2015 12:18:10 AM

Details

diff --git a/azkaban-common/src/main/java/azkaban/metric/TimeBasedReportingMetric.java b/azkaban-common/src/main/java/azkaban/metric/TimeBasedReportingMetric.java
index cf1211d..b932aec 100644
--- a/azkaban-common/src/main/java/azkaban/metric/TimeBasedReportingMetric.java
+++ b/azkaban-common/src/main/java/azkaban/metric/TimeBasedReportingMetric.java
@@ -39,7 +39,7 @@ public abstract class TimeBasedReportingMetric<T> extends AbstractMetric<T> {
   public TimeBasedReportingMetric(String metricName, String metricType, T initialValue, MetricReportManager manager,
       long interval) throws MetricException {
     super(metricName, metricType, initialValue, manager);
-    if(validateInterval(interval)) {
+    if(!isValidInterval(interval)) {
       throw new MetricException("Invalid interval: Cannot instantiate timer");
     }
     timer = new Timer();
@@ -71,7 +71,7 @@ public abstract class TimeBasedReportingMetric<T> extends AbstractMetric<T> {
    * @throws MetricException
    */
   public void updateInterval(final long interval) throws MetricException {
-    if(validateInterval(interval)) {
+    if(!isValidInterval(interval)) {
       throw new MetricException("Invalid interval: Cannot update timer");
     }
     logger.debug(String.format("Updating tracking interval to %d milisecond for %s metric", interval, getName()));
@@ -80,7 +80,7 @@ public abstract class TimeBasedReportingMetric<T> extends AbstractMetric<T> {
     timer.schedule(getTimerTask(), interval, interval);
   }
 
-  private boolean validateInterval(final long interval) {
+  private boolean isValidInterval(final long interval) {
     return interval >= MIN_MILISEC_INTERVAL && interval <= MAX_MILISEC_INTERVAL;
   }
 
diff --git a/azkaban-sql/src/sql/create.projects.sql b/azkaban-sql/src/sql/create.projects.sql
index 642afa0..923b040 100644
--- a/azkaban-sql/src/sql/create.projects.sql
+++ b/azkaban-sql/src/sql/create.projects.sql
@@ -6,7 +6,7 @@ CREATE TABLE projects (
 	create_time BIGINT NOT NULL,
 	version INT,
 	last_modified_by VARCHAR(64) NOT NULL,
-	description VARCHAR(255),
+	description VARCHAR(2048),
 	enc_type TINYINT,
 	settings_blob LONGBLOB,
 	UNIQUE INDEX project_id (id)