From 4ec8c3a0f6a99ccb72fb8a986d06391a9185cf14 Mon Sep 17 00:00:00 2001 From: imbajin Date: Wed, 26 Apr 2023 11:10:09 +0800 Subject: [PATCH] refact: add license header for root files & protobuf files Change-Id: Id277df46c88cc75029b0b3510274df14f732faba --- .mvn/wrapper/maven-wrapper.properties | 16 ++ build-change.sh | 17 ++ build-pre.sh | 17 ++ build.sh | 17 ++ deploy-release.sh | 17 ++ deploy-snapshot.sh | 17 ++ .../HgSessionManagerOneRaftFakePDTest.java | 78 ++++---- .../store/grpc/stream/HgStoreStreamGrpc.java | 170 +++++++++--------- .../store/grpc/stream/HgStoreStreamProto.java | 10 +- .../hugegraph/store/grpc/stream/KvStream.java | 18 +- .../store/grpc/stream/KvStreamOrBuilder.java | 2 +- .../store/grpc/stream/store_stream.proto | 2 +- init.sh | 17 ++ local-release.sh | 17 ++ run.sh | 17 ++ settings.xml | 69 ++++--- start_server.sh | 17 ++ 17 files changed, 345 insertions(+), 173 deletions(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 642d572ce..a0c0a3761 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,2 +1,18 @@ +# +# 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. +# distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/build-change.sh b/build-change.sh index e6c2fb30f..1fde2703a 100644 --- a/build-change.sh +++ b/build-change.sh @@ -1,4 +1,21 @@ #!/bin/bash +# +# 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. +# + export PATH=$MAVEN_3_5_3_BIN:$ORACLEJDK_11_0_7_BIN:$PATH export JAVA_HOME=$ORACLEJDK_11_0_7_HOME export MAVEN_HOME=$MAVEN_3_5_3_HOME diff --git a/build-pre.sh b/build-pre.sh index 86f9d4c29..feaa3102b 100644 --- a/build-pre.sh +++ b/build-pre.sh @@ -1,4 +1,21 @@ #!/bin/bash +# +# 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. +# + mkdir output touch output/1 export JAVA_HOME=$ORACLEJDK_1_8_0_HOME diff --git a/build.sh b/build.sh index 995600db7..a8129c618 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,21 @@ #!/bin/bash +# +# 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. +# + export PATH=$MAVEN_3_5_3_BIN:$ORACLEJDK_11_0_7_BIN:$PATH export JAVA_HOME=$ORACLEJDK_11_0_7_HOME export MAVEN_HOME=$MAVEN_3_5_3_HOME diff --git a/deploy-release.sh b/deploy-release.sh index 3712135c5..e9421724a 100755 --- a/deploy-release.sh +++ b/deploy-release.sh @@ -1,4 +1,21 @@ #!/bin/bash +# +# 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. +# + readonly VER=3.6.3 readonly REPO_URL=http://10.14.139.8:8081/artifactory/star-local #mvn -DnewVersion=${VER}-SNAPSHOT -DprocessAllModules=true -DgenerateBackupPoms=false versions:set diff --git a/deploy-snapshot.sh b/deploy-snapshot.sh index 5cd2e9519..14ff59239 100644 --- a/deploy-snapshot.sh +++ b/deploy-snapshot.sh @@ -1,5 +1,22 @@ #!/bin/bash +# +# 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. +# + readonly REPO_URL=http://10.14.139.8:8081/artifactory/star-snapshot mvn --settings ./settings.xml -Dmaven.test.skip=true -DaltDeploymentRepository=star-snapshot::default::${REPO_URL} clean deploy diff --git a/hg-store-client/src/test/java/org/apache/hugegraph/store/HgSessionManagerOneRaftFakePDTest.java b/hg-store-client/src/test/java/org/apache/hugegraph/store/HgSessionManagerOneRaftFakePDTest.java index 9b4455f50..7d40dd5ac 100644 --- a/hg-store-client/src/test/java/org/apache/hugegraph/store/HgSessionManagerOneRaftFakePDTest.java +++ b/hg-store-client/src/test/java/org/apache/hugegraph/store/HgSessionManagerOneRaftFakePDTest.java @@ -29,13 +29,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; import org.apache.hugegraph.pd.common.PartitionUtils; -import org.apache.hugegraph.store.client.HgNodePartitionerBuilder; -import org.apache.hugegraph.store.client.HgStoreNode; import org.apache.hugegraph.store.client.HgStoreNodeManager; -import org.apache.hugegraph.store.client.HgStoreNodeNotifier; -import org.apache.hugegraph.store.client.HgStoreNodePartitioner; -import org.apache.hugegraph.store.client.HgStoreNodeProvider; -import org.apache.hugegraph.store.client.HgStoreNotice; import org.apache.hugegraph.store.client.util.HgStoreClientConst; import org.apache.hugegraph.store.util.HgStoreTestUtil; import org.junit.Assert; @@ -48,7 +42,7 @@ public class HgSessionManagerOneRaftFakePDTest { private static final Map storeMap = new ConcurrentHashMap<>(); private static final int partitionCount = 3; - // 需要与store的application.yml的fake-pd.partition-count保持一致 + // 需要与store的application.yml的fake-pd.partition-count保持一致 private static final String[] storeAddress = { "127.0.0.1:8500" }; @@ -63,50 +57,40 @@ public class HgSessionManagerOneRaftFakePDTest { } HgStoreNodeManager nodeManager = HgStoreNodeManager.getInstance(); - nodeManager.setNodePartitioner(new HgStoreNodePartitioner() { - @Override - public int partition(HgNodePartitionerBuilder builder, String graphName, - byte[] startKey, byte[] endKey) { - int startCode = PartitionUtils.calcHashcode(startKey); - int endCode = PartitionUtils.calcHashcode(endKey); - if (ALL_PARTITION_OWNER == startKey) { - storeMap.forEach((k, v) -> { - builder.add(k, -1); - }); - } else if (endKey == HgStoreClientConst.EMPTY_BYTES || startKey == endKey || - Arrays.equals(startKey, endKey)) { - builder.add(leaderMap.get(startCode % partitionCount), startCode); - } else { - Assert.fail("OwnerKey转成HashCode后已经无序了, 按照OwnerKey范围查询没意义"); - builder.add(leaderMap.get(startCode % partitionCount), startCode); - builder.add(leaderMap.get(endCode % partitionCount), endCode); - } - return 0; + nodeManager.setNodePartitioner((builder, graphName, startKey, endKey) -> { + int startCode = PartitionUtils.calcHashcode(startKey); + int endCode = PartitionUtils.calcHashcode(endKey); + if (ALL_PARTITION_OWNER == startKey) { + storeMap.forEach((k, v) -> { + builder.add(k, -1); + }); + } else if (endKey == HgStoreClientConst.EMPTY_BYTES || startKey == endKey || + Arrays.equals(startKey, endKey)) { + builder.add(leaderMap.get(startCode % partitionCount), startCode); + } else { + Assert.fail("OwnerKey转成HashCode后已经无序了, 按照OwnerKey范围查询没意义"); + builder.add(leaderMap.get(startCode % partitionCount), startCode); + builder.add(leaderMap.get(endCode % partitionCount), endCode); } + return 0; }); - nodeManager.setNodeProvider(new HgStoreNodeProvider() { - @Override - public HgStoreNode apply(String graphName, Long nodeId) { - System.out.println("HgStoreNodeProvider apply " + graphName + " " + nodeId + " " + - storeMap.get(nodeId)); - return nodeManager.getNodeBuilder().setNodeId(nodeId) - .setAddress(storeMap.get(nodeId)).build(); - } + nodeManager.setNodeProvider((graphName, nodeId) -> { + System.out.println("HgStoreNodeProvider apply " + graphName + " " + nodeId + " " + + storeMap.get(nodeId)); + return nodeManager.getNodeBuilder().setNodeId(nodeId) + .setAddress(storeMap.get(nodeId)).build(); }); - nodeManager.setNodeNotifier(new HgStoreNodeNotifier() { - @Override - public int notice(String graphName, HgStoreNotice storeNotice) { - System.out.println("recv node notifier " + storeNotice); - if (storeNotice.getPartitionLeaders().size() > 0) { - leaderMap.putAll(storeNotice.getPartitionLeaders()); - System.out.println("leader changed "); - leaderMap.forEach((k, v) -> { - System.out.print(" " + k + " " + v + ","); - }); - System.out.println(); - } - return 0; + nodeManager.setNodeNotifier((graphName, storeNotice) -> { + System.out.println("recv node notifier " + storeNotice); + if (storeNotice.getPartitionLeaders().size() > 0) { + leaderMap.putAll(storeNotice.getPartitionLeaders()); + System.out.println("leader changed "); + leaderMap.forEach((k, v) -> { + System.out.print(" " + k + " " + v + ","); + }); + System.out.println(); } + return 0; }); } diff --git a/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/HgStoreStreamGrpc.java b/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/HgStoreStreamGrpc.java index 6b9d87a41..aabed077b 100644 --- a/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/HgStoreStreamGrpc.java +++ b/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/HgStoreStreamGrpc.java @@ -35,29 +35,29 @@ public final class HgStoreStreamGrpc { public static final String SERVICE_NAME = "HgStoreStream"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getScanMethod; + private static volatile io.grpc.MethodDescriptor getScanMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Scan", - requestType = com.baidu.hugegraph.store.grpc.stream.ScanStreamReq.class, - responseType = com.baidu.hugegraph.store.grpc.stream.KvPageRes.class, + requestType = org.apache.hugegraph.store.grpc.stream.ScanStreamReq.class, + responseType = org.apache.hugegraph.store.grpc.stream.KvPageRes.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - public static io.grpc.MethodDescriptor getScanMethod() { - io.grpc.MethodDescriptor getScanMethod; + public static io.grpc.MethodDescriptor getScanMethod() { + io.grpc.MethodDescriptor getScanMethod; if ((getScanMethod = HgStoreStreamGrpc.getScanMethod) == null) { synchronized (HgStoreStreamGrpc.class) { if ((getScanMethod = HgStoreStreamGrpc.getScanMethod) == null) { HgStoreStreamGrpc.getScanMethod = getScanMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Scan")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.baidu.hugegraph.store.grpc.stream.ScanStreamReq.getDefaultInstance())) + org.apache.hugegraph.store.grpc.stream.ScanStreamReq.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.baidu.hugegraph.store.grpc.stream.KvPageRes.getDefaultInstance())) + org.apache.hugegraph.store.grpc.stream.KvPageRes.getDefaultInstance())) .setSchemaDescriptor(new HgStoreStreamMethodDescriptorSupplier("Scan")) .build(); } @@ -66,29 +66,29 @@ public final class HgStoreStreamGrpc { return getScanMethod; } - private static volatile io.grpc.MethodDescriptor getScanOneShotMethod; + private static volatile io.grpc.MethodDescriptor getScanOneShotMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ScanOneShot", - requestType = com.baidu.hugegraph.store.grpc.stream.ScanStreamReq.class, - responseType = com.baidu.hugegraph.store.grpc.stream.KvPageRes.class, + requestType = org.apache.hugegraph.store.grpc.stream.ScanStreamReq.class, + responseType = org.apache.hugegraph.store.grpc.stream.KvPageRes.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getScanOneShotMethod() { - io.grpc.MethodDescriptor getScanOneShotMethod; + public static io.grpc.MethodDescriptor getScanOneShotMethod() { + io.grpc.MethodDescriptor getScanOneShotMethod; if ((getScanOneShotMethod = HgStoreStreamGrpc.getScanOneShotMethod) == null) { synchronized (HgStoreStreamGrpc.class) { if ((getScanOneShotMethod = HgStoreStreamGrpc.getScanOneShotMethod) == null) { HgStoreStreamGrpc.getScanOneShotMethod = getScanOneShotMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ScanOneShot")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.baidu.hugegraph.store.grpc.stream.ScanStreamReq.getDefaultInstance())) + org.apache.hugegraph.store.grpc.stream.ScanStreamReq.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.baidu.hugegraph.store.grpc.stream.KvPageRes.getDefaultInstance())) + org.apache.hugegraph.store.grpc.stream.KvPageRes.getDefaultInstance())) .setSchemaDescriptor(new HgStoreStreamMethodDescriptorSupplier("ScanOneShot")) .build(); } @@ -97,29 +97,29 @@ public final class HgStoreStreamGrpc { return getScanOneShotMethod; } - private static volatile io.grpc.MethodDescriptor getScanBatchMethod; + private static volatile io.grpc.MethodDescriptor getScanBatchMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ScanBatch", - requestType = com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq.class, - responseType = com.baidu.hugegraph.store.grpc.stream.KvPageRes.class, + requestType = org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq.class, + responseType = org.apache.hugegraph.store.grpc.stream.KvPageRes.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - public static io.grpc.MethodDescriptor getScanBatchMethod() { - io.grpc.MethodDescriptor getScanBatchMethod; + public static io.grpc.MethodDescriptor getScanBatchMethod() { + io.grpc.MethodDescriptor getScanBatchMethod; if ((getScanBatchMethod = HgStoreStreamGrpc.getScanBatchMethod) == null) { synchronized (HgStoreStreamGrpc.class) { if ((getScanBatchMethod = HgStoreStreamGrpc.getScanBatchMethod) == null) { HgStoreStreamGrpc.getScanBatchMethod = getScanBatchMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ScanBatch")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq.getDefaultInstance())) + org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.baidu.hugegraph.store.grpc.stream.KvPageRes.getDefaultInstance())) + org.apache.hugegraph.store.grpc.stream.KvPageRes.getDefaultInstance())) .setSchemaDescriptor(new HgStoreStreamMethodDescriptorSupplier("ScanBatch")) .build(); } @@ -128,27 +128,27 @@ public final class HgStoreStreamGrpc { return getScanBatchMethod; } - private static volatile io.grpc.MethodDescriptor getScanBatch2Method; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ScanBatch2", - requestType = com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq.class, + requestType = org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq.class, responseType = KvStream.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - public static io.grpc.MethodDescriptor getScanBatch2Method() { - io.grpc.MethodDescriptor getScanBatch2Method; + io.grpc.MethodDescriptor getScanBatch2Method; if ((getScanBatch2Method = HgStoreStreamGrpc.getScanBatch2Method) == null) { synchronized (HgStoreStreamGrpc.class) { if ((getScanBatch2Method = HgStoreStreamGrpc.getScanBatch2Method) == null) { HgStoreStreamGrpc.getScanBatch2Method = getScanBatch2Method = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ScanBatch2")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq.getDefaultInstance())) + org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( KvStream.getDefaultInstance())) .setSchemaDescriptor(new HgStoreStreamMethodDescriptorSupplier("ScanBatch2")) @@ -159,29 +159,29 @@ public final class HgStoreStreamGrpc { return getScanBatch2Method; } - private static volatile io.grpc.MethodDescriptor getScanBatchOneShotMethod; + private static volatile io.grpc.MethodDescriptor getScanBatchOneShotMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ScanBatchOneShot", - requestType = com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq.class, - responseType = com.baidu.hugegraph.store.grpc.stream.KvPageRes.class, + requestType = org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq.class, + responseType = org.apache.hugegraph.store.grpc.stream.KvPageRes.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getScanBatchOneShotMethod() { - io.grpc.MethodDescriptor getScanBatchOneShotMethod; + public static io.grpc.MethodDescriptor getScanBatchOneShotMethod() { + io.grpc.MethodDescriptor getScanBatchOneShotMethod; if ((getScanBatchOneShotMethod = HgStoreStreamGrpc.getScanBatchOneShotMethod) == null) { synchronized (HgStoreStreamGrpc.class) { if ((getScanBatchOneShotMethod = HgStoreStreamGrpc.getScanBatchOneShotMethod) == null) { HgStoreStreamGrpc.getScanBatchOneShotMethod = getScanBatchOneShotMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ScanBatchOneShot")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq.getDefaultInstance())) + org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.baidu.hugegraph.store.grpc.stream.KvPageRes.getDefaultInstance())) + org.apache.hugegraph.store.grpc.stream.KvPageRes.getDefaultInstance())) .setSchemaDescriptor(new HgStoreStreamMethodDescriptorSupplier("ScanBatchOneShot")) .build(); } @@ -244,36 +244,36 @@ public final class HgStoreStreamGrpc { /** */ - public io.grpc.stub.StreamObserver scan( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver scan( + io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getScanMethod(), responseObserver); } /** */ - public void scanOneShot(com.baidu.hugegraph.store.grpc.stream.ScanStreamReq request, - io.grpc.stub.StreamObserver responseObserver) { + public void scanOneShot(org.apache.hugegraph.store.grpc.stream.ScanStreamReq request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getScanOneShotMethod(), responseObserver); } /** */ - public io.grpc.stub.StreamObserver scanBatch( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver scanBatch( + io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getScanBatchMethod(), responseObserver); } /** */ - public io.grpc.stub.StreamObserver scanBatch2( + public io.grpc.stub.StreamObserver scanBatch2( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getScanBatch2Method(), responseObserver); } /** */ - public void scanBatchOneShot(com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq request, - io.grpc.stub.StreamObserver responseObserver) { + public void scanBatchOneShot(org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getScanBatchOneShotMethod(), responseObserver); } @@ -283,36 +283,36 @@ public final class HgStoreStreamGrpc { getScanMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< - com.baidu.hugegraph.store.grpc.stream.ScanStreamReq, - com.baidu.hugegraph.store.grpc.stream.KvPageRes>( + org.apache.hugegraph.store.grpc.stream.ScanStreamReq, + org.apache.hugegraph.store.grpc.stream.KvPageRes>( this, METHODID_SCAN))) .addMethod( getScanOneShotMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - com.baidu.hugegraph.store.grpc.stream.ScanStreamReq, - com.baidu.hugegraph.store.grpc.stream.KvPageRes>( + org.apache.hugegraph.store.grpc.stream.ScanStreamReq, + org.apache.hugegraph.store.grpc.stream.KvPageRes>( this, METHODID_SCAN_ONE_SHOT))) .addMethod( getScanBatchMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< - com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq, - com.baidu.hugegraph.store.grpc.stream.KvPageRes>( + org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq, + org.apache.hugegraph.store.grpc.stream.KvPageRes>( this, METHODID_SCAN_BATCH))) .addMethod( getScanBatch2Method(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< - com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq, + org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq, KvStream>( this, METHODID_SCAN_BATCH2))) .addMethod( getScanBatchOneShotMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq, - com.baidu.hugegraph.store.grpc.stream.KvPageRes>( + org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq, + org.apache.hugegraph.store.grpc.stream.KvPageRes>( this, METHODID_SCAN_BATCH_ONE_SHOT))) .build(); } @@ -338,31 +338,31 @@ public final class HgStoreStreamGrpc { /** */ - public io.grpc.stub.StreamObserver scan( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver scan( + io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getScanMethod(), getCallOptions()), responseObserver); } /** */ - public void scanOneShot(com.baidu.hugegraph.store.grpc.stream.ScanStreamReq request, - io.grpc.stub.StreamObserver responseObserver) { + public void scanOneShot(org.apache.hugegraph.store.grpc.stream.ScanStreamReq request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getScanOneShotMethod(), getCallOptions()), request, responseObserver); } /** */ - public io.grpc.stub.StreamObserver scanBatch( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver scanBatch( + io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getScanBatchMethod(), getCallOptions()), responseObserver); } /** */ - public io.grpc.stub.StreamObserver scanBatch2( + public io.grpc.stub.StreamObserver scanBatch2( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getScanBatch2Method(), getCallOptions()), responseObserver); @@ -370,8 +370,8 @@ public final class HgStoreStreamGrpc { /** */ - public void scanBatchOneShot(com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq request, - io.grpc.stub.StreamObserver responseObserver) { + public void scanBatchOneShot(org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getScanBatchOneShotMethod(), getCallOptions()), request, responseObserver); } @@ -397,14 +397,14 @@ public final class HgStoreStreamGrpc { /** */ - public com.baidu.hugegraph.store.grpc.stream.KvPageRes scanOneShot(com.baidu.hugegraph.store.grpc.stream.ScanStreamReq request) { + public org.apache.hugegraph.store.grpc.stream.KvPageRes scanOneShot(org.apache.hugegraph.store.grpc.stream.ScanStreamReq request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getScanOneShotMethod(), getCallOptions(), request); } /** */ - public com.baidu.hugegraph.store.grpc.stream.KvPageRes scanBatchOneShot(com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq request) { + public org.apache.hugegraph.store.grpc.stream.KvPageRes scanBatchOneShot(org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getScanBatchOneShotMethod(), getCallOptions(), request); } @@ -430,16 +430,16 @@ public final class HgStoreStreamGrpc { /** */ - public com.google.common.util.concurrent.ListenableFuture scanOneShot( - com.baidu.hugegraph.store.grpc.stream.ScanStreamReq request) { + public com.google.common.util.concurrent.ListenableFuture scanOneShot( + org.apache.hugegraph.store.grpc.stream.ScanStreamReq request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getScanOneShotMethod(), getCallOptions()), request); } /** */ - public com.google.common.util.concurrent.ListenableFuture scanBatchOneShot( - com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq request) { + public com.google.common.util.concurrent.ListenableFuture scanBatchOneShot( + org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getScanBatchOneShotMethod(), getCallOptions()), request); } @@ -469,12 +469,12 @@ public final class HgStoreStreamGrpc { public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_SCAN_ONE_SHOT: - serviceImpl.scanOneShot((com.baidu.hugegraph.store.grpc.stream.ScanStreamReq) request, - (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.scanOneShot((org.apache.hugegraph.store.grpc.stream.ScanStreamReq) request, + (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_SCAN_BATCH_ONE_SHOT: - serviceImpl.scanBatchOneShot((com.baidu.hugegraph.store.grpc.stream.ScanStreamBatchReq) request, - (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.scanBatchOneShot((org.apache.hugegraph.store.grpc.stream.ScanStreamBatchReq) request, + (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); @@ -488,10 +488,10 @@ public final class HgStoreStreamGrpc { switch (methodId) { case METHODID_SCAN: return (io.grpc.stub.StreamObserver) serviceImpl.scan( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); case METHODID_SCAN_BATCH: return (io.grpc.stub.StreamObserver) serviceImpl.scanBatch( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); case METHODID_SCAN_BATCH2: return (io.grpc.stub.StreamObserver) serviceImpl.scanBatch2( (io.grpc.stub.StreamObserver) responseObserver); diff --git a/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/HgStoreStreamProto.java b/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/HgStoreStreamProto.java index 7736b1538..940ddab7f 100644 --- a/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/HgStoreStreamProto.java +++ b/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/HgStoreStreamProto.java @@ -55,14 +55,14 @@ public final class HgStoreStreamProto { "\n.KvPageRes\"\000(\0010\001\0222\n\nScanBatch2\022\023.ScanSt" + "reamBatchReq\032\t.KvStream\"\000(\0010\001\0225\n\020ScanBat" + "chOneShot\022\023.ScanStreamBatchReq\032\n.KvPageR" + - "es\"\000B=\n%com.baidu.hugegraph.store.grpc.s" + + "es\"\000B=\n%org.apache.hugegraph.store.grpc.s" + "treamB\022HgStoreStreamProtoP\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.baidu.hugegraph.store.grpc.common.HgStoreCommonProto.getDescriptor(), - com.baidu.hugegraph.store.grpc.stream.HgStoreStreamMetaProto.getDescriptor(), + org.apache.hugegraph.store.grpc.common.HgStoreCommonProto.getDescriptor(), + org.apache.hugegraph.store.grpc.stream.HgStoreStreamMetaProto.getDescriptor(), }); internal_static_KvStream_descriptor = getDescriptor().getMessageTypes().get(0); @@ -70,8 +70,8 @@ public final class HgStoreStreamProto { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_KvStream_descriptor, new java.lang.String[] { "SeqNo", "Over", "Version", "Stream", }); - com.baidu.hugegraph.store.grpc.common.HgStoreCommonProto.getDescriptor(); - com.baidu.hugegraph.store.grpc.stream.HgStoreStreamMetaProto.getDescriptor(); + org.apache.hugegraph.store.grpc.common.HgStoreCommonProto.getDescriptor(); + org.apache.hugegraph.store.grpc.stream.HgStoreStreamMetaProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/KvStream.java b/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/KvStream.java index fce5a832d..1893ce33e 100644 --- a/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/KvStream.java +++ b/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/KvStream.java @@ -188,10 +188,10 @@ public final class KvStream extends * .KvStreamType type = 6; * @return The type. */ - @java.lang.Override public com.baidu.hugegraph.store.grpc.stream.KvStreamType getType() { + @java.lang.Override public org.apache.hugegraph.store.grpc.stream.KvStreamType getType() { @SuppressWarnings("deprecation") - com.baidu.hugegraph.store.grpc.stream.KvStreamType result = com.baidu.hugegraph.store.grpc.stream.KvStreamType.valueOf(type_); - return result == null ? com.baidu.hugegraph.store.grpc.stream.KvStreamType.UNRECOGNIZED : result; + org.apache.hugegraph.store.grpc.stream.KvStreamType result = org.apache.hugegraph.store.grpc.stream.KvStreamType.valueOf(type_); + return result == null ? org.apache.hugegraph.store.grpc.stream.KvStreamType.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; @java.lang.Override @@ -219,7 +219,7 @@ public final class KvStream extends if (stream_.limit() > 0) { output.writeByteArray(5, stream_.array(), 0, stream_.limit()); } - if (type_ != com.baidu.hugegraph.store.grpc.stream.KvStreamType.STREAM_TYPE_NONE.getNumber()) { + if (type_ != org.apache.hugegraph.store.grpc.stream.KvStreamType.STREAM_TYPE_NONE.getNumber()) { output.writeEnum(6, type_); } unknownFields.writeTo(output); @@ -252,7 +252,7 @@ public final class KvStream extends .computeUInt32SizeNoTag(stream_.limit()) + stream_.limit(); } - if (type_ != com.baidu.hugegraph.store.grpc.stream.KvStreamType.STREAM_TYPE_NONE.getNumber()) { + if (type_ != org.apache.hugegraph.store.grpc.stream.KvStreamType.STREAM_TYPE_NONE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(6, type_); } @@ -738,17 +738,17 @@ public final class KvStream extends * @return The type. */ @java.lang.Override - public com.baidu.hugegraph.store.grpc.stream.KvStreamType getType() { + public org.apache.hugegraph.store.grpc.stream.KvStreamType getType() { @SuppressWarnings("deprecation") - com.baidu.hugegraph.store.grpc.stream.KvStreamType result = com.baidu.hugegraph.store.grpc.stream.KvStreamType.valueOf(type_); - return result == null ? com.baidu.hugegraph.store.grpc.stream.KvStreamType.UNRECOGNIZED : result; + org.apache.hugegraph.store.grpc.stream.KvStreamType result = org.apache.hugegraph.store.grpc.stream.KvStreamType.valueOf(type_); + return result == null ? org.apache.hugegraph.store.grpc.stream.KvStreamType.UNRECOGNIZED : result; } /** * .KvStreamType type = 6; * @param value The type to set. * @return This builder for chaining. */ - public Builder setType(com.baidu.hugegraph.store.grpc.stream.KvStreamType value) { + public Builder setType(org.apache.hugegraph.store.grpc.stream.KvStreamType value) { if (value == null) { throw new NullPointerException(); } diff --git a/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/KvStreamOrBuilder.java b/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/KvStreamOrBuilder.java index ca35db990..418241dfd 100644 --- a/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/KvStreamOrBuilder.java +++ b/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/KvStreamOrBuilder.java @@ -66,5 +66,5 @@ public interface KvStreamOrBuilder extends * .KvStreamType type = 6; * @return The type. */ - com.baidu.hugegraph.store.grpc.stream.KvStreamType getType(); + org.apache.hugegraph.store.grpc.stream.KvStreamType getType(); } diff --git a/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/store_stream.proto b/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/store_stream.proto index 2ceb24d5a..5652aba7c 100644 --- a/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/store_stream.proto +++ b/hg-store-grpc/src/main/dev/org/apache/hugegraph/store/grpc/stream/store_stream.proto @@ -3,7 +3,7 @@ syntax = "proto3"; import "store_common.proto"; import "store_stream_meta.proto"; option java_multiple_files = true; -option java_package = "com.baidu.hugegraph.store.grpc.stream"; +option java_package = "org.apache.hugegraph.store.grpc.stream"; option java_outer_classname = "HgStoreStreamProto"; /** diff --git a/init.sh b/init.sh index 75124dac9..6458ef618 100644 --- a/init.sh +++ b/init.sh @@ -1,4 +1,21 @@ #!/bin/bash +# +# 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. +# + mkdir output touch output/1 export JAVA_HOME=$ORACLEJDK_1_8_0_HOME diff --git a/local-release.sh b/local-release.sh index 861071d64..53a9bfce2 100644 --- a/local-release.sh +++ b/local-release.sh @@ -1,4 +1,21 @@ #!/bin/bash +# +# 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. +# + readonly VER=3.6.3 #mvn -DnewVersion=${VER}-SNAPSHOT -DprocessAllModules=true -DgenerateBackupPoms=false versions:set diff --git a/run.sh b/run.sh index c20947dd0..ae7c44dba 100644 --- a/run.sh +++ b/run.sh @@ -1,3 +1,20 @@ +# +# 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. +# + #/bin/bash export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 diff --git a/settings.xml b/settings.xml index 2f98d5ca9..226ca701f 100644 --- a/settings.xml +++ b/settings.xml @@ -1,4 +1,21 @@ + + @@ -7,18 +24,18 @@ /path/to/cache/ --> - - - - - - - - - - - - + + + + + + + + + + + + baidu @@ -45,18 +62,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -71,7 +88,9 @@ Baidu_Local_Snapshots - http://maven.baidu-int.com/nexus/content/repositories/Baidu_Local_Snapshots + + http://maven.baidu-int.com/nexus/content/repositories/Baidu_Local_Snapshots + false diff --git a/start_server.sh b/start_server.sh index 3d96072e7..280fe25a7 100644 --- a/start_server.sh +++ b/start_server.sh @@ -1,3 +1,20 @@ +# +# 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. +# + function rename() { cfilelist=$(find -maxdepth 1 -type d -printf '%f\n' )