Skip to content

remove Firehose and FirehoseFactory#16758

Merged
clintropolis merged 5 commits intoapache:masterfrom
clintropolis:remove-more-realtime-stuff
Jul 19, 2024
Merged

remove Firehose and FirehoseFactory#16758
clintropolis merged 5 commits intoapache:masterfrom
clintropolis:remove-more-realtime-stuff

Conversation

@clintropolis
Copy link
Copy Markdown
Member

Mostly #16652 but without renaming Sink and FireHydrant.

changes:

  • removed Firehose and FirehoseFactory and remaining implementations which were mostly no longer used after Remove index_realtime and index_realtime_appenderator tasks #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

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
Copy link
Copy Markdown
Contributor

@kfaraz kfaraz left a 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).

Comment thread docs/development/overview.md Outdated
Comment thread docs/development/overview.md Outdated
Comment thread docs/operations/migrate-from-firehose-ingestion.md Outdated
@JsonInclude(Include.NON_NULL)
@Deprecated
public FirehoseFactory getFirehoseFactory()
public IndexIOConfig(@Nullable Boolean appendToExisting, @Nullable Boolean dropExisting)
Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, removed

* {@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
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member Author

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

Comment on lines +50 to +56
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)
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

}
}

public static class SegmentReader implements Closeable
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

public void testConnectorValidationInvalidUri()
{
derbyConnector = derbyConnectorRule.getConnector();
final List<String> sqls = SqlTestUtils.selectFrom(TABLE_1, TABLE_2);

Check notice

Code scanning / CodeQL

Unread local variable

Variable 'List<String> sqls' is never read.
@clintropolis clintropolis merged commit a34a06e into apache:master Jul 19, 2024
@clintropolis clintropolis deleted the remove-more-realtime-stuff branch July 19, 2024 21:37
sreemanamala pushed a commit to sreemanamala/druid that referenced this pull request Aug 6, 2024
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
@kfaraz kfaraz added this to the 31.0.0 milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants