abdullah alamoudi has submitted this change and it was merged. Change subject: Enable Fully Qualified Class Names for Adapter Data Sources ......................................................................
Enable Fully Qualified Class Names for Adapter Data Sources Change-Id: I49953d4570b828b7cecb2ec926e017d008b13ddc Reviewed-on: https://asterix-gerrit.ics.uci.edu/837 Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Reviewed-by: Murtadha Hubail <hubail...@gmail.com> --- M asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/DatasourceFactoryProvider.java 1 file changed, 10 insertions(+), 2 deletions(-) Approvals: Murtadha Hubail: Looks good to me, approved Jenkins: Verified diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/DatasourceFactoryProvider.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/DatasourceFactoryProvider.java index 0f24f91..0954fca 100644 --- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/DatasourceFactoryProvider.java +++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/DatasourceFactoryProvider.java @@ -74,7 +74,11 @@ streamSourceFactory = new TwitterFirehoseStreamFactory(); break; default: - throw new AsterixException("unknown input stream factory"); + try { + streamSourceFactory = (IInputStreamFactory) Class.forName(streamSource).newInstance(); + } catch (Exception e) { + throw new AsterixException("unknown input stream factory: " + streamSource, e); + } } } return streamSourceFactory; @@ -109,7 +113,11 @@ case ExternalDataConstants.STREAM_SOCKET_CLIENT: return new StreamRecordReaderFactory(new SocketClientInputStreamFactory()); default: - throw new AsterixException("unknown record reader factory: " + reader); + try { + return (IRecordReaderFactory<?>) Class.forName(reader).newInstance(); + } catch (Exception e) { + throw new AsterixException("unknown record reader factory: " + reader, e); + } } } } -- To view, visit https://asterix-gerrit.ics.uci.edu/837 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49953d4570b828b7cecb2ec926e017d008b13ddc Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: abdullah alamoudi <bamou...@gmail.com> Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Murtadha Hubail <hubail...@gmail.com> Gerrit-Reviewer: abdullah alamoudi <bamou...@gmail.com>