[
https://issues.apache.org/jira/browse/HDDS-444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16621299#comment-16621299
]
Bharat Viswanadham edited comment on HDDS-444 at 9/19/18 11:04 PM:
-------------------------------------------------------------------
Hi [~elek]
Thank You for the patch. I just started looking into the patch. And I think,
the rest interfaces for Bucket and Key are also being added in the patch.
I have a question, for put Bucket, we have many header parameters from the
documentation, but from patch, I see it has only 2 path parameters volume and
bucket. (And also for bucket creation, do we want to pass the volume name also,
as for bucket creation only path parameter is bucketname only right?) Could you
provide some info on the documentation link for s3 compatible protocol header?
Not sure If I am missing some details in understanding this patch, as I don't
have full information on S3 compatible protocol header for ozone?
*S3 Rest API documentation link:*
[https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUT.html]
And also for putObject, I see in the patch we have used ReplicationType as
standalone and replication factor one, we don't use ratis and Replication
Factor Three?
was (Author: bharatviswa):
Hi [~elek]
Thank You for the patch. I just started looking into the patch. And I think,
the rest interfaces for Bucket and Key are also being added in the patch.
I have a question, for put Bucket, we have many header parameters from the
patch I see, it has only 2 path parameters volume and bucket. Could you
provide some info on the documentation link for s3 compatible protocol header?
[https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUT.html]
And also for putObject, I see in the patch we have used ReplicationType as
standalone and replication factor one, we don't use ratis and Replication
Factor Three?
> Add rest service to the s3gateway
> ---------------------------------
>
> Key: HDDS-444
> URL: https://issues.apache.org/jira/browse/HDDS-444
> Project: Hadoop Distributed Data Store
> Issue Type: Sub-task
> Reporter: Elek, Marton
> Assignee: Elek, Marton
> Priority: Major
> Labels: newbie
> Attachments: HDDS-444.001.patch, HDDS-444.002.patch,
> HDDS-444.003.patch
>
>
> The next step is after HDDS-441 is to add a rest server to the s3gateway
> service.
> For the http server the obvious choice is to use
> org.apache.hadoop.http.HttpServer2. We also have a
> org.apache.hadoop.hdds.server.BaseHttpServer which helps to create the
> HttpServer2.
> In hadoop usually the jersey 1.19 is used. I prefer to exclude jersey
> dependency from the s3gateway and add the latest jersey2. Hopefully it also
> could be initialized easily, similar to HttpServer2.addJerseyResourcePackage
> The trickiest part is the resource handling. By default the input parameter
> of the jersey is the JAX-RS resource class and jersey creates new instances
> from the specified resource classes.
> But with this approach we can't inject other components (such as the
> OzoneClient) to the resource classes. In Hadoop usually a singleton is used
> or the reference object is injected to the ServletContext. Both of these are
> just workaround and make the testing harder.
> I propose to use some lightweight managed dependency injection:
> # If we can use and JettyApi to instantiate the resource classes, that would
> be the easiest one.
> # Using a simple CDI framework like dagger, also would help. Dagger is very
> lightweight, it doesn't support request scoped objects just simple @Inject
> annotations, but hopefully we won't need fancy new features.
> # The most complex solution would be to use CDI or Guice. CDI seems to be
> more nature choice for the JAX-RS. It can be checked how easy is to integrate
> Weld to the Jetty + Jersey combo.
> The expected end result of this task is a new HttpServer subcomponent inside
> the s3gateway which could be started/stopped. We need an example simple
> service (for exampe a /health endpoint which returns with an 'OK' string)
> which can demonstrate how our own utilitites (such as OzoneClient) could be
> injected to the REST resources.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]