asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject incubator-asterixdb git commit: Add compatibility for Socket adapter
Date Mon, 15 Feb 2016 13:33:40 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master a516390aa -> aa9879fb0


Add compatibility for Socket adapter

This change allows the use of alias for socket adapter

Change-Id: I8c8c78598c0cfea36c18503a73b002ece700be71
Reviewed-on: https://asterix-gerrit.ics.uci.edu/609
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: abdullah alamoudi <bamousaa@gmail.com>


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

Branch: refs/heads/master
Commit: aa9879fb06d5a1e634a90cf98cf20073bfa88b42
Parents: a516390
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Mon Feb 15 16:14:33 2016 +0300
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Mon Feb 15 05:28:33 2016 -0800

----------------------------------------------------------------------
 .../external/util/ExternalDataCompatibilityUtils.java       | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/aa9879fb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataCompatibilityUtils.java
----------------------------------------------------------------------
diff --git a/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataCompatibilityUtils.java
b/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataCompatibilityUtils.java
index 4e6401a..7bfe698 100644
--- a/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataCompatibilityUtils.java
+++ b/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataCompatibilityUtils.java
@@ -78,6 +78,15 @@ public class ExternalDataCompatibilityUtils {
             configuration.put(ExternalDataConstants.KEY_READER_STREAM, ExternalDataConstants.ALIAS_LOCALFS_ADAPTER);
         }
 
+        // Socket
+        if (adapterName.equalsIgnoreCase(ExternalDataConstants.ALIAS_SOCKET_ADAPTER)) {
+            if (configuration.get(ExternalDataConstants.KEY_FORMAT) == null) {
+                throw new AsterixException("Unspecified format parameter for socket adapter");
+            }
+            configuration.put(ExternalDataConstants.KEY_READER, configuration.get(ExternalDataConstants.KEY_FORMAT));
+            configuration.put(ExternalDataConstants.KEY_READER_STREAM, ExternalDataConstants.STREAM_SOCKET);
+        }
+
         // Twitter (Pull)
         if (adapterName.equals(ExternalDataConstants.ALIAS_TWITTER_PULL_ADAPTER)) {
             configuration.put(ExternalDataConstants.KEY_READER, ExternalDataConstants.READER_TWITTER_PULL);


Mime
View raw message