Package com.flaptor.util

Examples of com.flaptor.util.Config.modifyOnDisk()


        File logsDir = new File(componentDir, "logs");
      FileUtil.createIfDoesntExist(logsDir, true, true);
    Config commonProperties = Config.getConfig("common.properties");
    commonProperties.set("port.base", String.valueOf(componentConfig.installOnBasePort));
    commonProperties.set("baseDir", componentConfig.installOnBaseDir.getPath());
    commonProperties.modifyOnDisk(new File(confDir,"common.properties"));
  }
 
  private static void installSearcher(String distDir, File installBasePath, SearcherConfig searcherConfig, CacheServerConfig cacheServerConfig) throws IOException {
        logger.info("installing searcher");
        TarUtil.untarFile(FileUtil.getExistingFile(distDir+"/searcher.tgz", true, false, false), installBasePath);
View Full Code Here


    Config properties = Config.getConfig("searcher.properties");
   
    properties.set("searcher.cachedVersion.showLink", String.valueOf(cacheServerConfig.install));
    properties.set("searcher.cachedVersion.cacheServerHost", cacheServerConfig.externalHostName + ":" + cacheServerConfig.installOnBasePort);
    properties.modifyOnDisk(new File(installBasePath,"/searcher/conf/searcher.properties"));
   
  }

  private static void installCrawler(String distDir, File installBasePath, CrawlerConfig crawlerConfig, IndexerConfig indexerConfig) throws IOException {
        logger.info("installing crawler");
View Full Code Here

        TarUtil.untarFile(FileUtil.getExistingFile(distDir+"/crawler.tgz", true, false, false), installBasePath);
    doCommonTasks(new File(installBasePath,"/crawler"), crawlerConfig);

    Config indexerModuleProperties = Config.getConfig("indexerModule.properties");
    indexerModuleProperties.set("remoteRmiIndexer.host", indexerConfig.installOnHost + ":" + indexerConfig.installOnBasePort);
    indexerModuleProperties.modifyOnDisk(new File(installBasePath,"/crawler/conf/indexerModule.properties"));
   
    configureCrawler(new File(installBasePath, "crawler"), crawlerConfig);
  }

  /**
 
View Full Code Here

    doCommonTasks(new File(installBasePath,"/indexer"), indexerConfig);

    Config indexerProperties = Config.getConfig("indexer.properties");
    indexerProperties.set("IndexLibrary.rsyncAccessString", indexerConfig.installOnHost);
    indexerProperties.set("IndexLibrary.remoteIndexUpdaters", searcherConfig.installOnHost + ":" + searcherConfig.installOnBasePort);
    indexerProperties.modifyOnDisk(new File(installBasePath,"/indexer/conf/indexer.properties"));
  }

  private static void installCacheServer(String distDir, File installBasePath, CacheServerConfig cacheServerConfig, CrawlerConfig crawlerConfig) throws IOException {
        logger.info("installing cache-server");
        TarUtil.untarFile(FileUtil.getExistingFile(distDir+"/cache-server.tgz", true, false, false), installBasePath);
View Full Code Here

        TarUtil.untarFile(FileUtil.getExistingFile(distDir+"/cache-server.tgz", true, false, false), installBasePath);
    doCommonTasks(new File(installBasePath,"/cache-server"), cacheServerConfig);
       
        Config indexerProperties = Config.getConfig("multiCache.properties");
    indexerProperties.set("multiCache.hosts", crawlerConfig.installOnHost + ":" + crawlerConfig.installOnBasePort);
    indexerProperties.modifyOnDisk(new File(installBasePath,"/cache-server/conf/multiCache.properties"));

  }
 
  private static void installClusteringWeb(String distDir,File installBasePath,SearcherConfig searcherConfig,IndexerConfig indexerConfig,CrawlerConfig crawlerConfig,CacheServerConfig cacheServerConfig,ClusteringWebConfig clusteringWebConfig) throws IOException {
        logger.info("installing clustering-web");
View Full Code Here

    if (crawlerConfig.install) hosts += (hosts.length() == 0?"":",") + crawlerConfig.installOnHost + ":" + (crawlerConfig.installOnBasePort + PortUtil.getOffset("clustering.rpc.crawler")) + ":" + searcherConfig.installOnBaseDir+"/crawler" + ":" + crawlerConfig.clusteringType;
    if (cacheServerConfig.install) hosts += (hosts.length() == 0?"":",") + cacheServerConfig.installOnHost + ":" + (cacheServerConfig.installOnBasePort + PortUtil.getOffset("clustering.rpc.cacheServer")) + ":" + searcherConfig.installOnBaseDir+"/cache-server" + ":" + cacheServerConfig.clusteringType;
   
    Config clusteringProperties = Config.getConfig("clustering.properties");
    clusteringProperties.set("clustering.nodes", hosts);
    clusteringProperties.modifyOnDisk(new File(installBasePath,"/clustering-web/conf/clustering.properties"));
  }
}
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.