nutch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sna...@apache.org
Subject [nutch] branch master updated: NUTCH-2353 Create seed file with metadata using the REST API - reverse commits 0312bae38c9e95d496336dc24133b15ebefd4d3c and 7deb576bc58bb74725cbb6c5d82d7b9244c6ad42 to fix exception in Nutch webapp
Date Mon, 18 Dec 2017 17:14:18 GMT
This is an automated email from the ASF dual-hosted git repository.

snagel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nutch.git


The following commit(s) were added to refs/heads/master by this push:
     new dae62f8  NUTCH-2353 Create seed file with metadata using the REST API - reverse commits
0312bae38c9e95d496336dc24133b15ebefd4d3c   and 7deb576bc58bb74725cbb6c5d82d7b9244c6ad42  
to fix exception in Nutch webapp
dae62f8 is described below

commit dae62f8bc3fd041e71a0c43abbc6c5f7590bb88d
Author: Sebastian Nagel <snagel@apache.org>
AuthorDate: Mon Dec 18 17:41:58 2017 +0100

    NUTCH-2353 Create seed file with metadata using the REST API
    - reverse commits 0312bae38c9e95d496336dc24133b15ebefd4d3c
      and 7deb576bc58bb74725cbb6c5d82d7b9244c6ad42
      to fix exception in Nutch webapp
---
 src/java/org/apache/nutch/service/model/request/SeedUrl.java  |  8 --------
 src/java/org/apache/nutch/service/resources/SeedResource.java | 11 -----------
 src/java/org/apache/nutch/webui/model/SeedUrl.java            |  9 ---------
 3 files changed, 28 deletions(-)

diff --git a/src/java/org/apache/nutch/service/model/request/SeedUrl.java b/src/java/org/apache/nutch/service/model/request/SeedUrl.java
index 14b8e35..b1c93a8 100644
--- a/src/java/org/apache/nutch/service/model/request/SeedUrl.java
+++ b/src/java/org/apache/nutch/service/model/request/SeedUrl.java
@@ -17,8 +17,6 @@
 package org.apache.nutch.service.model.request;
 
 import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
 
 import com.fasterxml.jackson.annotation.JsonBackReference;
 import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -32,8 +30,6 @@ public class SeedUrl implements Serializable {
 
   private String url;
 
-  private Map<String, String> metadata = new HashMap<>();
-
   public SeedUrl() {}
 
   public SeedUrl(String url) {
@@ -56,10 +52,6 @@ public class SeedUrl implements Serializable {
     this.url = url;
   }
 
-  public Map<String,String> getMetadata() { return metadata; }
-
-  public void setMetadata(Map<String,String> metadata) { this.metadata = metadata;
}
-
   @JsonIgnore
   public SeedList getSeedList() {
     return seedList;
diff --git a/src/java/org/apache/nutch/service/resources/SeedResource.java b/src/java/org/apache/nutch/service/resources/SeedResource.java
index 180c033..e8a5be3 100644
--- a/src/java/org/apache/nutch/service/resources/SeedResource.java
+++ b/src/java/org/apache/nutch/service/resources/SeedResource.java
@@ -19,7 +19,6 @@ package org.apache.nutch.service.resources;
 import java.io.OutputStream;
 import java.lang.invoke.MethodHandles;
 import java.util.Collection;
-import java.util.Iterator;
 import java.util.Map;
 
 import javax.ws.rs.Consumes;
@@ -106,16 +105,6 @@ public class SeedResource extends AbstractResource {
     if (CollectionUtils.isNotEmpty(seedUrls)) {
       for (SeedUrl seedUrl : seedUrls) {
         os.write(seedUrl.getUrl().getBytes());
-
-        Map<String,String> metadata = seedUrl.getMetadata();
-        Iterator<String> keyIterator = metadata.keySet().iterator();
-
-        while (keyIterator.hasNext()) {
-          String key = keyIterator.next();
-
-          os.write(String.format("\t%s=%s", key, metadata.get(key)).getBytes());
-        }
-
         os.write("\n".getBytes());
       }
     }
diff --git a/src/java/org/apache/nutch/webui/model/SeedUrl.java b/src/java/org/apache/nutch/webui/model/SeedUrl.java
index 40b105b..5f89241 100644
--- a/src/java/org/apache/nutch/webui/model/SeedUrl.java
+++ b/src/java/org/apache/nutch/webui/model/SeedUrl.java
@@ -17,8 +17,6 @@
 package org.apache.nutch.webui.model;
 
 import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
 
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -45,9 +43,6 @@ public class SeedUrl implements Serializable {
   @Column
   private String url;
 
-  @Column
-  private Map<String, String> metadata = new HashMap<>();
-
   public Long getId() {
     return id;
   }
@@ -64,10 +59,6 @@ public class SeedUrl implements Serializable {
     this.url = url;
   }
 
-  public Map<String,String> getMetadata() { return metadata; }
-
-  public void setMetadata(Map<String,String> metadata) { this.metadata = metadata;
}
-
   @JsonIgnore
   public SeedList getSeedList() {
     return seedList;

-- 
To stop receiving notification emails like this one, please contact
['"commits@nutch.apache.org" <commits@nutch.apache.org>'].

Mime
View raw message