You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/04/09 17:23:06 UTC

[GitHub] [ozone-go] elek opened a new pull request #6: HDDS-5085. Create initial project structure with importing POC code

elek opened a new pull request #6:
URL: https://github.com/apache/ozone-go/pull/6


   Based on the [mailing list discussion] there was an agreement to copy the initial version of Go SDK / Fuse driver / C lib POC to apache/ozone-go repository.
   
   @mukul1987 [suggested](https://lists.apache.org/thread.html/rc40af70f283153828b85d4abd800da3c2f0fa99cb5575cfc208782c7%40%3Cdev.ozone.apache.org%3E) doing after PR review, so here is the PR for that.
   
   Note: https://issues.apache.org/jira/browse/HDDS-4977 explains all the features (and short-term plans) related to this proposed project structure, and we also have video which explains how does it work:
   
   https://youtu.be/ouNxn9i5DcM
   
   I suggest committing this existing poc to make it available for anybody who is interested to continue the work. But if you have any suggestion to structure this initial import in any way, please let me know.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] elek commented on pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
elek commented on pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#issuecomment-824323472


   > Can we copy the protobufs from the Ozone project rather than adding precompiled proto files ? with 1.1.0 release done now, We should take a dependency on the proto files
   
   Thanks for the suggestion @mukul1987. Yes, originally the proto files where there, but they accidentally be deleted. I restored them now.
   
   These are 1.0.0 proto files but created https://issues.apache.org/jira/browse/HDDS-5132 to updated them to the latest release.
   
   
   
   
   Note: I considered making it more dynamic (generating the code on the fly or downloading them on the fly) but I faced with different issues:
   
    1. It's not very easy to download artifacts for each build as they are published as maven artifacts which is not compatible with go ecosystem
    2. I think it's better to use the latest stable release from Ozone which doesn't really require ad-hoc download
    3. As the proto files include java based package names I added minor modifications to the proto files after the import: for example I added `option go_package = "github.com/apache/ozone-go/api/proto/common";` 
   
   (3.) is especially important. Thanks for the comment to include the original proto files. It's very important, because they include the required modifications in the headers.
   
   
   
   Note2: In the go word it's quite common to commit the generated go files (or even dependencies, `vendor` directory sometimes also included in the repos). For example the Kubernetes repo also follows this approach: there are a lot of generated files around this: https://github.com/kubernetes/client-go/blob/master/listers/apps/v1/controllerrevision.go
   
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] mukul1987 commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
mukul1987 commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r610795376



##########
File path: api/bucket.go
##########
@@ -0,0 +1,31 @@
+// 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 api
+
+import "github.com/apache/ozone-go/api/common"
+
+func (ozoneClient *OzoneClient) CreateBucket(volume string, bucket string) error {
+	return ozoneClient.OmClient.CreateBucket(volume, bucket)

Review comment:
       The indentation here seems to be 4 spaces in place of 2 spaces used in the Ozone project.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] elek commented on pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
elek commented on pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#issuecomment-826391667


   Hi @mukul1987, the pr is updated based on your comment. Can you please take another look?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] elek commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
elek commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r624737849



##########
File path: proto/raft.proto
##########
@@ -0,0 +1,387 @@
+/**
+ * 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.
+ */
+syntax = "proto3";
+option go_package = "github.com/apache/ozone-go/api/proto/ratis";
+
+option java_package = "org.apache.ratis.proto";
+option java_outer_classname = "RaftProtos";

Review comment:
       Done, removed in 1d7a88e




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] elek commented on pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
elek commented on pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#issuecomment-838164553


   Merging it now. Thanks the review @cxorm and @mukul1987 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] elek commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
elek commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r624738173



##########
File path: fuse/build.sh
##########
@@ -13,4 +13,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Review comment:
       Sure. Removed and will be uploaded in a separated patch. See above.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] mukul1987 removed a comment on pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
mukul1987 removed a comment on pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#issuecomment-823407921


   Can we copy the protobufs from the Ozone project rather than adding precompiled proto files ? with 1.1.0 release done now, We should take a dependency on the proto files


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] cxorm commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
cxorm commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r614805865



##########
File path: api/datanode/datanode.go
##########
@@ -0,0 +1,261 @@
+// 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 datanode
+
+import (
+	"context"
+	"errors"
+	"fmt"
+	dnapi "github.com/apache/ozone-go/api/proto/datanode"
+	"github.com/apache/ozone-go/api/proto/hdds"
+	"github.com/apache/ozone-go/api/proto/ratis"
+	"google.golang.org/grpc"
+	"io"
+	"strconv"
+)
+
+type ChunkInfo struct {
+	Name   string
+	Offset uint64
+	Len    uint64
+}
+
+type DatanodeClient struct {
+	ratisClient        *ratis.RaftClientProtocolService_UnorderedClient
+	ratisReceiver      chan ratis.RaftClientReplyProto
+	standaloneClient   *dnapi.XceiverClientProtocolService_SendClient
+	standaloneReceiver chan dnapi.ContainerCommandResponseProto
+
+	ctx             context.Context
+	datanodes       []*hdds.DatanodeDetailsProto
+	currentDatanode hdds.DatanodeDetailsProto
+	grpcConnection  *grpc.ClientConn
+	pipelineId      *hdds.PipelineID
+	memberIndex     int
+}
+
+func (dn *DatanodeClient) GetCurrentDnUUid() *string {
+	uid := dn.currentDatanode.GetUuid()
+	return &uid
+}
+
+func (dnClient *DatanodeClient) connectToNext() error {
+	if dnClient.grpcConnection != nil {
+		dnClient.grpcConnection.Close()
+	}
+	dnClient.memberIndex = dnClient.memberIndex + 1
+	if dnClient.memberIndex == len(dnClient.datanodes) {
+		dnClient.memberIndex = 0
+	}
+	selectedDatanode := dnClient.datanodes[dnClient.memberIndex]
+	dnClient.currentDatanode = *selectedDatanode
+
+	standalonePort := 0
+	for _, port := range dnClient.currentDatanode.Ports {
+		if *port.Name == "STANDALONE" {
+			standalonePort = int(*port.Value)
+		}
+	}
+
+	address := *dnClient.currentDatanode.IpAddress + ":" + strconv.Itoa(standalonePort)
+	println("Connecting to the " + address)
+	conn, err := grpc.Dial(address, grpc.WithInsecure(), grpc.WithBlock())
+	if err != nil {
+		return err
+	}
+
+	dnClient.ratisReceiver = make(chan ratis.RaftClientReplyProto)
+	dnClient.standaloneReceiver = make(chan dnapi.ContainerCommandResponseProto)
+
+	client, err := dnapi.NewXceiverClientProtocolServiceClient(conn).Send(dnClient.ctx)
+	dnClient.standaloneClient = &client
+	//
+	//client, err := ratis.NewRaftClientProtocolServiceClient(conn).Unordered(dnClient.ctx)
+	//if err != nil {
+	//	panic(err)
+	//}
+	//dnClient.ratisClient = &client
+	//go dnClient.RaftReceiver()

Review comment:
       Should we leave this snippet ?
   (IMHO we could do it in the future, but I'm fine with leaving it here and go ahead.)

##########
File path: api/bucket.go
##########
@@ -0,0 +1,31 @@
+// 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 api
+
+import "github.com/apache/ozone-go/api/common"
+
+func (ozoneClient *OzoneClient) CreateBucket(volume string, bucket string) error {
+	return ozoneClient.OmClient.CreateBucket(volume, bucket)
+}
+
+func (ozoneClient *OzoneClient) GetBucket(volume string, bucket string) (common.Bucket, error) {
+	return ozoneClient.OmClient.GetBucket(volume, bucket)
+}
+
+func (ozoneClient *OzoneClient) ListBucket(volume string) ([]common.Bucket, error) {
+	return ozoneClient.OmClient.ListBucket(volume)
+
+}

Review comment:
       Nit: No newline at end of file.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] mukul1987 commented on pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
mukul1987 commented on pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#issuecomment-826533297


   I am not an expert in go programming language, so will request others to take a look and review this patch as well.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] mukul1987 commented on pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
mukul1987 commented on pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#issuecomment-816841292


   Copying the same comment from the discuss thread here, the confusion is because of last reply on the thread which points to
   
           Thanks the positive feedback. Will cleanup existing code to create a proper initial patch, soon.
   
           I created https://issues.apache.org/jira/browse/HDDS-4977 to follow the progress.
   
   So I think the agreement was for creating an initial patch for adding the source code into this repository. 
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] mukul1987 commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
mukul1987 commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r624947508



##########
File path: proto/ratis-grpc.proto
##########
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */

Review comment:
       ok, great thought. Lets create a follow up jira to that this will get done hopefully eventually ? Lets create a sub task under the master jira for go client




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] mukul1987 commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
mukul1987 commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r610795376



##########
File path: api/bucket.go
##########
@@ -0,0 +1,31 @@
+// 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 api
+
+import "github.com/apache/ozone-go/api/common"
+
+func (ozoneClient *OzoneClient) CreateBucket(volume string, bucket string) error {
+	return ozoneClient.OmClient.CreateBucket(volume, bucket)

Review comment:
       The indentation here seems to be 4 spaces in place of 2 spaces used in the Ozone project.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] mukul1987 commented on pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
mukul1987 commented on pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#issuecomment-823407921


   Can we copy the protobufs from the Ozone project rather than adding precompiled proto files ? with 1.1.0 release done now, We should take a dependency on the proto files


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] elek commented on pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
elek commented on pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#issuecomment-830854293


   > I am not an expert in go programming language, so will request others to take a look and review this patch as well.
   
   Thanks the review @mukul1987. I addressed the comments. The code is already having a +1 from cxorm, let me know if you have any other concerns. 
   
   I pinged the dev@ozone mailing list to get everybody's attention, if there are no other concerns I am planning to merge it after one week. (As long as you have no more concerns...) 
   
   
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] elek commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
elek commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r624737567



##########
File path: proto/ratis-grpc.proto
##########
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */

Review comment:
       Thanks the suggestinos.
   
   I don't see such a recommendation in the thread, but I think it's a good idea.
   
   But in the current phase of the project I would prefer to keep the Ratis related code here as we don't need full, Ratis client (implementing all the Ratis calls)  the only thing what we need to do is wrap the request in the Ratis envelope.
   
   After we have a working demo: I agree. We can move out the Ratis related code, create a full-featured Ratis client and switch to use it. Until that I would prefer to keep here.

##########
File path: proto/ratis-grpc.proto
##########
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */

Review comment:
       Thanks the suggestions.
   
   I don't see such a recommendation in the thread, but I think it's a good idea.
   
   But in the current phase of the project I would prefer to keep the Ratis related code here as we don't need full, Ratis client (implementing all the Ratis calls)  the only thing what we need to do is wrap the request in the Ratis envelope.
   
   After we have a working demo: I agree. We can move out the Ratis related code, create a full-featured Ratis client and switch to use it. Until that I would prefer to keep 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] elek merged pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
elek merged pull request #6:
URL: https://github.com/apache/ozone-go/pull/6


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] mukul1987 commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
mukul1987 commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r619984359



##########
File path: proto/ratis-grpc.proto
##########
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */

Review comment:
       A bigger question, not a blocking comment, but this should go to Ratis repo and not to Ozone go client repo? and we should take dependency on Ratis code.
   
   For initial discussion on building a Ozone native client. Such idea was discussed as well, where the ratis code should go into ratis code ?

##########
File path: fuse/build.sh
##########
@@ -13,4 +13,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Review comment:
       Fuse source code should be a different change.

##########
File path: fuse/ozone-fuse/main.go
##########
@@ -0,0 +1,155 @@
+// 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 main
+
+import (
+	"fmt"
+	"github.com/apache/ozone-go/api"
+

Review comment:
       This change also adds a fuse client. This should be a separate change with discussion on the FUSE ? We also need a discussion on the consistency provided by the fuse client.

##########
File path: proto/ratis-grpc.proto
##########
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+syntax = "proto3";
+option go_package = "github.com/apache/ozone-go/api/proto/ratis";
+option java_package = "org.apache.ratis.proto.grpc";

Review comment:
       we should remove java references here as we are not sharing the files ?

##########
File path: proto/raft.proto
##########
@@ -0,0 +1,387 @@
+/**
+ * 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.
+ */
+syntax = "proto3";
+option go_package = "github.com/apache/ozone-go/api/proto/ratis";
+
+option java_package = "org.apache.ratis.proto";
+option java_outer_classname = "RaftProtos";

Review comment:
       same here, lets remove java refrences.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] elek commented on pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
elek commented on pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#issuecomment-826391667


   Hi @mukul1987, the pr is updated based on your comment. Can you please take another look?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] cxorm commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
cxorm commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r615525899



##########
File path: api/datanode/datanode.go
##########
@@ -0,0 +1,261 @@
+// 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 datanode
+
+import (
+	"context"
+	"errors"
+	"fmt"
+	dnapi "github.com/apache/ozone-go/api/proto/datanode"
+	"github.com/apache/ozone-go/api/proto/hdds"
+	"github.com/apache/ozone-go/api/proto/ratis"
+	"google.golang.org/grpc"
+	"io"
+	"strconv"
+)
+
+type ChunkInfo struct {
+	Name   string
+	Offset uint64
+	Len    uint64
+}
+
+type DatanodeClient struct {
+	ratisClient        *ratis.RaftClientProtocolService_UnorderedClient
+	ratisReceiver      chan ratis.RaftClientReplyProto
+	standaloneClient   *dnapi.XceiverClientProtocolService_SendClient
+	standaloneReceiver chan dnapi.ContainerCommandResponseProto
+
+	ctx             context.Context
+	datanodes       []*hdds.DatanodeDetailsProto
+	currentDatanode hdds.DatanodeDetailsProto
+	grpcConnection  *grpc.ClientConn
+	pipelineId      *hdds.PipelineID
+	memberIndex     int
+}
+
+func (dn *DatanodeClient) GetCurrentDnUUid() *string {
+	uid := dn.currentDatanode.GetUuid()
+	return &uid
+}
+
+func (dnClient *DatanodeClient) connectToNext() error {
+	if dnClient.grpcConnection != nil {
+		dnClient.grpcConnection.Close()
+	}
+	dnClient.memberIndex = dnClient.memberIndex + 1
+	if dnClient.memberIndex == len(dnClient.datanodes) {
+		dnClient.memberIndex = 0
+	}
+	selectedDatanode := dnClient.datanodes[dnClient.memberIndex]
+	dnClient.currentDatanode = *selectedDatanode
+
+	standalonePort := 0
+	for _, port := range dnClient.currentDatanode.Ports {
+		if *port.Name == "STANDALONE" {
+			standalonePort = int(*port.Value)
+		}
+	}
+
+	address := *dnClient.currentDatanode.IpAddress + ":" + strconv.Itoa(standalonePort)
+	println("Connecting to the " + address)
+	conn, err := grpc.Dial(address, grpc.WithInsecure(), grpc.WithBlock())
+	if err != nil {
+		return err
+	}
+
+	dnClient.ratisReceiver = make(chan ratis.RaftClientReplyProto)
+	dnClient.standaloneReceiver = make(chan dnapi.ContainerCommandResponseProto)
+
+	client, err := dnapi.NewXceiverClientProtocolServiceClient(conn).Send(dnClient.ctx)
+	dnClient.standaloneClient = &client
+	//
+	//client, err := ratis.NewRaftClientProtocolServiceClient(conn).Unordered(dnClient.ctx)
+	//if err != nil {
+	//	panic(err)
+	//}
+	//dnClient.ratisClient = &client
+	//go dnClient.RaftReceiver()

Review comment:
       Should we leave the snippet ? 
   (IMHO if we need the snippet we could add it in the future.)




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] cxorm commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
cxorm commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r614805865



##########
File path: api/datanode/datanode.go
##########
@@ -0,0 +1,261 @@
+// 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 datanode
+
+import (
+	"context"
+	"errors"
+	"fmt"
+	dnapi "github.com/apache/ozone-go/api/proto/datanode"
+	"github.com/apache/ozone-go/api/proto/hdds"
+	"github.com/apache/ozone-go/api/proto/ratis"
+	"google.golang.org/grpc"
+	"io"
+	"strconv"
+)
+
+type ChunkInfo struct {
+	Name   string
+	Offset uint64
+	Len    uint64
+}
+
+type DatanodeClient struct {
+	ratisClient        *ratis.RaftClientProtocolService_UnorderedClient
+	ratisReceiver      chan ratis.RaftClientReplyProto
+	standaloneClient   *dnapi.XceiverClientProtocolService_SendClient
+	standaloneReceiver chan dnapi.ContainerCommandResponseProto
+
+	ctx             context.Context
+	datanodes       []*hdds.DatanodeDetailsProto
+	currentDatanode hdds.DatanodeDetailsProto
+	grpcConnection  *grpc.ClientConn
+	pipelineId      *hdds.PipelineID
+	memberIndex     int
+}
+
+func (dn *DatanodeClient) GetCurrentDnUUid() *string {
+	uid := dn.currentDatanode.GetUuid()
+	return &uid
+}
+
+func (dnClient *DatanodeClient) connectToNext() error {
+	if dnClient.grpcConnection != nil {
+		dnClient.grpcConnection.Close()
+	}
+	dnClient.memberIndex = dnClient.memberIndex + 1
+	if dnClient.memberIndex == len(dnClient.datanodes) {
+		dnClient.memberIndex = 0
+	}
+	selectedDatanode := dnClient.datanodes[dnClient.memberIndex]
+	dnClient.currentDatanode = *selectedDatanode
+
+	standalonePort := 0
+	for _, port := range dnClient.currentDatanode.Ports {
+		if *port.Name == "STANDALONE" {
+			standalonePort = int(*port.Value)
+		}
+	}
+
+	address := *dnClient.currentDatanode.IpAddress + ":" + strconv.Itoa(standalonePort)
+	println("Connecting to the " + address)
+	conn, err := grpc.Dial(address, grpc.WithInsecure(), grpc.WithBlock())
+	if err != nil {
+		return err
+	}
+
+	dnClient.ratisReceiver = make(chan ratis.RaftClientReplyProto)
+	dnClient.standaloneReceiver = make(chan dnapi.ContainerCommandResponseProto)
+
+	client, err := dnapi.NewXceiverClientProtocolServiceClient(conn).Send(dnClient.ctx)
+	dnClient.standaloneClient = &client
+	//
+	//client, err := ratis.NewRaftClientProtocolServiceClient(conn).Unordered(dnClient.ctx)
+	//if err != nil {
+	//	panic(err)
+	//}
+	//dnClient.ratisClient = &client
+	//go dnClient.RaftReceiver()

Review comment:
       Should we leave this snippet ?
   (IMHO we could do it in the future, but I'm fine with leaving it here and go ahead.)

##########
File path: api/bucket.go
##########
@@ -0,0 +1,31 @@
+// 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 api
+
+import "github.com/apache/ozone-go/api/common"
+
+func (ozoneClient *OzoneClient) CreateBucket(volume string, bucket string) error {
+	return ozoneClient.OmClient.CreateBucket(volume, bucket)
+}
+
+func (ozoneClient *OzoneClient) GetBucket(volume string, bucket string) (common.Bucket, error) {
+	return ozoneClient.OmClient.GetBucket(volume, bucket)
+}
+
+func (ozoneClient *OzoneClient) ListBucket(volume string) ([]common.Bucket, error) {
+	return ozoneClient.OmClient.ListBucket(volume)
+
+}

Review comment:
       Nit: No newline at end of file.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] elek commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
elek commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r617830983



##########
File path: api/datanode/datanode.go
##########
@@ -0,0 +1,261 @@
+// 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 datanode
+
+import (
+	"context"
+	"errors"
+	"fmt"
+	dnapi "github.com/apache/ozone-go/api/proto/datanode"
+	"github.com/apache/ozone-go/api/proto/hdds"
+	"github.com/apache/ozone-go/api/proto/ratis"
+	"google.golang.org/grpc"
+	"io"
+	"strconv"
+)
+
+type ChunkInfo struct {
+	Name   string
+	Offset uint64
+	Len    uint64
+}
+
+type DatanodeClient struct {
+	ratisClient        *ratis.RaftClientProtocolService_UnorderedClient
+	ratisReceiver      chan ratis.RaftClientReplyProto
+	standaloneClient   *dnapi.XceiverClientProtocolService_SendClient
+	standaloneReceiver chan dnapi.ContainerCommandResponseProto
+
+	ctx             context.Context
+	datanodes       []*hdds.DatanodeDetailsProto
+	currentDatanode hdds.DatanodeDetailsProto
+	grpcConnection  *grpc.ClientConn
+	pipelineId      *hdds.PipelineID
+	memberIndex     int
+}
+
+func (dn *DatanodeClient) GetCurrentDnUUid() *string {
+	uid := dn.currentDatanode.GetUuid()
+	return &uid
+}
+
+func (dnClient *DatanodeClient) connectToNext() error {
+	if dnClient.grpcConnection != nil {
+		dnClient.grpcConnection.Close()
+	}
+	dnClient.memberIndex = dnClient.memberIndex + 1
+	if dnClient.memberIndex == len(dnClient.datanodes) {
+		dnClient.memberIndex = 0
+	}
+	selectedDatanode := dnClient.datanodes[dnClient.memberIndex]
+	dnClient.currentDatanode = *selectedDatanode
+
+	standalonePort := 0
+	for _, port := range dnClient.currentDatanode.Ports {
+		if *port.Name == "STANDALONE" {
+			standalonePort = int(*port.Value)
+		}
+	}
+
+	address := *dnClient.currentDatanode.IpAddress + ":" + strconv.Itoa(standalonePort)
+	println("Connecting to the " + address)
+	conn, err := grpc.Dial(address, grpc.WithInsecure(), grpc.WithBlock())
+	if err != nil {
+		return err
+	}
+
+	dnClient.ratisReceiver = make(chan ratis.RaftClientReplyProto)
+	dnClient.standaloneReceiver = make(chan dnapi.ContainerCommandResponseProto)
+
+	client, err := dnapi.NewXceiverClientProtocolServiceClient(conn).Send(dnClient.ctx)
+	dnClient.standaloneClient = &client
+	//
+	//client, err := ratis.NewRaftClientProtocolServiceClient(conn).Unordered(dnClient.ctx)
+	//if err != nil {
+	//	panic(err)
+	//}
+	//dnClient.ratisClient = &client
+	//go dnClient.RaftReceiver()

Review comment:
       Sure, it can definitely be removed. I am pushing the fix.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] mukul1987 commented on pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
mukul1987 commented on pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#issuecomment-826533297


   I am not an expert in go programming language, so will request others to take a look and review this patch as well.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] mukul1987 commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
mukul1987 commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r619984359



##########
File path: proto/ratis-grpc.proto
##########
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */

Review comment:
       A bigger question, not a blocking comment, but this should go to Ratis repo and not to Ozone go client repo? and we should take dependency on Ratis code.
   
   For initial discussion on building a Ozone native client. Such idea was discussed as well, where the ratis code should go into ratis code ?

##########
File path: fuse/build.sh
##########
@@ -13,4 +13,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Review comment:
       Fuse source code should be a different change.

##########
File path: fuse/ozone-fuse/main.go
##########
@@ -0,0 +1,155 @@
+// 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 main
+
+import (
+	"fmt"
+	"github.com/apache/ozone-go/api"
+

Review comment:
       This change also adds a fuse client. This should be a separate change with discussion on the FUSE ? We also need a discussion on the consistency provided by the fuse client.

##########
File path: proto/ratis-grpc.proto
##########
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+syntax = "proto3";
+option go_package = "github.com/apache/ozone-go/api/proto/ratis";
+option java_package = "org.apache.ratis.proto.grpc";

Review comment:
       we should remove java references here as we are not sharing the files ?

##########
File path: proto/raft.proto
##########
@@ -0,0 +1,387 @@
+/**
+ * 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.
+ */
+syntax = "proto3";
+option go_package = "github.com/apache/ozone-go/api/proto/ratis";
+
+option java_package = "org.apache.ratis.proto";
+option java_outer_classname = "RaftProtos";

Review comment:
       same here, lets remove java refrences.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] elek commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
elek commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r624737817



##########
File path: proto/ratis-grpc.proto
##########
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+syntax = "proto3";
+option go_package = "github.com/apache/ozone-go/api/proto/ratis";
+option java_package = "org.apache.ratis.proto.grpc";

Review comment:
       Sure, removed in 1d7a88e




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone-go] elek commented on a change in pull request #6: HDDS-5085. Create initial project structure with importing POC code

Posted by GitBox <gi...@apache.org>.
elek commented on a change in pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#discussion_r624738136



##########
File path: fuse/ozone-fuse/main.go
##########
@@ -0,0 +1,155 @@
+// 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 main
+
+import (
+	"fmt"
+	"github.com/apache/ozone-go/api"
+

Review comment:
       Sure thing. I will upload it in a different patch.
   
   I assume the consistency question is about the visibility of the files during the upload. (Let me know if you see any other problems). I agree that we need to investigate the question and define what kind of guarantees can be provided.
   
   By proposal is to start with a read-only fuse driver. It can be useful in many use-cases (like reading (!) ozone keys from the containers) and during the implementation we can understand the challenges about the write part which can be further discussed. 




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org