You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by va...@apache.org on 2023/01/30 16:55:19 UTC
[incubator-hugegraph] 01/01: fix: some reference url and third file license
This is an automated email from the ASF dual-hosted git repository.
vaughn pushed a commit to branch zy_dev
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git
commit a3e826a4ca314d9f4ec02b524d17006dee165764
Author: vaughn <va...@apache.org>
AuthorDate: Tue Jan 31 00:54:50 2023 +0800
fix: some reference url and third file license
---
.../org/apache/hugegraph/api/job/GremlinAPI.java | 3 ---
.../backend/store/cassandra/CassandraShard.java | 2 +-
hugegraph-core/pom.xml | 1 +
.../apache/hugegraph/analyzer/AnsjAnalyzer.java | 2 +-
.../apache/hugegraph/analyzer/HanLPAnalyzer.java | 2 +-
.../org/apache/hugegraph/analyzer/IKAnalyzer.java | 2 +-
.../apache/hugegraph/analyzer/JcsegAnalyzer.java | 2 +-
.../apache/hugegraph/analyzer/JiebaAnalyzer.java | 2 +-
.../apache/hugegraph/analyzer/MMSeg4JAnalyzer.java | 2 +-
.../apache/hugegraph/analyzer/SmartCNAnalyzer.java | 2 +-
.../traversal/optimize/HugeScriptTraversal.java | 24 ++++++++++--------
.../java/org/apache/hugegraph/type/Nameable.java | 29 ++++++++++------------
.../apache/hugegraph/type/define/Cardinality.java | 29 ++++++++++------------
.../org/apache/hugegraph/util/CompressUtil.java | 3 ---
.../java/org/apache/hugegraph/util/GZipUtil.java | 3 ---
.../org/apache/hugegraph/util/StringEncoding.java | 29 ++++++++++------------
16 files changed, 61 insertions(+), 76 deletions(-)
diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/GremlinAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/GremlinAPI.java
index aef8fbcfb..6a47ec5ad 100644
--- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/GremlinAPI.java
+++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/GremlinAPI.java
@@ -150,9 +150,6 @@ public class GremlinAPI extends API {
return firstLine;
}
- /*
- * Reference https://stackoverflow.com/questions/3576754/truncating-strings-by-bytes
- */
CharsetDecoder decoder = charset.newDecoder();
decoder.onMalformedInput(CodingErrorAction.IGNORE);
decoder.reset();
diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java
index 1bb218e18..14c9f44ac 100644
--- a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java
+++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java
@@ -61,7 +61,7 @@ import com.google.common.collect.ImmutableMap;
*/
public class CassandraShard {
- // The minimal shard size should >= 1M to prevent too many number of shards
+ /* The minimal shard size should >= 1M to prevent too many number of shards */
private static final int MIN_SHARD_SIZE = (int) Bytes.MB;
private CassandraSessionPool.Session session;
diff --git a/hugegraph-core/pom.xml b/hugegraph-core/pom.xml
index 9cba2157d..e1140188f 100644
--- a/hugegraph-core/pom.xml
+++ b/hugegraph-core/pom.xml
@@ -199,6 +199,7 @@
<groupId>com.janeluo</groupId>
<artifactId>ikanalyzer</artifactId>
<version>${ikanalyzer.version}</version>
+ <scope>provided</scope>
</dependency>
<!-- fastutil: https://mvnrepository.com/artifact/it.unimi.dsi/fastutil -->
diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnsjAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnsjAnalyzer.java
index 84fd950aa..9c8d6c01b 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnsjAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnsjAnalyzer.java
@@ -32,7 +32,7 @@ import org.apache.hugegraph.util.InsertionOrderUtil;
import com.google.common.collect.ImmutableList;
/**
- * Reference from https://my.oschina.net/apdplat/blog/412921
+ * Reference from https://github.com/NLPchina/ansj_seg/wiki
*/
public class AnsjAnalyzer implements Analyzer {
diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/HanLPAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/HanLPAnalyzer.java
index 393bd027e..fdd33a097 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/HanLPAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/HanLPAnalyzer.java
@@ -33,7 +33,7 @@ import com.hankcs.hanlp.tokenizer.SpeedTokenizer;
import com.hankcs.hanlp.tokenizer.StandardTokenizer;
/**
- * Reference from https://my.oschina.net/apdplat/blog/412921
+ * Reference from https://github.com/hankcs/HanLP/wiki
*/
public class HanLPAnalyzer implements Analyzer {
diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/IKAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/IKAnalyzer.java
index 30cb91dd3..f1d0ba5ae 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/IKAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/IKAnalyzer.java
@@ -30,7 +30,7 @@ import org.apache.hugegraph.util.InsertionOrderUtil;
import com.google.common.collect.ImmutableList;
/**
- * Reference from https://my.oschina.net/apdplat/blog/412921
+ * Reference from https://github.com/yyn0210/IKAnalyzer
*/
public class IKAnalyzer implements Analyzer {
diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JcsegAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JcsegAnalyzer.java
index 9e0d8998f..8fbb606b3 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JcsegAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JcsegAnalyzer.java
@@ -33,7 +33,7 @@ import org.apache.hugegraph.util.InsertionOrderUtil;
import com.google.common.collect.ImmutableList;
/**
- * Reference from https://my.oschina.net/apdplat/blog/412921
+ * Reference from https://github.com/lionsoul2014/jcseg
*/
public class JcsegAnalyzer implements Analyzer {
diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JiebaAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JiebaAnalyzer.java
index 22cb5e50f..ce582c0d9 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JiebaAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JiebaAnalyzer.java
@@ -27,7 +27,7 @@ import com.huaban.analysis.jieba.JiebaSegmenter;
import com.huaban.analysis.jieba.SegToken;
/**
- * Reference from https://my.oschina.net/apdplat/blog/412921
+ * Reference from https://github.com/huaban/jieba-analysis
*/
public class JiebaAnalyzer implements Analyzer {
diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/MMSeg4JAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/MMSeg4JAnalyzer.java
index 73e6b31ed..74eda61fb 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/MMSeg4JAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/MMSeg4JAnalyzer.java
@@ -34,7 +34,7 @@ import com.chenlb.mmseg4j.Word;
import com.google.common.collect.ImmutableList;
/**
- * Reference from https://my.oschina.net/apdplat/blog/412921
+ * Reference from https://github.com/chenlb/mmseg4j-core
*/
public class MMSeg4JAnalyzer implements Analyzer {
diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/SmartCNAnalyzer.java b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/SmartCNAnalyzer.java
index f6b4d7117..e26143159 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/SmartCNAnalyzer.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/SmartCNAnalyzer.java
@@ -29,7 +29,7 @@ import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import org.apache.hugegraph.util.InsertionOrderUtil;
/**
- * Reference from https://my.oschina.net/apdplat/blog/412921
+ * Reference from https://lucene.apache.org/core/8_11_2/analyzers-smartcn/index.html
*/
public class SmartCNAnalyzer implements Analyzer {
diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java
index d6d8de4cf..a6582850d 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java
@@ -1,17 +1,19 @@
/*
- * 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
+ * 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
+ * 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
+ * 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.
*/
diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java b/hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java
index ad9de8113..f14c19dd2 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java
@@ -1,19 +1,16 @@
-/*
- * 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.
- */
+// Copyright 2017 JanusGraph Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
package org.apache.hugegraph.type;
diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java b/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java
index b6d78dab6..96c8095cd 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java
@@ -1,19 +1,16 @@
-/*
- * 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.
- */
+// Copyright 2017 JanusGraph Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
package org.apache.hugegraph.type.define;
diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/CompressUtil.java b/hugegraph-core/src/main/java/org/apache/hugegraph/util/CompressUtil.java
index 7fcbeea82..2a01ba6a0 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/util/CompressUtil.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/util/CompressUtil.java
@@ -56,9 +56,6 @@ import net.jpountz.lz4.LZ4FastDecompressor;
public final class CompressUtil {
- /**
- * Reference: https://mkyong.com/java/how-to-create-tar-gz-in-java/
- */
public static void compressTar(String inputDir, String outputFile,
Checksum checksum) throws IOException {
LZ4Factory factory = LZ4Factory.fastestInstance();
diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/GZipUtil.java b/hugegraph-core/src/main/java/org/apache/hugegraph/util/GZipUtil.java
index e07b0d5b8..e351c92f5 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/util/GZipUtil.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/util/GZipUtil.java
@@ -26,9 +26,6 @@ import org.apache.commons.codec.digest.DigestUtils;
import org.apache.hugegraph.backend.BackendException;
import org.apache.hugegraph.backend.serializer.BytesBuffer;
-/**
- * Reference from https://dzone.com/articles/how-compress-and-uncompress
- */
public final class GZipUtil {
private static final int BUF_SIZE = (int) (4 * Bytes.KB);
diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java b/hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java
index 2461765fa..6d92c4bf9 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java
@@ -1,19 +1,16 @@
-/*
- * 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.
- */
+// Copyright 2017 JanusGraph Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
package org.apache.hugegraph.util;