You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by "aaawuanjun (via GitHub)" <gi...@apache.org> on 2024/05/23 06:07:07 UTC

[I] [Question] create edge use uuid as vertices id, but tips "Invalid vertex id" [incubator-hugegraph]

aaawuanjun opened a new issue, #2542:
URL: https://github.com/apache/incubator-hugegraph/issues/2542

   ### Problem Type (问题类型)
   
   rest-api (结果不合预期)
   
   ### Before submit
   
   - [X] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 [FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)
   
   ### Environment (环境信息)
   
   - Server Version: 1.0.0 (Apache Release Version)
   - Backend: RocksDB x nodes, HDD or SSD 
   - OS: xx CPUs, xx G RAM, Ubuntu 2x.x / CentOS 7.x 
   - Data Size:  3 vertices, 0edges 
   
   
   ### Your Question (问题描述)
   
   create edge:
   ![image](https://github.com/apache/incubator-hugegraph/assets/35732071/07368ac9-b4d5-4f9f-a543-5e2db6867e4f)
   
   vertices id is exist:
   ![image](https://github.com/apache/incubator-hugegraph/assets/35732071/86f25f49-36fc-440f-8204-6cc0e896e1a7)
   
   
   
   
   ### Vertex/Edge example (问题点 / 边数据举例)
   
   ```javascript
   # create edge
   ## request:
   http://172.16.12.150:8080/graphs/hugegraph/graph/edges
   
   request body:
   
   {
     "label": "dsToTaskLineageEdgeLabelTTI",
     "inV": "a9a0e424-129b-487d-a089-6372673ebedc",
     "inVLabel": "taskLineageVertexLabel",
     "outV": "3b567246-d408-461f-b481-a899d1477e0d",
     "outVLabel": "dsLineageVertexLabel",
     "properties": {
         "date": "20171210",
         "weight": 0.4
     }
   }
   
   
   ## response:
   ```text
   {
       "exception": "class java.lang.IllegalArgumentException",
       "message": "Invalid vertex id '3b567246-d408-461f-b481-a899d1477e0d'",
       "cause": ""
   }
   ```
   ```
   
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org.apache.org

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


Re: [I] [Question] create edge use uuid as vertices id, but tips "Invalid vertex id" [incubator-hugegraph]

Posted by "aaawuanjun (via GitHub)" <gi...@apache.org>.
aaawuanjun commented on issue #2542:
URL: https://github.com/apache/incubator-hugegraph/issues/2542#issuecomment-2126340164

   it does not work,  the code version is 1.3.0
   
   from belows, it produce exception, it does not judge U prefix
   ```text
       private static Vertex getVertex(HugeGraph graph, Object id, String label) {
           HugeVertex vertex;
           try {
               vertex = (HugeVertex) graph.vertices(id).next();
           } catch (NoSuchElementException e) {
               throw new IllegalArgumentException(String.format("Invalid vertex id '%s'", id));
           }
           if (label != null && !vertex.label().equals(label)) {
               throw new IllegalArgumentException(String.format(
                       "The label of vertex '%s' is unmatched, users expect " +
                       "label '%s', actual label stored is '%s'",
                       id, label, vertex.label()));
           }
           // Clone a new vertex to support multi-thread access
           return vertex.copy();
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

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


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


Re: [I] [Question] create edge use uuid as vertices id, but tips "Invalid vertex id" [incubator-hugegraph]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #2542:
URL: https://github.com/apache/incubator-hugegraph/issues/2542#issuecomment-2126305102

   <!-- Greeting -->
   你好 @aaawuanjun!很高兴再次见到你 😊。我现在正在查看你的问题,很快就会给你一个完整的答案。
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

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


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


Re: [I] [Question] create edge use uuid as vertices id, but tips "Invalid vertex id" [incubator-hugegraph]

Posted by "aaawuanjun (via GitHub)" <gi...@apache.org>.
aaawuanjun closed issue #2542: [Question] create edge use uuid as vertices id, but tips "Invalid vertex id"
URL: https://github.com/apache/incubator-hugegraph/issues/2542


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

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