chrismattmann commented on a change in pull request #131: Changed the map and 
reduce function to work with XmlRpcWorkflowManger
URL: https://github.com/apache/drat/pull/131#discussion_r193806972
 
 

 ##########
 File path: proteus/src/main/java/backend/ProcessDratWrapper.java
 ##########
 @@ -111,15 +115,51 @@ public synchronized void setStatus(String status) {
 
   @Override
   public void crawl() throws Exception {
-    simpleDratExec(CRAWL_CMD, this.path);
+//    simpleDratExec(CRAWL_CMD, this.path);
+      crawlTemp();
+  }
+
+
+  public void crawlTemp() throws Exception{
+    DratLog crawlLog = new DratLog("CRAWLING");
+    try{
+      setStatus(CRAWL_CMD);
+
+      crawlLog.logInfo("Configuring");
+      String beanRepo = 
System.getProperty("org.apache.oodt.cas.crawl.bean.repo",
+              FileConstants.CRAWLER_CONFIG);
+      String crawlerId = "MetExtractorProductCrawler";
+      System.setProperty("DRAT_EXCLUDE","");
+      FileSystemXmlApplicationContext appContext = new 
FileSystemXmlApplicationContext("file:"+beanRepo);
+
+        MetExtractorProductCrawler crawler = new MetExtractorProductCrawler();
+        crawler.setApplicationContext(appContext);
+        crawler.setId(crawlerId);
+        
crawler.setMetExtractor("org.apache.oodt.cas.metadata.extractors.CopyAndRewriteExtractor");
+        crawler.setMetExtractorConfig(FileConstants.MET_EXT_CONFIG_PATH);
+        crawler.setFilemgrUrl(FileConstants.FILEMGR_URL);
+        
crawler.setClientTransferer("org.apache.oodt.cas.filemgr.datatransfer.InPlaceDataTransferFactory");
+        crawler.setPreCondIds(Arrays.asList("RegExExcludeComparator"));
+        crawler.setProductPath(this.path);
+        crawlLog.logInfo("STARTING ",null);
+        crawler.crawl();
+        crawlLog.logInfo("COMPLETED",null);
+      }catch (Exception ex) {
+//      LOG.severe(ex.getLocalizedMessage());
 
 Review comment:
   if it's commented out, remove it

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to