Permalink
Browse files

Fixing JMX for cache as well as having the index server to kill well.

  • Loading branch information...
1 parent 46129ca commit 945d00017b114ad02cce8f09676c8007bcf6f5e5 @rbpark committed Mar 22, 2012
@@ -15,23 +15,25 @@ public int getCacheSize() {
}
@Override
- public long getCleanIntervalMillisec() {
+ public long getCleanInterval() {
return this.manager.getCleanInterval();
}
@Override
- public void setCleanIntervalMillisec(long interval) {
+ public String setCleanInterval(long interval) {
this.manager.setCleanInterval(interval);
+ return "success";
}
@Override
- public long getTimeToIdleMillisec() {
+ public long getTimeToIdle() {
return this.manager.getTimeToIdle();
}
@Override
- public void setTimeToIdleMillisec(long millisec) {
+ public String setTimeToIdle(long millisec) {
this.manager.setTimeToIdleMillisec(millisec);
+ return "success";
}
@Override
@@ -2,20 +2,26 @@
public interface CacheFlowManagerMBean {
@DisplayName("OPERATION: getCacheSize")
- public int getCacheSize();
+ int getCacheSize();
- @DisplayName("OPERATION: purgeCache")
- public void purgeCache();
-
- @DisplayName("OPERATION: getCleanIntervalMillisec")
- public long getCleanIntervalMillisec();
+ @DisplayName("OPERATION: purgeCache ")
+ void purgeCache();
+
+ @DisplayName("OPERATION: getTimeToIdle")
+ long getTimeToIdle();
- @DisplayName("OPERATION: setCleanIntervalMillisec")
- public void setCleanIntervalMillisec(long interval);
+ @DisplayName("OPERATION: setTimeToIdle")
+ String setTimeToIdle(
+ @ParameterName("millisec : The idle age in millisec")
+ long millisec
+ );
- @DisplayName("OPERATION: getTimeToIdleMillisec")
- public long getTimeToIdleMillisec();
+ @DisplayName("OPERATION: getCleanInterval ")
+ long getCleanInterval();
- @DisplayName("OPERATION: setTimeToIdleMillisec")
- public void setTimeToIdleMillisec(long millisec);
+ @DisplayName("OPERATION: Set the clean interval ")
+ String setCleanInterval(
+ @ParameterName("interval : The interval in millisec")
+ long interval
+ );
}
@@ -192,6 +192,12 @@ private void cancelJob(AzkabanApplication app, HttpServletRequest req) throws Se
}
}
}
+
+ try {
+ app.getJobExecutorManager().cancel(jobId);
+ } catch (Exception e) {
+ logger.info(e.getMessage());
+ }
}
private String scheduleJobs(AzkabanApplication app,

0 comments on commit 945d000

Please sign in to comment.