-
Notifications
You must be signed in to change notification settings - Fork 379
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
[#2730] Split Iceberg REST service #4005
Conversation
843e9f4
to
8402bec
Compare
8a3624b
to
91f9938
Compare
@FANNG1 - I am interested in this change and would like to read some background on it. Is there a [email protected] thread to DISCUSS such a large change? A design doc or proposal in wiki? Can you update the PR template with some details of what this is doing and why? |
Hi, @lmccay , I have updated the doc in the PR template, you could refer to it. |
6a92403
to
4b951b9
Compare
|
||
JAVA_OPTS+=" -Dfile.encoding=UTF-8" | ||
JAVA_OPTS+=" -Dlog4j2.configurationFile=file://${GRAVITINO_CONF_DIR}/log4j2.properties" | ||
JAVA_OPTS+=" -Dgravitino.log.path=${GRAVITINO_LOG_DIR} ${GRAVITINO_MEM}" | ||
JAVA_OPTS+=" -Dgravitino.server.name=${GRAVITINO_SIMPLE_SERVER_NAME}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used to specify log file name
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/server/IcebergRESTServer.java
Outdated
Show resolved
Hide resolved
c079c5e
to
f4e6969
Compare
@jerryshao , all comments are addressed, please help to review again. |
4a0a796
to
10de2c9
Compare
eventListenerManager.init( | ||
config.getConfigsWithPrefix(EventListenerManager.GRAVITINO_EVENT_LISTENER_PREFIX)); | ||
this.eventBus = eventListenerManager.createEventBus(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would think that access control manager is also needed for the Iceberg rest server. But it requires many refactorings, we can do it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is the next phase for Iceberg REST service.
implementation(libs.bundles.jersey) | ||
implementation(libs.bundles.jetty) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this blank line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
this.accessControlManager = new AccessControlManager(entityStore, idGenerator, config); | ||
} else { | ||
this.accessControlManager = null; | ||
initBaseComponent(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"initBaseComponents" and "initGravitinoServerComponents"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
name -> | ||
config.getAllConfig().forEach((k, v) -> extractConfig(serviceConfigs, name, k, v))); | ||
return serviceConfigs; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should:
- Update the server config doc to describe the new config names and declare that old keys are still workable.
- Here in the code, when old configs are configured, output a warn log to users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- will use separate PR to add document
- done
"test4", | ||
"b.test2", | ||
"test2"), | ||
serviceConfigs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If old and new configs are both set, who will take precedence, who will overwrite who? I think you need to clarify this behavior and add UT to cover this scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will throw exception and add UT for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should honor overwrite mechanism, not throw an exception, I think throwing an exception is too severe, just adding warning logs and using new to overwrite old should be enough, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, updated
@jerryshao , all comments are addressed, please help to review again |
What changes were proposed in this pull request?
Split IcebergRESTService into one separate module, it could be managed with or without Gravitino server.
For user
iceberg-rest-server
which contains Iceberg REST server. They both contain isolated config files and start&stop script.gravitino.iceberg-rest.
are treated as Iceberg REST server configs. likegravitino.iceberg-rest.catalog-backend
,gravitino.iceberg-rest.httpPort
, etc. Configurations for Iceberg REST server are same in isolated package and Gravitino package.For developer
The core is
RESTService
which start JettyServer for Iceberg REST server,IcebergRESTServer
which provides configuration, metricsSystem forRESTService
.RESTService
is managed as a AuxiliaryService.Why are the changes needed?
Iceberg rest service is managed as an auxiliary service in Gravitino server , for the users who want to use Iceberg REST service only, it introduces an extra burden.
Fix: #2730
Does this PR introduce any user-facing change?
yes, will add document in #4113
How was this patch tested?
related docs
https://docs.google.com/document/d/1lyJwMaaJKfMqtnH9c7LwvnOHRKm7gh8Al4Sw3T1DFjM/edit