Package com.ikanow.infinit.e.processing.custom

Examples of com.ikanow.infinit.e.processing.custom.CustomProcessingController


   
    try {
      if (0 != (testsToRun & 0x1)) {
        // Basic functionality, hourly first time run
        doTest(1);
        new CustomProcessingController().runThroughSavedQueues();
      }     
      if (0 != (testsToRun & 0x2)) {
        // Basic functionality, multiple queries
        doTest(1);
        doTest(2); // already inserted docs)
        new CustomProcessingController().runThroughSavedQueues();
      }
      if (0 != (testsToRun & 0x4)) {
        // Check that extra time term gets added and check last time
        doTest(3);
        new CustomProcessingController().runThroughSavedQueues();
      }
      if (0 != (testsToRun & 0x8)) {
        // daily frequency, maxDocs
        doTest(4);
        new CustomProcessingController().runThroughSavedQueues();
      }
      if (0 != (testsToRun & 0x10)) {
        // weekly frequency, last doc inserted
        doTest(5);
        new CustomProcessingController().runThroughSavedQueues();
      }
      if (0 != (testsToRun & 0x20)) {
        // saved query
        doTest(6);
        new CustomProcessingController().runThroughSavedQueues();
      }
    }
    finally {
      DbManager.getSocial().getShare().remove(new BasicDBObject(SharePojo._id_, fixedShareId_1));
      DbManager.getSocial().getShare().remove(new BasicDBObject(SharePojo._id_, fixedShareId_2));
View Full Code Here


    {
      String jobOverride = null;
      if (cliOpts.hasOption("jobtitle")) {
        jobOverride = (String) cliOpts.getOptionValue("jobtitle");
      }
      CustomProcessingController customPxController = new CustomProcessingController();
      customPxController.checkScheduledJobs(jobOverride);
      customPxController.checkRunningJobs();
      customPxController.runThroughSavedQueues();
    }
    else {
      //Test code for distribution:
//      boolean bSync = true;
//      LinkedList<SourcePojo> testSources = null;
View Full Code Here

            }
          }//TESTED - (don't run/daily/once-only) - covers all the cases, except the "theoretical" null cases
         
          if (tryToKillJob) {
            // (ie is running and updating it to mean don't run anymore .. that 4e12 number is 2099 in ms, anything bigger than that is assumed to mean "don't run)
            CustomProcessingController pxController = new CustomProcessingController();
            if (pxController.killRunningJob(cmr)) {           
              rp.setResponse(new ResponseObject("Update MapReduce Job",true,"Killed job, may take a few moments for the status to update."));
            }
            else {
              rp.setResponse(new ResponseObject("Update MapReduce Job",false,"Failed to kill the job - it may not have started yet, try again in a few moments."));
            }             
View Full Code Here

        job.lastRunTime = new Date();
        job.jobidS = "";
        DbManager.getCustom().getLookup().save(job.toDb());             
       
        // Run the job
        CustomProcessingController pxController = null;
        if (null != _debugLimit) {
          pxController = new CustomProcessingController(_debugLimit);         
        }
        else {
          pxController = new CustomProcessingController();
        }
        pxController.initializeJob(job); // (sets job.jobid*)
       
        // In quick run mode, keep checking until the job is done (5s intervals)
        if (bQuickRun) {
          int nRuns = 0;
          while (!pxController.checkRunningJobs(job)) {
            try { Thread.sleep(5000); } catch (Exception e) {}
            if (++nRuns > 120) { // bail out after 10 minutes
              break;
            }
          }
View Full Code Here

TOP

Related Classes of com.ikanow.infinit.e.processing.custom.CustomProcessingController

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.