jackye1995 commented on a change in pull request #3376:
URL: https://github.com/apache/iceberg/pull/3376#discussion_r781429303



##########
File path: dell/src/main/java/org/apache/iceberg/dell/EcsFileIO.java
##########
@@ -0,0 +1,99 @@
+/*
+ * 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.iceberg.dell;
+
+import com.emc.object.s3.S3Client;
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.Map;
+import org.apache.iceberg.io.FileIO;
+import org.apache.iceberg.io.InputFile;
+import org.apache.iceberg.io.OutputFile;
+import 
org.apache.iceberg.relocated.com.google.common.annotations.VisibleForTesting;
+import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
+
+/**
+ * A {@link java.io.Externalizable} FileIO of ECS S3 object client.
+ */
+public class EcsFileIO implements FileIO, Externalizable, AutoCloseable {

Review comment:
       I think we need to directly serialize an object like client as a 
function instead of using Externalizable. I understand this method is likely 
correct, but given the fact that all the other implementations are using that 
approach, it's better to be consistent so that it's easier to maintain in the 
future.
   
   examples: 
   
   
https://github.com/apache/iceberg/blob/master/aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java#L42-L45
   
   
https://github.com/apache/iceberg/blob/master/gcp/src/main/java/org/apache/iceberg/gcp/gcs/GCSFileIO.java#L47

##########
File path: dell/src/main/java/org/apache/iceberg/dell/EcsClientProperties.java
##########
@@ -0,0 +1,48 @@
+/*
+ * 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.iceberg.dell;
+
+/**
+ * Property constants of catalog
+ */
+public interface EcsClientProperties {

Review comment:
       I would suggest making this class name `DellProperties`, to follow the 
pattern of `AwsProperties,` `GCPProperties` and `AliyunProperties`.

##########
File path: dell/src/main/java/org/apache/iceberg/dell/EcsClientProperties.java
##########
@@ -0,0 +1,48 @@
+/*
+ * 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.iceberg.dell;
+
+/**
+ * Property constants of catalog
+ */
+public interface EcsClientProperties {
+
+  /**
+   * Access key id
+   */
+  String ACCESS_KEY_ID = "ecs.s3.access.key.id";
+
+  /**
+   * Secret access key
+   */
+  String SECRET_ACCESS_KEY = "ecs.s3.secret.access.key";
+
+  /**
+   * S3 endpoint
+   */
+  String ENDPOINT = "ecs.s3.endpoint";
+
+  /**
+   * Factory class of {@link EcsClientFactory}.
+   * <p>
+   * The config is optional. If properties above aren't enough, use this.

Review comment:
       when people read this in generated javadoc web page, they cannot see 
what are the "properties above". Please see the documentation in 
`AwsProperties` to improve the javadoc.

##########
File path: dell/src/main/java/org/apache/iceberg/dell/EcsClientProperties.java
##########
@@ -0,0 +1,48 @@
+/*
+ * 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.iceberg.dell;
+
+/**
+ * Property constants of catalog
+ */
+public interface EcsClientProperties {
+
+  /**
+   * Access key id
+   */
+  String ACCESS_KEY_ID = "ecs.s3.access.key.id";

Review comment:
       Based on a recent discussion (#3658), we should name these 
`ecs.access-key-id`, `ecs.secret-access-key`, `ecs.endpoint`. 
   
   Another way is to use the same properties as AWS, which are 
`s3.access-key-id`, `s3.secret-access-key`, `s3.endpoint`. But given the fact 
that this is a ECS native implementation, I think `ecs` as prefix makes more 
sense.
   
   My understanding is that Elastic Cloud Storage (ECS) itself means an object 
storage, using namespace `ecs.s3` does not make much sense.

##########
File path: dell/src/main/java/org/apache/iceberg/dell/EcsClientProperties.java
##########
@@ -0,0 +1,48 @@
+/*
+ * 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.iceberg.dell;
+
+/**
+ * Property constants of catalog

Review comment:
       looks like wrong documentation, could you remove?




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

Reply via email to