Skip to content
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

Merged
merged 5 commits into from
Jul 19, 2024

Conversation

clintropolis
Copy link
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
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).

docs/development/overview.md Outdated Show resolved Hide resolved
docs/development/overview.md Outdated Show resolved Hide resolved
docs/operations/migrate-from-firehose-ingestion.md Outdated Show resolved Hide resolved
@JsonInclude(Include.NON_NULL)
@Deprecated
public FirehoseFactory getFirehoseFactory()
public IndexIOConfig(@Nullable Boolean appendToExisting, @Nullable Boolean dropExisting)
Copy link
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
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

@@ -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
Copy link
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
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
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
Member Author

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
Copy link
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
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
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 Note

Variable 'List sqls' is never read.
@clintropolis clintropolis merged commit a34a06e into apache:master Jul 19, 2024
89 checks passed
@clintropolis clintropolis deleted the remove-more-realtime-stuff branch July 19, 2024 21:37
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.

None yet

2 participants