[ 
https://issues.apache.org/jira/browse/NUTCH-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14790799#comment-14790799
 ] 

ASF GitHub Bot commented on NUTCH-2099:
---------------------------------------

Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/59#discussion_r39662639
  
    --- Diff: src/java/org/apache/nutch/crawl/CrawlDb.java ---
    @@ -261,30 +262,68 @@ public int run(String[] args) throws Exception {
           additionsAllowed = false;
         }
         
    -    String crawldb = crawlId+"/crawldb";
    -    String segment_dir = crawlId+"/segments";
    -    File segmentsDir = new File(segment_dir);
    -    File[] segmentsList = segmentsDir.listFiles();  
    -    Arrays.sort(segmentsList, new Comparator<File>(){
    -      @Override
    -      public int compare(File f1, File f2) {
    -        if(f1.lastModified()>f2.lastModified())
    -          return -1;
    -        else
    -          return 0;
    -      }      
    -    });
    +    Path crawlDb;
    +    if(args.containsKey(Nutch.ARG_CRAWLDB)) {
    +           Object crawldbPath = args.get(Nutch.ARG_CRAWLDB);
    +           if(crawldbPath instanceof Path) {
    +                   crawlDb = (Path) crawldbPath;
    --- End diff --
    
    Formatting all of your code please.
    Julien recently committed the eclipse codeformatter to trunk
    https://github.com/apache/nutch/blob/trunk/eclipse-codeformat.xml
    If you are using some other IDE general rule is 2 space indents.


> Refactoring the REST endpoints for integration with webui
> ---------------------------------------------------------
>
>                 Key: NUTCH-2099
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2099
>             Project: Nutch
>          Issue Type: Sub-task
>          Components: REST_api, web gui
>            Reporter: Sujen Shah
>              Labels: memex
>             Fix For: 1.11
>
>
> This PR changes the structure of the arguments in the REST endpoints. Earlier 
> the args were accepted in a Map<String, String> form and now it is 
> Map<String, Object>. This is to allow Wicket to create the proper requests 
> objects and send it to NutchServer. 
> With the above, I have also added the metadata required for these services in 
> Nutch metadata.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to