griddb / webapi

GridDB WebAPI
Apache License 2.0
5 stars 5 forks source link

Partitioned Containers not available to WebAPI #7

Closed Imisrael closed 6 months ago

Imisrael commented 10 months ago

I have created an interval-based partition of a COLLECTION container to introduce partition expiry functionality, but now my WEB API cannot interact with the container at all.

Environment

Ubuntu: 22 GridDB: "5.0.0-39331 CE" Web API: 2.2.0

gs[public]> showcontainer RAWLOG_agent_tests
Database    : public
Name        : RAWLOG_agent_tests
Type        : COLLECTION
Partition ID: 78
DataAffinity: -
Partitioned : true
Partition Type           : INTERVAL
Partition Column         : ts
Partition Interval Value : 30
Partition Interval Unit  : DAY
Expiration Type      : PARTITION
Expiration Time      : 30
Expiration Time Unit : DAY

Columns:
No  Name                  Type            CSTR  RowKey
------------------------------------------------------------------------------
 0  ts                    TIMESTAMP       NN    
 1  hostname              STRING                
 2  logtype               STRING                
 3  value                 STRING                
 4  path                  STRING 
$ curl -X POST --basic -u admin:admin  -H "Content-type: application/json" -d '{"limit":2}' 'http://localhost:8080/griddb/v2/myCluster/dbs/public/containers/RAWLOG_agent_tests/rows'
{"version":"v2","errorCode":0,"errorMessage":"Container not existed"}

Any ideas?

knonomura commented 6 months ago

GridDB Java client has supported operations on partitioned tables since version 4.5.2.

But GridDB WebAPI 2.2.0 depends on GridDB Java client 4.5.0. So, we can't operate partitioned tables with it.

I have released GridDB WebAPI 5.5.0 recently. It depends on GridDB Java client 5.5.0.

Could you try the following method: (A) or (B) ?

(A) Changing all of the following versions to 5.3.0 for GridDB WebAPI 2.2.0

webapi-ce/build.gradle
  gridstoreVersion
  gridstoreJdbcVersion
common/build.gradle
  gridstoreVersion

(B) Using GridDB WebAPI 5.5.0

Imisrael commented 6 months ago

Thank you, both A and B works for me