Github user arunmahadevan commented on a diff in the pull request:
https://github.com/apache/storm/pull/1942#discussion_r101698782
--- Diff:
external/storm-hdfs/src/main/java/org/apache/storm/hdfs/spout/HDFSSpout.java ---
@@ -722,19 +703,10 @@ private FileReader createFileReader(Path file)
*/
private FileReader createFileReader(Path file, String offset)
throws IOException {
- if ( readerType.equalsIgnoreCase(Configs.SEQ) ) {
- return new SequenceFileReader(this.hdfs, file, conf, offset);
- }
- if ( readerType.equalsIgnoreCase(Configs.TEXT) ) {
- return new TextFileReader(this.hdfs, file, conf, offset);
- }
-
try {
- Class<?> clsType = Class.forName(readerType);
- Constructor<?> constructor =
clsType.getConstructor(FileSystem.class, Path.class, Map.class, String.class);
+ Constructor<?> constructor =
readerType.getConstructor(FileSystem.class, Path.class, Map.class,
String.class);
--- End diff --
Not sure what you mean by "get rid of specific implementations". I see that
you are mainly cleaning up and refactoring the code and so its better if you do
it with this patch.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---