Re: [PR] [#4959] feat(Iceberg): support Iceberg REST extend API [gravitino]

2024-09-26 Thread via GitHub


FANNG1 commented on PR #4987:
URL: https://github.com/apache/gravitino/pull/4987#issuecomment-2376191497

   Add a test to produce "hello" message, please help to review this when you 
are free.   @SinghAsDev @puchengy @jerryshao 


-- 
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]



Re: [PR] [#4959] feat(Iceberg): support Iceberg REST extend API [gravitino]

2024-09-26 Thread via GitHub


FANNG1 commented on code in PR #4987:
URL: https://github.com/apache/gravitino/pull/4987#discussion_r1776557605


##
iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/service/extension/HelloOperations.java:
##
@@ -0,0 +1,49 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.gravitino.iceberg.service.extension;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.gravitino.iceberg.service.IcebergRestUtils;
+
+@Path("/hello")

Review Comment:
   Couldn't use `HELLO_URI_PATH` here



-- 
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]



Re: [PR] [#4959] feat(Iceberg): support Iceberg REST extend API [gravitino]

2024-09-24 Thread via GitHub


FANNG1 commented on PR #4987:
URL: https://github.com/apache/gravitino/pull/4987#issuecomment-2372623460

   > @FANNG1 Thanks for sharing this. I am curious in this PR, how can users 
access `icebergCatalogWrapperManager` instance if user plugin their API into 
IRC?
   
   1.  `IcebergCatalogWrapperManager` injected to jersey in `RESTService.java`
   
   ```java
   icebergCatalogWrapperManager = new 
IcebergCatalogWrapperManager(icebergConfig.getAllConfig());
   icebergMetricsManager = new IcebergMetricsManager(icebergConfig);
   config.register(
   new AbstractBinder() {
 @Override
 protected void configure() {
   
bind(icebergCatalogWrapperManager).to(IcebergCatalogWrapperManager.class).ranked(1);
   
bind(icebergMetricsManager).to(IcebergMetricsManager.class).ranked(1);
 }
   });
   ```
   
   2.  The user plugin could use the injected `IcebergCatalogWrapperManager` 
like `IcebergTableOperations`
   ```java
 @Inject
 public IcebergTableOperations(
 IcebergCatalogWrapperManager icebergCatalogWrapperManager,
 IcebergMetricsManager icebergMetricsManager) {
   this.icebergCatalogWrapperManager = icebergCatalogWrapperManager;
   this.icebergObjectMapper = IcebergObjectMapper.getInstance();
   this.icebergMetricsManager = icebergMetricsManager;
 }
   ```


-- 
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]



Re: [PR] [#4959] feat(Iceberg): support Iceberg REST extend API [gravitino]

2024-09-24 Thread via GitHub


puchengy commented on PR #4987:
URL: https://github.com/apache/gravitino/pull/4987#issuecomment-2372492708

   @FANNG1 Thanks for sharing this. I am curious in this PR, how can users 
access `icebergCatalogWrapperManager` instance if user plugin their API into 
IRC?


-- 
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]



Re: [PR] [#4959] feat(Iceberg): support Iceberg REST extend API [gravitino]

2024-09-23 Thread via GitHub


FANNG1 commented on PR #4987:
URL: https://github.com/apache/gravitino/pull/4987#issuecomment-2369788835

   > Hi @FANNG1 thanks for the change, I think it's in the right direction. Can 
you help add a test case that adds an extension uri, and run some test against 
it.
   
   ok


-- 
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]



Re: [PR] [#4959] feat(Iceberg): support Iceberg REST extend API [gravitino]

2024-09-23 Thread via GitHub


SinghAsDev commented on PR #4987:
URL: https://github.com/apache/gravitino/pull/4987#issuecomment-2368774338

   Hi @FANNG1 thanks for the change, I think it's in the right direction. Can 
you help add a test case that adds an extension uri, and run some test against 
it.


-- 
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]



Re: [PR] [#4959] feat(Iceberg): support Iceberg REST extend API [gravitino]

2024-09-23 Thread via GitHub


FANNG1 commented on PR #4987:
URL: https://github.com/apache/gravitino/pull/4987#issuecomment-2367893605

   @SinghAsDev this PR add a configuration to extend the REST API packages, is 
it meet your requirement?


-- 
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]



Re: [PR] [#4959] feat(Iceberg): support Iceberg REST extend API [gravitino]

2024-09-22 Thread via GitHub


jerryshao commented on PR #4987:
URL: https://github.com/apache/gravitino/pull/4987#issuecomment-2367155061

   I think you'd better discuss with the Pinterest team about the solutions 
before proposing it, to see if it can satisfy their needs. Moreover, it would 
be better to let them do it.


-- 
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]



[PR] [#4959] feat(Iceberg): support Iceberg REST extend API [gravitino]

2024-09-22 Thread via GitHub


FANNG1 opened a new pull request, #4987:
URL: https://github.com/apache/gravitino/pull/4987

   ### What changes were proposed in this pull request?
   
   support Iceberg REST extend API
   
   ### Why are the changes needed?
   
   Fix: #4959 
   
   ### Does this PR introduce _any_ user-facing change?
   no
   
   ### How was this patch tested?
   1.  add new operation classes with new URI PATH to 
`org.apache.gravitino.iceberg.service.rest2`
   2. config `gravitino.iceberg-rest.extension-packages` to  
`org.apache.gravitino.iceberg.service.rest2`
   3. start Gravitino IcebergRESTServer
   4. check new URI is accessable.


-- 
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]