[ 
https://issues.apache.org/jira/browse/HDDS-712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16668866#comment-16668866
 ] 

Elek, Marton commented on HDDS-712:
-----------------------------------

Thanks [~bharatviswa] the patch. I have minor comments:

 
1. I think sooner or later we need to run ozone tests with real replication. We 
can add a 'scale up' to the adoop-ozone/dist/src/main/smoketest/test.sh

{code:java}
docker-compose -f "$COMPOSE_FILE" down
docker-compose -f "$COMPOSE_FILE" up -d
docker-compose -f "$COMPOSE_FILE" scale datanode=3
{code}

And with this modification we don't need the '--storage-class 
REDUCED_REDUNDANCY'. (But we can do it in separated jira)

2. It's more like a personal taste (=feel free to ignore it, if you don't 
agree), but I prefer to use enum instead of 
org.apache.hadoop.ozone.s3.util.StorageMap

{code:java}
public enum S3StorageType {

  REDUCED_REDUNDANCY(ReplicationType.STAND_ALONE, ReplicationFactor.ONE),
  STANDARD(ReplicationType.RATIS, ReplicationFactor.THREE);

  private final ReplicationType type;
  private final ReplicationFactor factor;

  S3StorageType(
      ReplicationType type,
      ReplicationFactor factor) {
    this.type = type;
    this.factor = factor;
  }
}
{code}

And parse it with

{code}
S3StorageType.valueOf("STANDARD")
{code}

2. Still I am against the info logs for every requests: I would remove the 
LOG.info from ObjectEndpoint (or use LOG.debug)


> Use x-amz-storage-class to specify replication type and replication factor
> --------------------------------------------------------------------------
>
>                 Key: HDDS-712
>                 URL: https://issues.apache.org/jira/browse/HDDS-712
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>         Attachments: HDDS-712.00.patch
>
>
>  
> This has been a comment in the Jira in HDDS-693 from [~anu]
> @DefaultValue("STAND_ALONE") @QueryParam("replicationType")
> Just an opportunistic comment. Not part of this patch, this query param will 
> not be sent by S3 hence this will always default to Stand_Alone. At some 
> point we need to move to RATIS, Perhaps we have to read this via 
> x-amz-storage-class.
> *I propose below solution for this:*
> Currently, in code we take query params replicationType and replicationFactor 
> and default them to Stand alone and 1. But these query params cannot be 
> passed from aws cli.
> We want to use x-amz-storage-class header and pass the values. By default for 
> S3 If you don't specify this it defaults to Standard. So, in Ozone over S3 
> also, as we want to default to Ratis and replication factor three by default.
> We can use the mapping Standard to RATIS and REDUCED_REDUNDANCY to Stand 
> alone.
>  
> There are 2 more values 
> STANDARD_IA and ONEZONE_IA these need to be considered later how we want to 
> use them. Intially we are considering to use Standard and Reduced_Redundancy.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to