henrybear327 commented on code in PR #10759:
URL: https://github.com/apache/ozone/pull/10759#discussion_r3723204789
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/local/LocalOzoneCluster.java:
##########
@@ -477,16 +553,39 @@ private void configureOmStorage(OzoneConfiguration conf)
throws IOException {
omMetadataDir.toString());
}
- private List<OzoneConfiguration> configureDatanodes(OzoneConfiguration conf,
+ private int configureS3Gateway(OzoneConfiguration conf,
PersistedPortState persistedPorts, PortAllocator portAllocator)
throws IOException {
- int datanodeCount = config.getDatanodes();
- if (datanodeCount > MAX_DATANODES) {
- throw new IOException("Datanode count " + datanodeCount
- + " exceeds the local maximum of " + MAX_DATANODES
- + "; each datanode reserves " + DATANODE_PORT_KEY_SUFFIXES.length
- + " local ports.");
+ if (!config.isS3gEnabled()) {
+ return -1;
}
+ int s3gHttpPort = reservePort(portAllocator, persistedPorts,
+ S3G_HTTP_PORT_KEY, config.getS3gPort());
+ int s3gHttpsPort = reservePort(portAllocator, persistedPorts,
+ S3G_HTTPS_PORT_KEY, 0);
+ int s3gWebHttpPort = reservePort(portAllocator, persistedPorts,
+ S3G_WEBADMIN_HTTP_PORT_KEY, 0);
+ int s3gWebHttpsPort = reservePort(portAllocator, persistedPorts,
+ S3G_WEBADMIN_HTTPS_PORT_KEY, 0);
+
+ conf.set(OZONE_S3G_HTTP_ADDRESS_KEY,
+ address(config.getHost(), s3gHttpPort));
+ conf.set(OZONE_S3G_HTTP_BIND_HOST_KEY, config.getBindHost());
Review Comment:
Attempted the implementation. Can you see if this is what you are expecting?
Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]