-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove Firehose and FirehoseFactory #16758
remove Firehose and FirehoseFactory #16758
Conversation
changes: * removed `Firehose` and `FirehoseFactory` and remaining implementations which were mostly no longer used after apache#16602 * Moved `IngestSegmentFirehose` which was still used internally by Hadoop ingestion to `DatasourceRecordReader.SegmentReader` * Rename `SQLFirehoseFactoryDatabaseConnector` to `SQLInputSourceDatabaseConnector` and similar renames for sub-classes * Moved anything remaining in a 'firehose' package somewhere else * Clean up docs on firehose stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @clintropolis !
I have left some minor suggestions, none of which are blockers for this PR.
With the exception of the renamed SegmentReader
class, all the changes look good to me (I still need to go through SegmentReader
).
@JsonInclude(Include.NON_NULL) | ||
@Deprecated | ||
public FirehoseFactory getFirehoseFactory() | ||
public IndexIOConfig(@Nullable Boolean appendToExisting, @Nullable Boolean dropExisting) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this constructor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, removed
@@ -152,8 +152,7 @@ default int getPriority() | |||
* the task does not use any. Users can be given permission to access particular types of | |||
* input sources but not others, using the | |||
* {@link org.apache.druid.server.security.AuthConfig#enableInputSourceSecurity} config. | |||
* @throws UnsupportedOperationException if the given task type does not suppoert input source based security. Such | |||
* would be the case, if the task uses firehose. | |||
* @throws UnsupportedOperationException if the given task type does not suppoert input source based security |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess now it will never throw this exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default implementation still throws that exception, so i suppose if something doesn't implement this method it would happen
public ParallelIndexIOConfig(@Nullable Boolean appendToExisting) | ||
{ | ||
this(firehoseFactory, null, null, appendToExisting, null); | ||
this(null, null, appendToExisting, null); | ||
} | ||
|
||
@Deprecated | ||
public ParallelIndexIOConfig(FirehoseFactory firehoseFactory, @Nullable Boolean appendToExisting, boolean dropExisting) | ||
public ParallelIndexIOConfig(@Nullable Boolean appendToExisting, boolean dropExisting) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can completely remove these constructors now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@@ -163,4 +189,157 @@ public void close() throws IOException | |||
FileUtils.deleteDirectory(dir); | |||
} | |||
} | |||
|
|||
public static class SegmentReader implements Closeable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be easier to review this if we leave this class in a separate file and just rename IngestSegmentFirehose
to SegmentReader
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left this as an internal class btw because its only used internally to DatasourceRecordReader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Mostly #16652 but without renaming
Sink
andFireHydrant
.changes:
Firehose
andFirehoseFactory
and remaining implementations which were mostly no longer used after Remove index_realtime and index_realtime_appenderator tasks #16602IngestSegmentFirehose
which was still used internally by Hadoop ingestion toDatasourceRecordReader.SegmentReader
SQLFirehoseFactoryDatabaseConnector
toSQLInputSourceDatabaseConnector
and similar renames for sub-classes