Examples of CustomMapReduceJobPojo


Examples of com.ikanow.infinit.e.data_model.store.custom.mapreduce.CustomMapReduceJobPojo

    checkScheduledJobs(null);
  }
  public void checkScheduledJobs(String jobOverride) {
    //check mongo for jobs needing ran
   
    CustomMapReduceJobPojo job = null;
    if (null != jobOverride) {
      job = CustomMapReduceJobPojo.fromDb(
          MongoDbManager.getCustom().getLookup().findOne(new BasicDBObject(CustomMapReduceJobPojo.jobtitle_, jobOverride)),
          CustomMapReduceJobPojo.class);
     
      if (null != job) {
        job.lastRunTime = new Date();
        job.nextRunTime = job.lastRunTime.getTime();
        if (!_bLocalMode) {
          // Need to store the times or they just get lost between here and the job completion check 
          MongoDbManager.getCustom().getLookup().save(job.toDb());
            // (not that efficient, but this is essentially a DB call so whatever)
        }
        initializeJob(job);
      }
    }
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.custom.mapreduce.CustomMapReduceJobPojo

    //get mongo entries that have jobids?
    try
    {
      JobClient jc = null;
     
      CustomMapReduceJobPojo cmr = jobOverride;
      if (null == cmr)
        cmr = CustomScheduleManager.getJobsToMakeComplete(_bHadoopEnabled);
      else if (null == cmr.jobidS)
        return true;
     
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.custom.mapreduce.CustomMapReduceJobPojo

  public static String getCustomDbAndCollection(String jobid)
  {
    DBObject dbo = DbManager.getCustom().getLookup().findOne(new BasicDBObject(CustomMapReduceJobPojo._id_, new ObjectId(jobid)));
    if ( dbo != null )
    {
      CustomMapReduceJobPojo cmr = CustomMapReduceJobPojo.fromDb(dbo, CustomMapReduceJobPojo.class);
      return cmr.getOutputDatabase() + "." + cmr.outputCollection;
    }
    return null;
  }
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.custom.mapreduce.CustomMapReduceJobPojo

     
      // 1) Check authentication
     
      String jobName = null;
      ObjectId jobId = null;
      CustomMapReduceJobPojo customJob = null;
      BasicDBObject query = new BasicDBObject(CustomMapReduceJobPojo.communityIds_,
                            new BasicDBObject(DbManager.in_, communityIds));
      try {
        jobId = new ObjectId(jobNameOrShareId);
        query.put(CustomMapReduceJobPojo._id_, jobId);
        customJob = CustomMapReduceJobPojo.fromDb(
            MongoDbManager.getCustom().getLookup().findOne(query),
              CustomMapReduceJobPojo.class);
      }
      catch (Exception e) {
        // it's a job name
        jobName = jobNameOrShareId;
        query.put(CustomMapReduceJobPojo.jobtitle_, jobName);
        customJob = CustomMapReduceJobPojo.fromDb(
            MongoDbManager.getCustom().getLookup().findOne(query),
              CustomMapReduceJobPojo.class);
      }
      if (null == customJob) {
        throw new RuntimeException("Authentication failure or no matching custom job");
      }
      jobName = customJob.jobtitle;
      jobId = customJob._id;
     
      DBCollection cacheCollection = MongoDbManager.getCollection(customJob.getOutputDatabase(), customJob.outputCollection);
     
      // 2) Do we already have this cache?
     
      CustomCacheInJavascript cacheElement = _customCache.get(jobNameOrShareId);
     
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.custom.mapreduce.CustomMapReduceJobPojo

    {
      //find admin entry);
      DBObject dbo = DbManager.getCustom().getLookup().findOne(new BasicDBObject(DbManager.or_,searchTerms.toArray()));     
      if ( dbo != null )
      {       
        CustomMapReduceJobPojo cmr = CustomMapReduceJobPojo.fromDb(dbo, CustomMapReduceJobPojo.class);
        //make sure user is allowed to see results
        if ( RESTTools.adminLookup(userid) || isInAllCommunities(cmr.communityIds, userid) )
        {                   
          //get results collection if done and return
          if ( ( cmr.lastCompletionTime != null ) || (cmr.mapper.equals("none") && cmr.exportToHdfs))
          {
            BasicDBObject queryDbo = null;
            if (null != findStr) {
              queryDbo = (BasicDBObject) com.mongodb.util.JSON.parse(findStr);
            }
            else {
              queryDbo = new BasicDBObject()
            }//TOTEST
           
            BasicDBObject fieldsDbo = new BasicDBObject();
            if (null != fields) {
              fieldsDbo = (BasicDBObject) com.mongodb.util.JSON.parse("{" + fields + "}");
            }

            //return the results:
           
            // Need to handle sorting...
            BasicDBObject sort = null;
            if (null != sortStr) { //override
              sort = (BasicDBObject) com.mongodb.util.JSON.parse(sortStr);
            }
            else { //defaults
              String sortField = "_id";
              int sortDir = 1;
              BasicDBObject postProcObject = (BasicDBObject) com.mongodb.util.JSON.parse(InfiniteHadoopUtils.getQueryOrProcessing(cmr.query, InfiniteHadoopUtils.QuerySpec.POSTPROC));
              if ( postProcObject != null )
              {
                sortField = postProcObject.getString("sortField", "_id");
                sortDir = postProcObject.getInt("sortDirection", 1);
              }//TESTED (post proc and no post proc)
              sort = new BasicDBObject(sortField, sortDir);
            }//TOTEST
           
            // Case 1: DB
            rp.setResponse(new ResponseObject("Custom Map Reduce Job Results",true,"Map reduce job completed at: " + cmr.lastCompletionTime));
            if ((null == cmr.exportToHdfs) || !cmr.exportToHdfs) {
              DBCursor resultCursor = null;
              if (limit > 0) {
                resultCursor = DbManager.getCollection(cmr.getOutputDatabase(), cmr.outputCollection).find(queryDbo, fieldsDbo).sort(sort).limit(limit);
              }
              else {
                resultCursor = DbManager.getCollection(cmr.getOutputDatabase(), cmr.outputCollection).find(queryDbo, fieldsDbo).sort(sort);
              }
              CustomMapReduceResultPojo cmrr = new CustomMapReduceResultPojo();
              cmrr.lastCompletionTime = cmr.lastCompletionTime;
              cmrr.results = resultCursor.toArray();
              rp.setData(cmrr);
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.custom.mapreduce.CustomMapReduceJobPojo

      commids.add(new ObjectId(s));
    boolean bAdmin = RESTTools.adminLookup(userid);
    //first make sure user is allowed to submit on behalf of the commids given
    if ( bAdmin || isInAllCommunities(commids, userid) )
    {
      CustomMapReduceJobPojo cmr = new CustomMapReduceJobPojo();
      //make sure user can use the input collection
      String inputCollection = getStandardInputCollection(inputColl);     
      if ( inputCollection != null )
      {
        cmr.isCustomTable = false;
      }
      else
      {
        inputCollection = getCustomInputCollection(inputColl, commids);
        cmr.isCustomTable = true;
      }
      if ( inputCollection != null)
      {       
        try
        {         
          cmr.communityIds = commids;
          cmr._id = new ObjectId();
          cmr.jobtitle = title;
          cmr.jobdesc = desc;
          cmr.inputCollection = inputCollection;
          if ((null == jarURL) || jarURL.equals("null")) {
            cmr.jarURL = null;
            // Force the types:
            outputKey = "org.apache.hadoop.io.Text";
            outputValue = "com.mongodb.hadoop.io.BSONWritable";
          }
          else {
            cmr.jarURL = jarURL;
          }
          cmr.outputCollection = cmr._id.toString() + "_1";
          cmr.outputCollectionTemp = cmr._id.toString() + "_2";
          cmr.exportToHdfs = exportToHdfs;
         
          // Get the output database, based on the size of the collection
          long nJobs = DbManager.getCustom().getLookup().count();
          long nDbNum = nJobs / 3000; // (3000 jobs per collection, max is 6000)
          if (nDbNum > 0) { // else defaults to custommr
            String dbName = cmr.getOutputDatabase() + Long.toString(nDbNum);
            cmr.setOutputDatabase(dbName);
          }
         
          cmr.submitterID = new ObjectId(userid);
          long nextRun = Long.parseLong(nextRunTime);
          cmr.firstSchedule = new Date(nextRun);         
          cmr.nextRunTime = nextRun;
          //if this job is set up to run before now, just set the next run time to now
          //so we can schedule jobs appropriately
          long nNow = new Date().getTime();
          if ( cmr.nextRunTime < nNow )
            cmr.nextRunTime = nNow - 1;
          //TESTED
         
          cmr.scheduleFreq = SCHEDULE_FREQUENCY.valueOf(schedFreq);
          if ( (null != mapperClass) && !mapperClass.equals("null"))
            cmr.mapper = mapperClass;
          else
            cmr.mapper = "";
          if ( (null != reducerClass) && !reducerClass.equals("null"))
            cmr.reducer = reducerClass;
          else
            cmr.reducer = "";
          if ( (null != combinerClass) &&  !combinerClass.equals("null"))
            cmr.combiner = combinerClass;
          else
            cmr.combiner = "";
          if ( (null != outputKey) && !outputKey.equals("null"))
            cmr.outputKey = outputKey;
          else
            cmr.outputKey = "com.mongodb.hadoop.io.BSONWritable";
          if ( (null != outputValue) && !outputValue.equals("null"))
            cmr.outputValue = outputValue;
          else
            cmr.outputValue = "com.mongodb.hadoop.io.BSONWritable";
          if ( (null != query) && !query.equals("null") && !query.isEmpty())
            cmr.query = query;
          else
            cmr.query = "{}";
         
          boolean append = false;
          double ageOut = 0.0;
          try
          {
            append = Boolean.parseBoolean(appendResults);
            ageOut = Double.parseDouble(ageOutInDays);
          }
          catch (Exception ex)
          {
            append = false;
            ageOut = 0.0;
          }
          cmr.appendResults = append;
          cmr.appendAgeOutInDays = ageOut;
          cmr.incrementalMode = incrementalMode;
          cmr.selfMerge = selfMerge;
         
          if ( json != null && !json.equals("null") )
            cmr.arguments = json;
          else
            cmr.arguments = null;
         
          if ((null == cmr.jarURL) && (null != cmr.arguments) && !cmr.arguments.isEmpty()) {
            // In saved query, if arguments is valid BSON then copy over query
            try {
              Object tmpQuery = com.mongodb.util.JSON.parse(cmr.arguments);
              if (tmpQuery instanceof BasicDBObject) {
                cmr.query = cmr.arguments;
              }
            }
            catch (Exception e) {} // fine just carry on
          }
          else if ((null == cmr.jarURL)) { // ie args == null, copy from query
            cmr.arguments = cmr.query;
          }
         
          //try to work out dependencies, error out if they fail
          if ( (null != jobsToDependOn) && !jobsToDependOn.equals("null"))
          {
            try
            {
              cmr.jobDependencies = getJobDependencies(jobsToDependOn);
              cmr.waitingOn = cmr.jobDependencies;
            }
            catch (Exception ex)
            {
              rp.setResponse(new ResponseObject("Schedule MapReduce Job",false,"Error parsing the job dependencies, did a title or id get set incorrectly or did a job not exist?"));
              return rp;
            }
          }
         
          //make sure title hasn't been used before
          DBObject dbo = DbManager.getCustom().getLookup().findOne(new BasicDBObject("jobtitle",title));
          if ( dbo == null )
          {
            Date nextRunDate = new Date(nextRun);
            Date now = new Date();
            String nextRunString = nextRunDate.toString();
            boolean bRunNowIfPossible = false;
            if ( nextRunDate.getTime() < now.getTime() ) {
              nextRunString = "next available timeslot";
              bRunNowIfPossible = true;
            }
            rp.setResponse(new ResponseObject("Schedule MapReduce Job",true,"Job scheduled successfully, will run on: " + nextRunString));
            rp.setData(cmr._id.toString(), null);
                       
            if (bRunNowIfPossible) {
              runJobAndWaitForCompletion(cmr, bQuickRun);
            }//TESTED
            else {
              DbManager.getCustom().getLookup().save(cmr.toDb());             
            }
          }
          else
          {         
            rp.setResponse(new ResponseObject("Schedule MapReduce Job",false,"A job already matches that title, please choose another title"));
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.custom.mapreduce.CustomMapReduceJobPojo

    searchTerms.add(new BasicDBObject(CustomMapReduceJobPojo.jobtitle_,jobidortitle));
    DBObject dbo = DbManager.getCustom().getLookup().findOne(new BasicDBObject(DbManager.or_,searchTerms.toArray()));
   
    if ( dbo != null )
    {
      CustomMapReduceJobPojo cmr = CustomMapReduceJobPojo.fromDb(dbo, CustomMapReduceJobPojo.class);
      //verify user can update this job
      if ( RESTTools.adminLookup(userid) || cmr.submitterID.toString().equals(userid) )
      {
        //check if job is already running
        if ( ( cmr.jobidS != null ) && !cmr.jobidS.equals( "CHECKING_COMPLETION" ) &&  !cmr.jobidS.equals( "" ) ) // (< robustness, sometimes server gets stuck here...)
        {
          // If it is running and we're trying to turn it off .. .then kill the job:
          com.ikanow.infinit.e.processing.custom.utils.PropertiesManager customProps = new com.ikanow.infinit.e.processing.custom.utils.PropertiesManager();
          boolean bLocalMode = customProps.getHadoopLocalMode();
         
          boolean tryToKillJob = false;
          if (!bLocalMode) { // else not possible
           
            // This line means: either we're NONE already (and it hasn't changed), or we've been changed to NONE
            if ((((null == schedFreq) || (schedFreq.equalsIgnoreCase("null")))
                      && (CustomMapReduceJobPojo.SCHEDULE_FREQUENCY.NONE == cmr.scheduleFreq))
                ||
              (null != schedFreq) && (schedFreq.equalsIgnoreCase("none")))
            {
              long candidateNextRuntime = 0L;
              try {
                candidateNextRuntime = Long.parseLong(nextRunTime);
              }
              catch (Exception e) {}
              if (candidateNextRuntime >= DONT_RUN_TIME) {
                tryToKillJob = true;
              }
            }
          }//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."));
            }             
            return rp;
          }//TODO (INF-2395): TOTEST
          else {
            rp.setResponse(new ResponseObject("Update MapReduce Job",false,"Job is currently running (or not yet marked as completed).  Please wait until the job completes to update it."));
            return rp;
          }
        }
        if (cmr.jobidS != null) { // (must be checking completion, ie in bug state, so reset...)
          cmr.jobidS = null;
          cmr.jobidN = 0;
        }
        //check each variable to see if its needs/can be updated
        if ( (null != communityIds) && !communityIds.equals("null") )
        {
          List<ObjectId> commids = new ArrayList<ObjectId>();
          for ( String s : communityIds.split(","))
            commids.add(new ObjectId(s));
          boolean bAdmin = RESTTools.adminLookup(userid);
          //make sure user is allowed to submit on behalf of the commids given
          if ( bAdmin || isInAllCommunities(commids, userid) )
          {
            ElasticSearchManager customIndex = CustomOutputIndexingEngine.getExistingIndex(cmr);
            if (null != customIndex) {
              CustomOutputIndexingEngine.swapAliases(customIndex, commids, true)
            }//TESTED (by hand - removal and deletion)           
           
            cmr.communityIds = commids;
          }
          else
          {
            rp.setResponse(new ResponseObject("Update MapReduce Job",false,"You do have permissions for all the communities given."));
            return rp;
          }
        }
        if ( (null != inputColl) && !inputColl.equals("null"))
        {
          //make sure user can use the input collection
          String inputCollection = getStandardInputCollection(inputColl);     
          if ( inputCollection != null )
          {
            cmr.isCustomTable = false;
          }
          else
          {
            inputCollection = getCustomInputCollection(inputColl, cmr.communityIds);
            cmr.isCustomTable = true;
          }
          if ( inputCollection != null)
          {
            cmr.inputCollection = inputCollection;
          }
          else
          {
            rp.setResponse(new ResponseObject("Update MapReduce Job",false,"You do not have permission to use the given input collection."));
            return rp;
          }
        }
        try
        {
          if ( (null != title) && !title.equals("null"))
          {
            // If this is indexed then can't change the title
            if (null != CustomOutputIndexingEngine.getExistingIndex(cmr)) {
              rp.setResponse(new ResponseObject("Update MapReduce Job",false,"You cannot change the title of a non-empty indexed job - you can turn indexing off and then change the title"));
              return rp;             
            }//TESTED (by hand)
           
            cmr.jobtitle = title;
            //make sure the new title hasn't been used before
            DBObject dbo1 = DbManager.getCustom().getLookup().findOne(new BasicDBObject("jobtitle",title));
            if ( dbo1 != null )
            {
              rp.setResponse(new ResponseObject("Update MapReduce Job",false,"A job already matches that title, please choose another title"));
              return rp;
            }
          }
          if ( (null != desc) && !desc.equals("null"))
          {
            cmr.jobdesc = desc;
          }
          if ( (null != jarURL) && !jarURL.equals("null"))
          {
            cmr.jarURL = jarURL;
          }
          if ( (null != nextRunTime) && !nextRunTime.equals("null"))
          {
            cmr.nextRunTime = Long.parseLong(nextRunTime);
            long nNow = new Date().getTime();
            cmr.firstSchedule = new Date(cmr.nextRunTime);
            if (cmr.nextRunTime < nNow) { // ie leave firstSchedule alone since that affects when we next run, but just set this to now...
              cmr.nextRunTime = nNow - 1;
            }//TESTED
            cmr.timesRan = 0;
            cmr.timesFailed = 0;
          }
          if ( (null != schedFreq) && !schedFreq.equals("null"))
          {
            cmr.scheduleFreq = SCHEDULE_FREQUENCY.valueOf(schedFreq);
          }
          if ( (null != mapperClass) && !mapperClass.equals("null"))
          {
            cmr.mapper = mapperClass;
          }
          if ( (null != reducerClass) && !reducerClass.equals("null"))
          {
            cmr.reducer = reducerClass;
          }
          if ( (null != combinerClass) && !combinerClass.equals("null"))
          {
            cmr.combiner = combinerClass;
          }
          if ( (null != query) && !query.equals("null"))
          {
            boolean wasIndexed = CustomOutputIndexingEngine.isIndexed(cmr);
           
            if ( !query.isEmpty() )
              cmr.query = query;
            else
              cmr.query = "{}";
           
            // If we're in indexing mode, check if the index has been turned off, in which case delete the index
            if (wasIndexed && !CustomOutputIndexingEngine.isIndexed(cmr)) {
              CustomOutputIndexingEngine.deleteOutput(cmr)
            }//TESTED (by hand)
          }
          if (null == cmr.jarURL) { // (if in savedQuery mode, force types to be Text/BSONWritable)
            // Force the types:
            outputKey = "org.apache.hadoop.io.Text";
            outputValue = "com.mongodb.hadoop.io.BSONWritable";           
          }
          if ( (null != outputKey) && !outputKey.equals("null"))
          {
            cmr.outputKey = outputKey;
          }
          if ( (null != outputValue) && !outputValue.equals("null"))
          {
            cmr.outputValue = outputValue;
          }
          if ( (null != appendResults) && !appendResults.equals("null"))
          {
            try
            {
              cmr.appendResults = Boolean.parseBoolean(appendResults);
            }
            catch (Exception ex)
            {
              cmr.appendResults = false;
            }
          }
          if ( (null != ageOutInDays) && !ageOutInDays.equals("null"))
          {
            try
            {
              cmr.appendAgeOutInDays = Double.parseDouble(ageOutInDays);
            }
            catch (Exception ex)
            {
              cmr.appendAgeOutInDays = 0.0;
            }
          }
          if (null != incrementalMode)
          {
            cmr.incrementalMode = incrementalMode;
          }
          if (null != selfMerge)
          {
            cmr.selfMerge = selfMerge;
          }
         
          if (null != exportToHdfs) {
            cmr.exportToHdfs = exportToHdfs;
          }
         
          //try to work out dependencies, error out if they fail
          if ( (null != jobsToDependOn) && !jobsToDependOn.equals("null"))
          {
            try
            {
              cmr.jobDependencies = getJobDependencies(jobsToDependOn);
              cmr.waitingOn = cmr.jobDependencies;
            }
            catch (Exception ex)
            {
              rp.setResponse(new ResponseObject("Update MapReduce Job",false,"Error parsing the job dependencies, did a title or id get set incorrectly or did a job not exist?"));
              return rp;
            }
          }
          if ( json != null && !json.equals("null"))
          {
            cmr.arguments = json;
          }
          else
          {
            cmr.arguments = null;
          }
          if ((null == cmr.jarURL) && (null != cmr.arguments) && !cmr.arguments.isEmpty()) {
            // In saved query, if arguments is valid BSON then copy over query
            try {
              Object tmpQuery = com.mongodb.util.JSON.parse(cmr.arguments);
              if (tmpQuery instanceof BasicDBObject) {
                cmr.query = cmr.arguments;
              }
            }
            catch (Exception e) {} // fine just carry on
          }
          else if ((null == cmr.jarURL)) { // ie args == null, copy from query
            cmr.arguments = cmr.query;
          }
         
        }
        catch (IllegalArgumentException e)
        {
          // If an exception occurs log the error
          logger.error("Exception Message: " + e.getMessage(), e);
          rp.setResponse(new ResponseObject("Update MapReduce Job",false,"Illegal arg (enum needs to be DAILY/WEEKLY/MONTHLY/NONE?): " + e.getMessage()));
          return rp;
        }
        catch (Exception e)
        {
          // If an exception occurs log the error
          logger.error("Exception Message: " + e.getMessage(), e);
          rp.setResponse(new ResponseObject("Update MapReduce Job",false,"error scheduling job: " + e.getMessage()));
          return rp;
        }

        // Setup post-processing
       
        String nextRunString = new Date(cmr.nextRunTime).toString();
        boolean bRunNowIfPossible = false;
        if ( cmr.nextRunTime < new Date().getTime() ) {
          nextRunString = "next available timeslot";
          bRunNowIfPossible = true;
        }
       
        rp.setResponse(new ResponseObject("Update MapReduce Job",true,"Job updated successfully, will run on: " + nextRunString));
        rp.setData(cmr._id.toString(), null);

        if (bRunNowIfPossible) {
          runJobAndWaitForCompletion(cmr, bQuickRun);
        }//TESTED
        else {
          DbManager.getCustom().getLookup().save(cmr.toDb());         
        }
      }
      else
      {
        rp.setResponse(new ResponseObject("Update MapReduce Job", false, "You do not have permission to submit this job"));
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.custom.mapreduce.CustomMapReduceJobPojo

                            new BasicDBObject(DbManager.in_,communityIds.toArray()));
      query.append(DbManager.or_,searchTerms.toArray());
      DBObject dbo = DbManager.getCustom().getLookup().findOne(query);
      if ( dbo != null )
      {
        CustomMapReduceJobPojo cmr = CustomMapReduceJobPojo.fromDb(dbo, CustomMapReduceJobPojo.class);
        output = cmr._id.toString();
      }
    }
    catch (Exception exc)
    {
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.custom.mapreduce.CustomMapReduceJobPojo

          List<CustomMapReduceJobPojo> jobs = CustomMapReduceJobPojo.listFromDb(dbc, CustomMapReduceJobPojo.listType());
          // Extra bit of code, need to eliminate partial community matches, eg if job belongs to A,B and we only belong to A
          // then obviously we can't see the job since it contains data from B
          Iterator<CustomMapReduceJobPojo> jobsIt = jobs.iterator();
          while (jobsIt.hasNext()) {
            CustomMapReduceJobPojo job = jobsIt.next();
            if (!communities.containsAll(job.communityIds)) {
              jobsIt.remove();
            }
          }//TOTEST
          rp.setData(jobs, new CustomMapReduceJobPojoApiMap(communities));
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.custom.mapreduce.CustomMapReduceJobPojo

      searchTerms.add(new BasicDBObject(CustomMapReduceJobPojo.jobtitle_,dependency));
      DBObject dbo = DbManager.getCustom().getLookup().findOne(new BasicDBObject(DbManager.or_,searchTerms.toArray()));     
      if ( dbo != null )
      { 
        //job existed, add its id
        CustomMapReduceJobPojo cmr = CustomMapReduceJobPojo.fromDb(dbo, CustomMapReduceJobPojo.class);
        dependencies.add(cmr._id);
      }
      else
      {
        //throw an exception, job did not exist
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.