Package com.ikanow.infinit.e.application.data_model

Examples of com.ikanow.infinit.e.application.data_model.TestLogstashExtractorPojo.toDb()


        // Copy into the slaves' queue
        DBCursor dbc = DbManager.getIngest().getLogHarvesterSlaves().find();
        while (dbc.hasNext()) {           
          BasicDBObject slave = (BasicDBObject) dbc.next();
          testInfo.forSlave = slave.getString("_id");
          _logHarvesterQ.push(testInfo.toDb());
          testInfo.forSlave = null;

          //DEBUG
          //System.out.println("DISTRIBUTING DELETION MESSAGE TO " + slave.toString());
          _logger.info("distributing deletion message to host=" + slave.toString());
View Full Code Here


      if ((null == testInfo.maxDocs) || (null == testInfo.logstash.config) || (null == testInfo.isAdmin) || (null == testInfo.sourceKey))
      {
        TestLogstashExtractorPojo testErr = new TestLogstashExtractorPojo();
        testErr._id = testInfo._id;
        testErr.error = "Internal Logic Error. Missing one of: maxDocs, isAdmin, sourceKey, logstash.config";
        _logHarvesterQ.push(testErr.toDb());

        return;
      }//TESTED
     
      // Validate/tranform the configuration:
View Full Code Here

      String logstashConfig = LogstashConfigUtils.validateLogstashInput(testInfo.sourceKey, testInfo.logstash.config, errMessage, testInfo.isAdmin);
      if (null == logstashConfig) { // Validation error...
        TestLogstashExtractorPojo testErr = new TestLogstashExtractorPojo();
        testErr._id = testInfo._id;
        testErr.error = "Validation error: " + errMessage.toString();
        _logHarvesterQ.push(testErr.toDb());

        return;       
      }//TESTED
     
      // Replacement for #LOGSTASH{host} - currently only replacement supported (+ #IKANOW{} in main code)
View Full Code Here

            // (note this is capped at well below the BSON limit in the thread below)
        }
        else { // maxDocs==0 (ie pre-publish test) AND no error returned
          testErr.error = null;
        }
        _logHarvesterQ.push(testErr.toDb());
        //TESTED       
      }
      catch (Exception e) {
        //DEBUG
        //e.printStackTrace();       
View Full Code Here

        //e.printStackTrace();       

        TestLogstashExtractorPojo testErr = new TestLogstashExtractorPojo();
        testErr._id = testInfo._id;
        testErr.error = "Internal Logic Error: " + e.getMessage();
        _logHarvesterQ.push(testErr.toDb());

      }//TOTEST
      finally {
        // If we created a sincedb path then remove it:
        try {
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.