kunal642 commented on a change in pull request #3855: URL: https://github.com/apache/carbondata/pull/3855#discussion_r459584046
########## 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: Why are you scheduling this after 3s.. I think this scheduling rate is too fast. Better to execute this thread at a fixed delay of 1 hour. ---------------------------------------------------------------- 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