MarvinLitt commented on a change in pull request #3855:
URL: https://github.com/apache/carbondata/pull/3855#discussion_r460675486



##########
File path: 
integration/spark/src/main/scala/org/apache/carbondata/indexserver/IndexServer.scala
##########
@@ -316,4 +324,17 @@ object IndexServer extends ServerInterface {
       Array(new Service("security.indexserver.protocol.acl", 
classOf[ServerInterface]))
     }
   }
+
+  def startAgingFolders(): Unit = {
+    val runnable = new Runnable() {
+      def run() {
+        val age = System.currentTimeMillis() - agePeriod.toLong
+        CarbonUtil.agingTempFolderForIndexServer(age)
+        LOGGER.info(s"Complete age temp folder 
${CarbonUtil.getIndexServerTempPath}")
+      }
+    }
+    val ags: ScheduledExecutorService = 
Executors.newSingleThreadScheduledExecutor
+    ags.scheduleAtFixedRate(runnable, 1000, 3600000, TimeUnit.MICROSECONDS)

Review comment:
       the rate is 3 hours, about the delay time, i thinks it is ok, delay 1s 
or delay 5min or delay 1hour the effect is almost the same.
   The test cases are covered here. If there is too much delay, the execution 
of test cases will be affected.
   so kunal is there no need to modify the delay here?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to