Skip to content

Remove HiveConfig from Iceberg module#12506

Merged
findepi merged 2 commits intotrinodb:masterfrom
homar:homar/remove_hiveconfig_from_iceberg_module
May 28, 2022
Merged

Remove HiveConfig from Iceberg module#12506
findepi merged 2 commits intotrinodb:masterfrom
homar:homar/remove_hiveconfig_from_iceberg_module

Conversation

@homar
Copy link
Copy Markdown
Member

@homar homar commented May 22, 2022

Description

Related issues, pull requests, and links

Documentation

( ) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

( ) No release notes entries required.
( ) Release notes entries required with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label May 22, 2022
@homar homar force-pushed the homar/remove_hiveconfig_from_iceberg_module branch from ba87988 to fbcc078 Compare May 22, 2022 10:55
@homar homar force-pushed the homar/remove_hiveconfig_from_iceberg_module branch from fbcc078 to 4e2b9c2 Compare May 22, 2022 12:48
@homar homar changed the title [WIP} Remove HiveConfig from Iceberg module [WIP] Remove HiveConfig from Iceberg module May 23, 2022
@homar homar marked this pull request as ready for review May 23, 2022 11:52
@homar homar changed the title [WIP] Remove HiveConfig from Iceberg module Remove HiveConfig from Iceberg module May 23, 2022
@homar homar requested review from alexjo2144, ebyhr, findepi and findinpath and removed request for findepi May 23, 2022 11:53
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's not metastore-related. isTranslateHiveViews is used in HiveMetadata.

What would happen if you move this back to HiveConfig?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess this use-place is the reason why you moved the config from HiveConfig to metastoreConfig.

However, we don't need this configurable in iceberg. There is no concept of "hive views" in Iceberg.

  • we may be able to solve this using a technique like @MaxDomainCompactionThreshold
  • add a TestIcebergPlugin test that configuring connector with hive.hive-views.enabled fails

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.

Ok my bad, I was pretty sure iceberg needs this. Thanks

@homar homar force-pushed the homar/remove_hiveconfig_from_iceberg_module branch from 4e2b9c2 to a004720 Compare May 25, 2022 08:24
@findinpath
Copy link
Copy Markdown
Contributor

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.9.0:compile (default-compile) on project trino-hive: Compilation failure
[ERROR] /Users/marius/Development/starburst/trino/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetadataFactory.java:[110,27] cannot find symbol
[ERROR]   symbol:   method isTranslateHiveViews()
[ERROR]   location: variable hiveConfig of type io.trino.plugin.hive.HiveConfig

build is failing locally.

Do note that the branch has conflicts with master and probably this is why the maven checks tasks were not triggered.

@homar homar force-pushed the homar/remove_hiveconfig_from_iceberg_module branch 2 times, most recently from df9d6b6 to 5f1dab8 Compare May 25, 2022 12:28
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like extension point, but Delta doesn't need to create extension points. At best, Hive would do this.

what about

binder.bind(Key.get(boolean.class, TranslateHiveViews.class)).toInstance(false);

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.

oh ok, I see now. thanks

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.

tough I guess it is not needed for delta lake as there is still hive config there

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why removed?

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.

because I didn't understand the idea...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why Optional? it's always either true or false

Suggested change
@TranslateHiveViews Optional<Boolean> translateHiveViews)
@TranslateHiveViews boolean translateHiveViews)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

also, this class takes HiveConfig hiveConfig, so if the fields goes back there (as it should), remove the new paramater.

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.

yep I 've got it now

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why Optional? it's always either true or false

Suggested change
@TranslateHiveViews Optional<Boolean> translateHiveViews,
@TranslateHiveViews boolean translateHiveViews)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Define a constant so that the test always uses a correct config property name

@homar homar force-pushed the homar/remove_hiveconfig_from_iceberg_module branch 2 times, most recently from d42c963 to 358abb3 Compare May 26, 2022 14:27
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If this is Thrift specific, it can go in IcebergHiveMetastoreCatalogModule

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i see thjis added to IcebergHiveMetastoreCatalogModule.java but not removed here

@homar homar force-pushed the homar/remove_hiveconfig_from_iceberg_module branch from 358abb3 to f58e8b1 Compare May 26, 2022 15:56
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

use current code default

new HiveConfig().isTranslateHiveViews()

see #12343 (comment)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

new HiveConfig().isTranslateHiveViews()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

new HiveConfig().isTranslateHiveViews()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

new HiveConfig().isTranslateHiveViews()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

new HiveConfig().isTranslateHiveViews()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i see thjis added to IcebergHiveMetastoreCatalogModule.java but not removed here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The constant has value only if used in @Config annotation value of the io.trino.plugin.hive.HiveConfig#setTranslateHiveViews method.

@homar homar force-pushed the homar/remove_hiveconfig_from_iceberg_module branch from f58e8b1 to b11f77f Compare May 27, 2022 13:32
@findepi
Copy link
Copy Markdown
Member

findepi commented May 27, 2022

CI #11848

@findepi findepi added the no-release-notes This pull request does not require release notes entry label May 28, 2022
@findepi findepi merged commit cf29082 into trinodb:master May 28, 2022
@github-actions github-actions bot added this to the 383 milestone May 28, 2022
}

@LegacyConfig("hive.target-max-file-size")
@Config("iceberg.target-max-file-size")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we're changing config properties, we should also document this change. @homar can you submit a follow-up PR with docs changes, or would you like me to take the lead on that?

cc @findepi

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.

I will submit a pr. Thanks for pointing it out

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.

@colebow I made a PR #12619

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed no-release-notes This pull request does not require release notes entry

Development

Successfully merging this pull request may close these issues.

5 participants