asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject asterixdb git commit: [ASTERIXDB-1989] Move to com.rometools version of Rome
Date Thu, 20 Jul 2017 02:34:02 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 67ffd4c12 -> 7d68c6707


[ASTERIXDB-1989] Move to com.rometools version of Rome

Change-Id: Ia8dd896f6abe34532f2cce70a4fc7632d7a21910
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1886
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Ian Maxon <imaxon@apache.org>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/7d68c670
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/7d68c670
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/7d68c670

Branch: refs/heads/master
Commit: 7d68c6707ffa573ff9fb0781a76069ce9d78afc8
Parents: 67ffd4c
Author: Till Westmann <tillw@apache.org>
Authored: Wed Jul 19 11:14:12 2017 -0700
Committer: Till Westmann <tillw@apache.org>
Committed: Wed Jul 19 19:33:35 2017 -0700

----------------------------------------------------------------------
 asterixdb/asterix-common/pom.xml                |  1 -
 .../asterix/test/server/RSSFeedServlet.java     |  1 -
 asterixdb/asterix-external-data/pom.xml         | 24 ++----------
 .../record/reader/rss/RSSRecordReader.java      | 40 ++++++++++----------
 .../reader/rss/RSSRecordReaderFactory.java      | 10 ++---
 .../asterix/external/parser/RSSParser.java      | 11 +++---
 .../parser/factory/RSSParserFactory.java        | 10 ++---
 asterixdb/pom.xml                               | 10 +++++
 8 files changed, 49 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7d68c670/asterixdb/asterix-common/pom.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/pom.xml b/asterixdb/asterix-common/pom.xml
index 951ad7d..6e79f40 100644
--- a/asterixdb/asterix-common/pom.xml
+++ b/asterixdb/asterix-common/pom.xml
@@ -250,7 +250,6 @@
     <dependency>
       <groupId>com.rometools</groupId>
       <artifactId>rome</artifactId>
-      <version>1.5.1</version>
       <scope>test</scope>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7d68c670/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/server/RSSFeedServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/server/RSSFeedServlet.java
b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/server/RSSFeedServlet.java
index f79f5e9..2ebed83 100644
--- a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/server/RSSFeedServlet.java
+++ b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/server/RSSFeedServlet.java
@@ -42,7 +42,6 @@ import com.rometools.rome.feed.synd.SyndFeedImpl;
 import com.rometools.rome.io.FeedException;
 import com.rometools.rome.io.SyndFeedOutput;
 
-import io.netty.handler.codec.http.HttpMethod;
 import io.netty.handler.codec.http.HttpResponseStatus;
 
 public class RSSFeedServlet extends AbstractServlet {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7d68c670/asterixdb/asterix-external-data/pom.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/pom.xml b/asterixdb/asterix-external-data/pom.xml
index 460f57d..f770889 100644
--- a/asterixdb/asterix-external-data/pom.xml
+++ b/asterixdb/asterix-external-data/pom.xml
@@ -270,28 +270,12 @@
       <scope>provided</scope>
     </dependency>
     <dependency>
-      <groupId>net.java.dev.rome</groupId>
+      <groupId>com.rometools</groupId>
       <artifactId>rome-fetcher</artifactId>
-      <version>1.0.0</version>
-      <exclusions>
-        <exclusion>
-          <artifactId>rome</artifactId>
-          <groupId>net.java.dev.rome</groupId>
-        </exclusion>
-        <exclusion>
-          <groupId>commons-logging</groupId>
-          <artifactId>commons-logging</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>xerces</groupId>
-          <artifactId>xercesImpl</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>rome</groupId>
+    </dependency>
+    <dependency>
+      <groupId>com.rometools</groupId>
       <artifactId>rome</artifactId>
-      <version>1.0.1-modified-01</version>
     </dependency>
     <dependency>
       <groupId>org.apache.hive</groupId>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7d68c670/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/rss/RSSRecordReader.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/rss/RSSRecordReader.java
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/rss/RSSRecordReader.java
index 5760a7a..44da608 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/rss/RSSRecordReader.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/rss/RSSRecordReader.java
@@ -32,27 +32,27 @@ import org.apache.asterix.external.input.record.GenericRecord;
 import org.apache.asterix.external.util.FeedLogManager;
 import org.apache.log4j.Logger;
 
-import com.sun.syndication.feed.synd.SyndEntryImpl;
-import com.sun.syndication.feed.synd.SyndFeed;
-import com.sun.syndication.fetcher.FeedFetcher;
-import com.sun.syndication.fetcher.FetcherEvent;
-import com.sun.syndication.fetcher.FetcherException;
-import com.sun.syndication.fetcher.FetcherListener;
-import com.sun.syndication.fetcher.impl.FeedFetcherCache;
-import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache;
-import com.sun.syndication.fetcher.impl.HttpURLFeedFetcher;
-import com.sun.syndication.io.FeedException;
-
-public class RSSRecordReader implements IRecordReader<SyndEntryImpl> {
+import com.rometools.fetcher.FeedFetcher;
+import com.rometools.fetcher.FetcherEvent;
+import com.rometools.fetcher.FetcherException;
+import com.rometools.fetcher.FetcherListener;
+import com.rometools.fetcher.impl.FeedFetcherCache;
+import com.rometools.fetcher.impl.HashMapFeedInfoCache;
+import com.rometools.fetcher.impl.HttpURLFeedFetcher;
+import com.rometools.rome.feed.synd.SyndEntry;
+import com.rometools.rome.feed.synd.SyndFeed;
+import com.rometools.rome.io.FeedException;
+
+public class RSSRecordReader implements IRecordReader<SyndEntry> {
 
     private static final Logger LOGGER = Logger.getLogger(RSSRecordReader.class.getName());
     private boolean modified = false;
-    private Queue<SyndEntryImpl> rssFeedBuffer = new LinkedList<SyndEntryImpl>();
+    private Queue<SyndEntry> rssFeedBuffer = new LinkedList<>();
     private FeedFetcherCache feedInfoCache;
     private FeedFetcher fetcher;
     private FetcherEventListenerImpl listener;
     private URL feedUrl;
-    private GenericRecord<SyndEntryImpl> record = new GenericRecord<SyndEntryImpl>();
+    private GenericRecord<SyndEntry> record = new GenericRecord<>();
     private boolean done = false;
 
     public RSSRecordReader(String url) throws MalformedURLException {
@@ -78,12 +78,12 @@ public class RSSRecordReader implements IRecordReader<SyndEntryImpl>
{
     }
 
     @Override
-    public IRawRecord<SyndEntryImpl> next() throws IOException {
+    public IRawRecord<SyndEntry> next() throws IOException {
         if (done) {
             return null;
         }
         try {
-            SyndEntryImpl feedEntry;
+            SyndEntry feedEntry;
             feedEntry = getNextRSSFeed();
             if (feedEntry == null) {
                 return null;
@@ -105,7 +105,7 @@ public class RSSRecordReader implements IRecordReader<SyndEntryImpl>
{
         this.modified = modified;
     }
 
-    private SyndEntryImpl getNextRSSFeed() throws Exception {
+    private SyndEntry getNextRSSFeed() throws IOException, FeedException, FetcherException
 {
         if (rssFeedBuffer.isEmpty()) {
             fetchFeed();
         }
@@ -117,7 +117,7 @@ public class RSSRecordReader implements IRecordReader<SyndEntryImpl>
{
     }
 
     @SuppressWarnings("unchecked")
-    private void fetchFeed() throws IllegalArgumentException, IOException, FeedException,
FetcherException {
+    private void fetchFeed() throws IOException, FeedException, FetcherException {
         // Retrieve the feed.
         // We will get a Feed Polled Event and then a
         // Feed Retrieved event (assuming the feed is valid)
@@ -128,7 +128,7 @@ public class RSSRecordReader implements IRecordReader<SyndEntryImpl>
{
                 LOGGER.info(feedUrl + " has a title: " + feed.getTitle() + " and contains
" + feed.getEntries().size()
                         + " entries.");
             }
-            List<? extends SyndEntryImpl> fetchedFeeds = feed.getEntries();
+            List<SyndEntry> fetchedFeeds = feed.getEntries();
             rssFeedBuffer.addAll(fetchedFeeds);
         }
     }
@@ -158,7 +158,7 @@ class FetcherEventListenerImpl implements FetcherListener {
     }
 
     /**
-     * @see com.sun.syndication.fetcher.FetcherListener#fetcherEvent(com.sun.syndication.fetcher.FetcherEvent)
+     * @see com.rometools.fetcher.FetcherListener#fetcherEvent(com.rometools.fetcher.FetcherEvent)
      */
     @Override
     public void fetcherEvent(FetcherEvent event) {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7d68c670/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/rss/RSSRecordReaderFactory.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/rss/RSSRecordReaderFactory.java
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/rss/RSSRecordReaderFactory.java
index 831dbc3..af4be91 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/rss/RSSRecordReaderFactory.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/rss/RSSRecordReaderFactory.java
@@ -36,9 +36,9 @@ import org.apache.hyracks.api.application.IServiceContext;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 
-import com.sun.syndication.feed.synd.SyndEntryImpl;
+import com.rometools.rome.feed.synd.SyndEntry;
 
-public class RSSRecordReaderFactory implements IRecordReaderFactory<SyndEntryImpl>
{
+public class RSSRecordReaderFactory implements IRecordReaderFactory<SyndEntry> {
 
     private static final long serialVersionUID = 1L;
     private final List<String> urls = new ArrayList<>();
@@ -88,7 +88,7 @@ public class RSSRecordReaderFactory implements IRecordReaderFactory<SyndEntryImp
     }
 
     @Override
-    public IRecordReader<? extends SyndEntryImpl> createRecordReader(IHyracksTaskContext
ctx, int partition)
+    public IRecordReader<? extends SyndEntry> createRecordReader(IHyracksTaskContext
ctx, int partition)
             throws HyracksDataException {
         try {
             return new RSSRecordReader(urls.get(partition));
@@ -98,8 +98,8 @@ public class RSSRecordReaderFactory implements IRecordReaderFactory<SyndEntryImp
     }
 
     @Override
-    public Class<? extends SyndEntryImpl> getRecordClass() {
-        return SyndEntryImpl.class;
+    public Class<? extends SyndEntry> getRecordClass() {
+        return SyndEntry.class;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7d68c670/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RSSParser.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RSSParser.java
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RSSParser.java
index c2d6be8..b6c2221 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RSSParser.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RSSParser.java
@@ -19,7 +19,6 @@
 package org.apache.asterix.external.parser;
 
 import java.io.DataOutput;
-import java.io.IOException;
 
 import org.apache.asterix.builders.RecordBuilder;
 import org.apache.asterix.external.api.IDataParser;
@@ -28,11 +27,11 @@ import org.apache.asterix.external.api.IRecordDataParser;
 import org.apache.asterix.om.base.AMutableRecord;
 import org.apache.asterix.om.base.AMutableString;
 import org.apache.asterix.om.types.ARecordType;
-
-import com.sun.syndication.feed.synd.SyndEntryImpl;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 
-public class RSSParser implements IRecordDataParser<SyndEntryImpl> {
+import com.rometools.rome.feed.synd.SyndEntry;
+
+public class RSSParser implements IRecordDataParser<SyndEntry> {
     private long id = 0;
     private String idPrefix;
     private AMutableString[] mutableFields;
@@ -50,8 +49,8 @@ public class RSSParser implements IRecordDataParser<SyndEntryImpl>
{
     }
 
     @Override
-    public void parse(IRawRecord<? extends SyndEntryImpl> record, DataOutput out) throws
HyracksDataException {
-        SyndEntryImpl entry = record.get();
+    public void parse(IRawRecord<? extends SyndEntry> record, DataOutput out) throws
HyracksDataException {
+        SyndEntry entry = record.get();
         tupleFieldValues[0] = idPrefix + ":" + id;
         tupleFieldValues[1] = entry.getTitle();
         tupleFieldValues[2] = entry.getDescription().getValue();

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7d68c670/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/RSSParserFactory.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/RSSParserFactory.java
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/RSSParserFactory.java
index 7f0d006..a1d2298 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/RSSParserFactory.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/RSSParserFactory.java
@@ -29,9 +29,9 @@ import org.apache.asterix.external.parser.RSSParser;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 
-import com.sun.syndication.feed.synd.SyndEntryImpl;
+import com.rometools.rome.feed.synd.SyndEntry;
 
-public class RSSParserFactory implements IRecordDataParserFactory<SyndEntryImpl> {
+public class RSSParserFactory implements IRecordDataParserFactory<SyndEntry> {
 
     private static final long serialVersionUID = 1L;
     private static final List<String> parserFormats = Collections.unmodifiableList(Arrays.asList("rss"));
@@ -48,14 +48,14 @@ public class RSSParserFactory implements IRecordDataParserFactory<SyndEntryImpl>
     }
 
     @Override
-    public IRecordDataParser<SyndEntryImpl> createRecordParser(IHyracksTaskContext
ctx) {
+    public IRecordDataParser<SyndEntry> createRecordParser(IHyracksTaskContext ctx)
{
         RSSParser dataParser = new RSSParser(recordType);
         return dataParser;
     }
 
     @Override
-    public Class<? extends SyndEntryImpl> getRecordClass() {
-        return SyndEntryImpl.class;
+    public Class<? extends SyndEntry> getRecordClass() {
+        return SyndEntry.class;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7d68c670/asterixdb/pom.xml
----------------------------------------------------------------------
diff --git a/asterixdb/pom.xml b/asterixdb/pom.xml
index dd86bea..0e8617e 100644
--- a/asterixdb/pom.xml
+++ b/asterixdb/pom.xml
@@ -1052,6 +1052,16 @@
         <version>18.0</version>
       </dependency>
       <dependency>
+        <groupId>com.rometools</groupId>
+        <artifactId>rome-fetcher</artifactId>
+        <version>1.7.4</version>
+      </dependency>
+      <dependency>
+        <groupId>com.rometools</groupId>
+        <artifactId>rome</artifactId>
+        <version>1.7.4</version>
+      </dependency>
+      <dependency>
         <groupId>log4j</groupId>
         <artifactId>log4j</artifactId>
         <version>1.2.17</version>


Mime
View raw message