Package com.ikanow.infinit.e.data_model.custom

Examples of com.ikanow.infinit.e.data_model.custom.InfiniteMongoConfig


  @Override
  public List<InputSplit> getSplits(JobContext context)
  {
    final Configuration hadoopConfiguration = context.getConfiguration();
    final InfiniteMongoConfig conf = new InfiniteMongoConfig( hadoopConfiguration );
    String queryStr = hadoopConfiguration.get("mongo.input.query");
    String userIdStr = hadoopConfiguration.get("infinit.e.userid");
    AdvancedQueryPojo query = AdvancedQueryPojo.fromApi(queryStr, AdvancedQueryPojo.class);
    return calculateSplits(query, userIdStr, conf);   
 
View Full Code Here


    public void setup(Context context) {
      _javascript.setupJavascript(context.getConfiguration().get("arguments"), context, null);
      _javascript._engine.put("_query", context.getConfiguration().get("mongo.input.query"));
     
      // Set up cache if one is specified
      InfiniteMongoConfig config = new InfiniteMongoConfig(context.getConfiguration());
      BasicDBList caches = config.getCacheList();
      if ((null != caches) && !caches.isEmpty()) {       
        try {
          CacheUtils.addJSONCachesToEngine(caches, _javascript._engine, _javascript._secManager, (config.getLimit() > 0));
        } catch (Exception e) {
          throw new RuntimeException("Error setting up caches: " + caches);
        }
      }
    }
View Full Code Here

    public void setup(Context context) {
      _javascript.setupJavascript(context.getConfiguration().get("arguments"), context, context);
      _javascript._engine.put("_query", context.getConfiguration().get("mongo.input.query"));

      // Set up cache if one is specified
      InfiniteMongoConfig config = new InfiniteMongoConfig(context.getConfiguration());
      BasicDBList caches = config.getCacheList();
      if ((null != caches) && !caches.isEmpty()) {       
        try {
          CacheUtils.addJSONCachesToEngine(caches, _javascript._engine, _javascript._secManager, (config.getLimit() > 0));
        } catch (Exception e) {
          throw new RuntimeException("Error setting up caches: " + caches);
        }
      }
    }
View Full Code Here

    public void setup(Context context) {
      _javascript.setupJavascript(context.getConfiguration().get("arguments"), context, context);
      _javascript._engine.put("_query", context.getConfiguration().get("mongo.input.query"));

      // Set up cache if one is specified
      InfiniteMongoConfig config = new InfiniteMongoConfig(context.getConfiguration());
      BasicDBList caches = config.getCacheList();
      if ((null != caches) && !caches.isEmpty()) {       
        try {
          CacheUtils.addJSONCachesToEngine(caches, _javascript._engine, _javascript._secManager, (config.getLimit() > 0));
        } catch (Exception e) {
          throw new RuntimeException("Error setting up caches: " + caches);
        }
      }
    }
View Full Code Here

TOP

Related Classes of com.ikanow.infinit.e.data_model.custom.InfiniteMongoConfig

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.