Skip to content

Commit d8d8fe2

Browse files
Linaryzhoney
authored andcommitted
Improve some comments (#472)
Change-Id: I237f3e4175eec538aff01c521ec6e93cc8c2fc87
1 parent 2418d51 commit d8d8fe2

File tree

7 files changed

+16
-9
lines changed

7 files changed

+16
-9
lines changed

hugegraph-cassandra/src/main/java/com/baidu/hugegraph/backend/store/cassandra/CassandraShard.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ public List<Shard> getSplits(long splitPartitions, long splitSize) {
129129
/**
130130
* Get splits of a table in specified range
131131
* NOTE: maybe we don't need this method
132-
* @param start, end: the specified range
132+
* @param start: the start of range
133+
* @param end: the end of range
133134
* @param splitPartitions: expected partitions count per split
134135
* @param splitSize: expected size(bytes) per split,
135136
* splitPartitions will be ignored if splitSize is passed
136137
* @return a list of Shard
137138
*/
138-
139139
public List<Shard> getSplits(String start, String end,
140140
int splitPartitions, int splitSize) {
141141

hugegraph-core/src/main/java/com/baidu/hugegraph/HugeGraph.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,6 @@ public EventHub indexEventHub() {
186186
return this.indexEventHub;
187187
}
188188

189-
/**
190-
* @SuppressWarnings("UnstableApiUsage")
191-
*/
192189
public RateLimiter rateLimiter() {
193190
return this.rateLimiter;
194191
}
@@ -574,8 +571,7 @@ public Id[] mapVlName2Id(String[] vertexLabels) {
574571

575572
/**
576573
* Stop all the daemon threads
577-
* @param timout seconds
578-
* @throws InterruptedException when be interrupted
574+
* @param timeout seconds
579575
*/
580576
public static void shutdown(long timeout) {
581577
try {

hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/IdHolder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public final class IdHolder {
3838

3939
/**
4040
* For non-paging situation
41+
* @param ids all ids
4142
*/
4243
public IdHolder(Set<Id> ids) {
4344
this.query = null;
@@ -52,6 +53,8 @@ public IdHolder(Set<Id> ids) {
5253

5354
/**
5455
* For paging situation
56+
* @param query original query
57+
* @param idsFetcher function to fetch one page ids
5558
*/
5659
public IdHolder(ConditionQuery query,
5760
Function<ConditionQuery, PageIds> idsFetcher) {

hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/GraphIndexTransaction.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ public void updateEdgeIndex(HugeEdge edge, boolean removed) {
141141

142142
/**
143143
* Update index(user properties) of vertex or edge
144+
* @param ilId the id of index label
145+
* @param element the properties owner
146+
* @param removed remove or add index
144147
*/
145148
protected void updateIndex(Id ilId, HugeElement element, boolean removed) {
146149
SchemaTransaction schema = graph().schemaTransaction();

hugegraph-core/src/main/java/com/baidu/hugegraph/job/schema/SchemaCallable.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ protected static void removeIndexLabelFromBaseLabel(SchemaTransaction tx,
6666
/**
6767
* Use reflection to call SchemaTransaction.removeSchema(),
6868
* which is protected
69+
* @param tx The remove operation actual executer
70+
* @param schema the schema to be removed
6971
*/
7072
protected static void removeSchema(SchemaTransaction tx,
7173
SchemaElement schema) {
@@ -86,6 +88,8 @@ protected static void removeSchema(SchemaTransaction tx,
8688
/**
8789
* Use reflection to call SchemaTransaction.updateSchema(),
8890
* which is protected
91+
* @param tx The update operation actual executer
92+
* @param schema the schema to be update
8993
*/
9094
protected static void updateSchema(SchemaTransaction tx,
9195
SchemaElement schema) {

hugegraph-core/src/main/java/com/baidu/hugegraph/schema/PropertyKey.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public Class<?> clazz() {
108108
/**
109109
* Check type of the value valid
110110
* @param value the property value to be checked data type
111+
* @param <V> the property value original data type
111112
* @return true if the value is or can convert to the data type,
112113
* otherwise false
113114
*/

hugegraph-example/src/main/java/com/baidu/hugegraph/example/PerfExampleBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public int test(String[] args) throws Exception {
8989

9090
/**
9191
* Multi-threaded and multi-commits and batch insertion test
92-
* @param graph
92+
* @param graph graph
9393
* @param threadCount
9494
* The count of threads that perform the insert operation at the
9595
* same time
@@ -98,7 +98,7 @@ public int test(String[] args) throws Exception {
9898
* @param multiple
9999
* The coefficient to multiple number of vertices(100) and edges(100)
100100
* for each transaction commit
101-
* @throws InterruptedException
101+
* @throws Exception execute may throw Exception
102102
*/
103103
public void testInsertPerf(GraphManager graph,
104104
int threadCount,

0 commit comments

Comments
 (0)