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

[Enhancement] Bump FE/BE's hadoop to 3.4.0 #45312

Merged
merged 2 commits into from
May 16, 2024

Conversation

Smith-Cruise
Copy link
Contributor

@Smith-Cruise Smith-Cruise commented May 8, 2024

Why I'm doing:

For the CVE problem, we need to upgrade Hadoop SDK from 3.3.6 -> 3.4.0
It will introduce aws java SDK v2, so we can delete SDK v1.

What I'm doing:

Do it.

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

@Smith-Cruise Smith-Cruise requested review from a team as code owners May 8, 2024 12:10
hiveResourceUri.setResourceType(ResourceType.valueOf(catalogResourceUri.getResourceType()));
hiveResourceUri.setUri(catalogResourceUri.uri());
if (catalogResourceUri.resourceType() != null) {
hiveResourceUri.setResourceType(ResourceType.valueOf(catalogResourceUri.resourceType().toString()));
}
hiveResourceUriList.add(hiveResourceUri);
}
Copy link

Choose a reason for hiding this comment

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

How can I help you today?

}
catalogResourceUriList.add(catalogResourceUri);
catalogResourceUriList.add(catalogResourceUri.build());
}
return catalogResourceUriList;
}
Copy link

Choose a reason for hiding this comment

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

How can I assist you today?

@@ -1627,7 +1627,7 @@ public void renamePartitionInCatalog(String databaseName, String tableName, List
try {
PartitionInput partitionInput = GlueInputConverter.convertToPartitionInput(newPartition);
glueMetastore.updatePartition(databaseName, tableName, partitionValues, partitionInput);
} catch (AmazonServiceException e) {
} catch (SdkException e) {
throw CatalogToHiveConverter.wrapInHiveException(e);
}
}
Copy link

Choose a reason for hiding this comment

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

How can I help you today?

Copy link
Contributor

@imay imay left a comment

Choose a reason for hiding this comment

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

it seems to me that you just change the AWS client dependency, can you rename this PR's title?

<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bundle</artifactId>
<version>${awsv2.version}</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

exclude unused dependency

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hard do it, hadoop-aws will include bundle automatically.

@Smith-Cruise
Copy link
Contributor Author

it seems to me that you just change the AWS client dependency, can you rename this PR's title?

aws SDK v2 is introduced by hadoop-aws : 3.4.0

Because we upgraded Hadoop, we also upgraded aws.

@Smith-Cruise Smith-Cruise force-pushed the upgrade-s3-sdk branch 3 times, most recently from bf6a82e to 06b5f1d Compare May 10, 2024 05:55
@Smith-Cruise Smith-Cruise changed the title [Enhancement] Upgrace hadoop to 3.4.0 (FE part) [Enhancement] Upgrade FE/BE's hadoop to 3.4.0 May 10, 2024
@Smith-Cruise Smith-Cruise force-pushed the upgrade-s3-sdk branch 4 times, most recently from c63a45e to a5e4fc2 Compare May 13, 2024 03:31
@Smith-Cruise Smith-Cruise changed the title [Enhancement] Upgrade FE/BE's hadoop to 3.4.0 [Enhancement] Bump FE/BE's hadoop to 3.4.0 May 14, 2024
Copy link
Contributor

@stephen-shelby stephen-shelby left a comment

Choose a reason for hiding this comment

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

good job!

build.sh Outdated
@@ -519,6 +519,7 @@ if [ ${BUILD_BE} -eq 1 ]; then
cp -r -p ${STARROCKS_HOME}/java-extensions/iceberg-metadata-reader/target/iceberg-reader-lib ${STARROCKS_OUTPUT}/be/lib/
cp -r -p ${STARROCKS_HOME}/java-extensions/iceberg-metadata-reader/target/starrocks-iceberg-metadata-reader.jar ${STARROCKS_OUTPUT}/be/lib/jni-packages
cp -r -p ${STARROCKS_HOME}/java-extensions/iceberg-metadata-reader/target/starrocks-iceberg-metadata-reader.jar ${STARROCKS_OUTPUT}/be/lib/iceberg-reader-lib
cp -r -p ${STARROCKS_HOME}/java-extensions/jni-runtime/target/jni-runtime-lib ${STARROCKS_OUTPUT}/be/lib/
Copy link
Contributor

Choose a reason for hiding this comment

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

we have existed jni-package. I think it more appropriate to name it common-runtime-lib

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

<version>1.0-SNAPSHOT</version>
</parent>

<artifactId>jni-runtime</artifactId>
Copy link
Contributor

Choose a reason for hiding this comment

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

common-runtime

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

// The UrlConnectionHttpClient is introduced by #16602, and it causes the exception.
// So we set the default HTTP client to UrlConnectionHttpClient.
// TODO: remove this after we remove ApacheHttpClient
private static void setAWSHttpClient() {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove it in the iceberg_metadata_reader

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

Signed-off-by: Smith Cruise <chendingchao1@126.com>
Signed-off-by: Smith Cruise <chendingchao1@126.com>
Copy link

Copy link

[FE Incremental Coverage Report]

fail : 112 / 496 (22.58%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/connector/hive/glue/converters/HiveToCatalogConverter.java 0 76 00.00% [41, 42, 43, 44, 45, 46, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 90, 91, 92, 93, 95, 100, 112, 113, 114, 115, 117, 125, 126, 127, 128, 130, 135, 136, 137, 139, 146, 156, 158, 159, 160, 161, 162, 163, 164, 166, 211, 212, 213, 214, 215, 217, 219, 220, 228, 231, 232, 234, 236]
🔵 com/starrocks/connector/hive/glue/metastore/AWSGlueMetastoreCacheDecorator.java 0 3 00.00% [221, 241, 242]
🔵 com/starrocks/connector/hive/glue/util/PartitionKey.java 0 1 00.00% [29]
🔵 com/starrocks/connector/hive/glue/converters/GlueInputConverter.java 0 32 00.00% [42, 44, 45, 46, 47, 49, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 78, 80, 81, 82, 83, 85, 92, 99, 101, 102, 103, 105, 107, 108]
🔵 com/starrocks/connector/hive/glue/metastore/GlueMetastoreClientDelegate.java 0 36 00.00% [175, 193, 215, 221, 238, 271, 295, 317, 342, 359, 375, 378, 400, 446, 486, 755, 762, 796, 828, 860, 935, 1086, 1105, 1444, 1470, 1473, 1496, 1521, 1548, 1573, 1574, 1598, 1599, 1600, 1603, 1630]
🔵 com/starrocks/connector/hive/glue/util/BatchCreatePartitionsHelper.java 0 4 00.00% [95, 97, 122, 129]
🔵 com/starrocks/connector/hive/glue/util/BatchDeletePartitionsHelper.java 0 14 00.00% [60, 61, 62, 65, 84, 93, 94, 111, 112, 113, 114, 115, 118, 119]
🔵 com/starrocks/credential/provider/AssumedRoleCredentialProvider.java 0 28 00.00% [140, 142, 151, 152, 155, 157, 159, 164, 165, 167, 168, 169, 174, 177, 178, 180, 186, 189, 190, 191, 199, 212, 214, 223, 224, 235, 240, 244]
🔵 com/starrocks/connector/hive/glue/util/PartitionUtils.java 0 1 00.00% [41]
🔵 com/starrocks/connector/hive/glue/metastore/DefaultAWSGlueMetastore.java 34 153 22.22% [167, 168, 169, 185, 187, 188, 189, 196, 197, 198, 203, 205, 212, 213, 214, 230, 231, 232, 233, 234, 241, 242, 243, 249, 250, 251, 258, 259, 260, 261, 262, 263, 272, 275, 276, 277, 278, 279, 280, 283, 290, 291, 294, 324, 325, 326, 355, 369, 370, 371, 372, 373, 374, 375, 376, 377, 384, 392, 393, 394, 395, 400, 401, 402, 403, 404, 405, 412, 413, 414, 415, 423, 424, 425, 430, 431, 432, 441, 442, 443, 444, 445, 446, 454, 455, 456, 462, 463, 464, 465, 494, 515, 516, 517, 518, 519, 520, 527, 529, 530, 535, 551, 554, 555, 559, 562, 563, 582, 583, 584, 585, 586, 587, 588, 595, 596, 597, 598, 599]
🔵 com/starrocks/sql/analyzer/StorageAccessException.java 1 4 25.00% [39, 40, 41]
🔵 com/starrocks/credential/aws/AWSCloudCredential.java 11 38 28.95% [149, 160, 163, 167, 168, 169, 170, 171, 174, 175, 176, 177, 185, 187, 190, 191, 196, 198, 353, 355, 356, 357, 358, 359, 360, 363, 364]
🔵 com/starrocks/connector/hive/glue/AWSCatalogMetastoreClient.java 2 4 50.00% [201, 204]
🔵 com/starrocks/connector/hive/glue/converters/CatalogToHiveConverter.java 43 73 58.90% [107, 195, 196, 197, 198, 224, 225, 269, 271, 276, 283, 285, 290, 301, 309, 317, 335, 394, 396, 398, 410, 411, 413, 415, 416, 417, 427, 429, 430, 431]
🔵 com/starrocks/connector/hive/glue/util/HiveTableValidator.java 9 14 64.29% [44, 53, 54, 55, 87]
🔵 com/starrocks/connector/hive/glue/metastore/AWSGlueClientFactory.java 5 7 71.43% [53, 58]
🔵 com/starrocks/fs/hdfs/HdfsFsManager.java 3 4 75.00% [75]
🔵 com/starrocks/connector/hive/glue/metastore/AWSGlueMetastoreFactory.java 1 1 100.00% []
🔵 com/starrocks/connector/iceberg/IcebergMetadata.java 3 3 100.00% []

Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

@imay imay merged commit 0fcf3d7 into StarRocks:main May 16, 2024
48 of 50 checks passed
@Smith-Cruise Smith-Cruise deleted the upgrade-s3-sdk branch May 16, 2024 06:50
@Smith-Cruise
Copy link
Contributor Author

@mergify backport branch-3.3

Copy link
Contributor

mergify bot commented May 16, 2024

backport branch-3.3

✅ Backports have been created

@github-actions github-actions bot added the 3.3 label May 16, 2024
mergify bot pushed a commit that referenced this pull request May 16, 2024
Why I'm doing:
For the CVE problem, we need to upgrade Hadoop SDK from 3.3.6 -> 3.4.0
It will introduce aws java SDK v2, so we can delete SDK v1.

Signed-off-by: Smith Cruise <chendingchao1@126.com>
(cherry picked from commit 0fcf3d7)
wanpengfei-git pushed a commit that referenced this pull request May 16, 2024
Co-authored-by: Smith Cruise <chendingchao1@126.com>
node pushed a commit to vivo/starrocks that referenced this pull request May 17, 2024
Why I'm doing:
For the CVE problem, we need to upgrade Hadoop SDK from 3.3.6 -> 3.4.0
It will introduce aws java SDK v2, so we can delete SDK v1.

Signed-off-by: Smith Cruise <chendingchao1@126.com>
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.

4 participants